Task-focused guides and implementation reference drawn directly from the repository.
Tutorial
Quickstart
Install MIRA from PyPI, download a trained model, and open a local camera stream. I've tested this on Windows PowerShell — on macOS use source .venv/bin/activate.
mira.yaml is the shared configuration source for classes, paths, training defaults, inference thresholds, and export settings. CLI options override these values for one run.
Inspect the effective configuration with .\mira config.
Explanation
Architecture
The system separates camera capture, inference, presentation, and research tooling so each part can be tested independently.
Camera serviceUSB or IP stream
→
Frame bufferlatest frame, thread safe
→
Inference enginePT, TFLite, adapters
→
Outputswindow, REST, WebSocket
Key modules
src/inference_engine.py
Model loading, frame skipping, latency history, and cleanup.
src/dashboard/backend/
FastAPI routes, camera control, and WebSocket transport.
src/pipeline/
Dataset handling, strategies, validation, training, and benchmarking.
src/cli/
Plugin-registered commands for local and cloud workflows.
How-to
Run live inference
Launch the interactive model picker or specify a model directly. I usually just run .\mira live without arguments and pick from the list.
bash
.\mira live
.\mira live --model mira_exp019.pt
.\mira live --model mira_exp019.pt --camera 1 --resolution 1280x720
.\mira live --model mira_exp019.pt --conf 0.25 --reject 0.55
Confidence tiers
Below confidenceIgnored
Detections below --conf are not drawn.
UncertainVisible, not counted
Detections between the confidence and reject thresholds are labelled uncertain.
ConfidentVisible and counted
Detections above the reject threshold contribute to inventory.
How-to
Use the dashboard
The dashboard runs locally. It does not upload camera frames to a public server. I've been running it on 127.0.0.1:8000 during development — it doesn't need internet.
Open http://127.0.0.1:8000. Select a camera, load a model, and start the stream. The interface exposes class distribution, recent detections, FPS, latency, CPU, and memory history.
Current dashboard view with the local stream connected.
How-to
Prepare datasets
Dataset files stay outside Git. Registry metadata and processing code keep their origins and transformations traceable. I've kept the raw zips out of git since they're a few GB.