How arm/optimized-runtimes works
This repository provides an Arm-optimized YOLO26n object-detection runtime for Raspberry Pi 5. The principal workflow accepts an image frame through the Python detector, preprocesses it, invokes the native runtime, and returns postprocessed detections. A separate conversion workflow validates a checkpoint and lowers its weights into a runtime model artifact. The graph also preserves the documented examples and benchmark capability; their internal wiring is not shown in the supplied excerpts.
Main entry points: export_yolo26n.py Model export · arm_yolo26n.cpp Native API · detector.py Detection API · yolo26n.py Tensor session
Components 22
Model conversion
- Checkpoint decoding
yolo26-raspberry-pi-5/src/converter/checkpoint_decoder.py - Checkpoint intake
yolo26-raspberry-pi-5/src/converter/checkpoint_intake.py - Model validation
yolo26-raspberry-pi-5/src/converter/model_validation.py - Model contracts
yolo26-raspberry-pi-5/src/converter/model_contract.py - Weight lowering
yolo26-raspberry-pi-5/src/converter/weight_lowering.py - Model export
yolo26-raspberry-pi-5/src/converter/export_yolo26n.py - Model format
yolo26-raspberry-pi-5/src/converter/model_format.py
Python API
- Detection API
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/detector.py - Tensor session
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/yolo26n.py - Model loading
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/_model.py
Native inference
- Native API
yolo26-raspberry-pi-5/src/runtime/arm_yolo26n.cpp - Native preprocessing
yolo26-raspberry-pi-5/src/runtime/preprocess.cpp - Model store
yolo26-raspberry-pi-5/src/runtime/model_store.cpp - Fixed inference graphs
yolo26-raspberry-pi-5/src/runtime/fixed_graph.cpp - Inference schedule
yolo26-raspberry-pi-5/src/runtime/fixed_schedule.cpp - Memory planning
yolo26-raspberry-pi-5/src/runtime/fixed_memory_plan.cpp - Projection optimization
yolo26-raspberry-pi-5/src/runtime/projection_optimization.cpp
Examples and benchmarks
- Camera examples
yolo26-raspberry-pi-5/examples/picamera2 - Video examples
yolo26-raspberry-pi-5/examples/video - Benchmarks
yolo26-raspberry-pi-5/benchmarks
Other components
- Image frame
- Detection results
Connections 21
- Checkpoint intake → Checkpoint decoding: decodes via
yolo26-raspberry-pi-5/src/converter/checkpoint_intake.py - Checkpoint intake → Model validation: validates with
yolo26-raspberry-pi-5/src/converter/checkpoint_intake.py - Model validation → Model contracts: uses contracts
yolo26-raspberry-pi-5/src/converter/model_validation.py - Model export → Checkpoint intake: loads through
yolo26-raspberry-pi-5/src/converter/export_yolo26n.py - Model export → Model contracts: uses contracts
yolo26-raspberry-pi-5/src/converter/export_yolo26n.py - Model export → Weight lowering: lowers weights
yolo26-raspberry-pi-5/src/converter/export_yolo26n.py - Model export → Model format: encodes model
yolo26-raspberry-pi-5/src/converter/export_yolo26n.py - Image frame → Detection API: provides frame
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/detector.py - Detection API → Tensor session: executes session
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/detector.py - Tensor session → Model loading: loads model
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/yolo26n.py - Tensor session → Native API: calls native API
yolo26-raspberry-pi-5/src/runtime/arm_yolo26n.cpp - Native API → Native preprocessing: dispatches preprocessing
yolo26-raspberry-pi-5/src/runtime/arm_yolo26n.cpp - Native API → Model store: loads weights
yolo26-raspberry-pi-5/src/runtime/arm_yolo26n.cpp - Native API → Fixed inference graphs: builds graphs
yolo26-raspberry-pi-5/src/runtime/arm_yolo26n.cpp - Native API → Inference schedule: runs schedule
yolo26-raspberry-pi-5/src/runtime/arm_yolo26n.cpp - Inference schedule → Memory planning: uses memory plan
yolo26-raspberry-pi-5/src/runtime/fixed_schedule.cpp - Inference schedule → Projection optimization: configures projections
yolo26-raspberry-pi-5/src/runtime/fixed_schedule.cpp - Detection API → Detection results: returns detections
yolo26-raspberry-pi-5/src/runtime/api/python/arm_yolo26n/detector.py - Model export → Model store: produces compatible artifact
- Camera examples → Detection API: uses API
- Video examples → Detection API: uses API