Fast object detection on Raspberry Pi 5 with YOLOv11n.
Project details
YOLOv11n provides an efficient object detection solution optimized specifically for Raspberry Pi 5. This C implementation runs faster and has a minimal footprint compared to its Python counterpart, making it ideal for embedded applications. Instant start-up and offline capabilities enhance its usability in various environments.
The YOLOv11n project provides a highly optimized object detection solution for the Raspberry Pi 5, utilizing advanced ARM NEON intrinsics. The core of this repository is a prebuilt library that facilitates quick and efficient inference of the YOLOv11n model. This implementation is designed not only for performance but also for ease of use in embedded systems.
data/dog.jpg (768×576) in approximately 310 ms, which is about 1.4 times faster than the corresponding Python version while maintaining identical detection levels.lib/libyolov11n.so. A small demo command-line interface utilizes the public API found in inc/yolov11n.h.The performance was evaluated on the Raspberry Pi 5 with a Cortex-A76 processor featuring four cores. Below are the latency results along with the number of detections for both implementations:
| Implementation | Total Time (ms) | Detections |
|---|---|---|
| C (ARM NEON) | ~309 | 4 |
| Python (ultralytics) | ~429 | 4 |
Both implementations produce consistent detections from the same input image:
C (NEON): Python (ultralytics):
bicycle: 0.937 [128,136,567,419] dog: 0.921 [132,221,310,540]
dog: 0.930 [132,221,310,540] bicycle: 0.914 [129,137,565,418]
truck: 0.501 [469,74,691,173] truck: 0.499 [470,75,692,171]
car: 0.490 [471,74,692,172] car: 0.458 [471,75,693,171]
This project targets users seeking an efficient and effective object detection solution for the Raspberry Pi environment, combining ease of use with high performance.
The repository is organized as follows:
yolov11n_raspberry_pi/
├── run.sh # Quick build & run script (C or --py, --bench)
├── CMakeLists.txt # Builds the demo CLI against the prebuilt library
├── README.md # This file
├── LICENSE # MIT License
├── lib/
│ └── libyolov11n.so # Prebuilt inference engine (ARM NEON, ~100-frame trial)
├── inc/
│ └── yolov11n.h # Public API (only header needed to use the library)
├── src/
│ └── main.c # Demo CLI using the public API
├── python/
│ ├── predict.py # Official ultralytics reference
│ └── benchmark.py # C vs Python benchmark
└── data/
├── dog.jpg / bus.jpg # Sample images
└── coco_names.txt # COCO class names
This structured layout facilitates easy navigation and utilization of the library, while also ensuring that all necessary components for running and testing the object detection capabilities are readily available.
Comments
0Start the conversation
Share the first comment.