Run Ultralytics YOLO on Raspberry Pi with OpenVINO¶
OpenVINO provides a repeatable deployment layer for running Ultralytics YOLO models on the Arm64 CPU in Raspberry Pi 4 and Raspberry Pi 5. It does not require an external NPU, making it a useful baseline for prototypes, low-frame-rate detection, and systems where cost or hardware availability matters more than maximum throughput.
This guide installs the official Arm64 Python wheels, exports a YOLO model to OpenVINO IR, enables compiled-model caching, runs image and camera inference, and turns the pipeline into a maintainable service.
When OpenVINO is the right choice¶
Choose this path when:
- You want to use the Pi CPU without a Coral or Hailo accelerator.
- You need a standard model-conversion and runtime workflow.
- Startup time and reproducible deployment matter.
- The workload can tolerate the performance of a CPU-only pipeline.
- You may later deploy the same high-level application on other OpenVINO targets.
Raspberry Pi 5 has considerably more CPU headroom than Raspberry Pi 4, but both should use a 64-bit OS. Cooling and power are part of the design for sustained inference.
1. Prepare Raspberry Pi OS¶
Use current 64-bit Raspberry Pi OS on Raspberry Pi 4 or 5:
Expect aarch64. Update the system and install runtime libraries:
Create a clean virtual environment:
Verify that OpenVINO sees the CPU plugin:
The output should include CPU.
2. Export a small YOLO model¶
Start with the smallest nano model supported by your installed Ultralytics release. The official 2026 workflow demonstrates YOLO26:
Run the export:
The generated directory contains OpenVINO IR files. Validate the plain export before experimenting with half, int8, dynamic shapes, or embedded NMS.
INT8 expectations on Arm
Do not assume that an INT8 export guarantees faster inference on Raspberry Pi. OpenVINO documents quantised execution on Arm as simulation through floating-point execution for relevant operations. Benchmark the exact release, model, and input shape.
3. Test inference with Ultralytics¶
Run detection on an image:
If memory use or latency is too high, try imgsz=416 or imgsz=320. Changing image size affects small-object accuracy, so validate with representative images rather than a single demo frame.
4. Use OpenVINO Runtime directly¶
Direct runtime control is useful when you need deterministic startup, caching, and service-level instrumentation:
Compiled-model caching reduces repeated startup work after the first run. It is especially valuable for a service that restarts after power loss or automatic updates.
5. Run a camera pipeline¶
First confirm that the camera works:
For Python applications, use Picamera2 installed from Raspberry Pi OS:
Because Picamera2 is installed as a system package, recreate the environment with system-package access if required:
A simple capture-and-detect loop:
This intentionally omits a preview window. Establish stable capture and inference first, then add display, tracking, alerts, or recording.
6. Benchmark the complete pipeline¶
Do not quote a frame rate without recording the conditions:
Record:
- Pi model and RAM
- Raspberry Pi OS and OpenVINO versions
- YOLO model and input size
- Confidence threshold and enabled tasks
- Camera resolution
- Cooling and CPU temperature
- End-to-end FPS, not model-only FPS
- First-run and warm-start latency
Monitor throttling in another terminal:
7. Performance tuning¶
Apply one change at a time:
- Use a nano model.
- Reduce inference size from 640 to 416 or 320.
- Process every second or third camera frame.
- Keep capture resolution independent from inference resolution.
- Enable OpenVINO's compiled-model cache.
- Avoid drawing boxes or encoding video inside the measured inference loop.
- Use active cooling on Raspberry Pi 5.
If the application requires high frame rates, multiple models, or a large amount of CPU-side application logic, compare a dedicated accelerator rather than continuing to reduce accuracy.
8. Run as a systemd service¶
Create /etc/systemd/system/openvino-yolo.service:
Replace the username and paths, then enable it:
Troubleshooting¶
No matching distribution found for openvino¶
Confirm uname -m returns aarch64, use a supported Python version, upgrade pip, and use current Raspberry Pi OS. Old 32-bit or outdated user space will not match current Arm64 wheels.
OpenVINO does not list CPU¶
Reinstall inside a clean environment and inspect the package:
Export succeeds but inference fails¶
Delete the generated export and cache, then export the plain model without optional precision or dynamic-shape arguments. Confirm that model files are complete and readable.
Camera import fails in the virtual environment¶
Use --system-site-packages so the environment can access the APT-provided Picamera2 bindings.
Licensing and related guides¶
Ultralytics models and software have licensing requirements. Review the current AGPL and enterprise terms before embedding YOLO in a proprietary or commercial product.