Quick Start Guide
Get YOLO-Pi running on your hardware in just a few steps. This guide will walk you through the fastest path to real-time object detection.Prerequisites
Before you begin, ensure you have:Hardware
- Raspberry Pi 3 or newer (or x86 computer for testing)
- USB camera or Raspberry Pi Camera Module
- 8GB+ microSD card
- Internet connection
Software
- Docker installed (recommended), or
- Python 3.5+ with pip
- Git for cloning the repository
Installation Methods
Choose the installation method that best fits your needs:- Docker (Recommended)
- Manual Installation
Docker provides the fastest setup with all dependencies pre-configured.Continue to Model Setup below.
Build the Docker image
For x86/x64 systems (MacBook, Linux workstation):For Raspberry Pi:
Building on Raspberry Pi can take 6-12 hours. Consider using pre-built images or building on x86 first.
Model Setup
Download and convert a pre-trained YOLO model to Keras format.Download YOLO model
Download the tiny-yolo-voc model (recommended for Raspberry Pi):
The tiny-yolo-voc model provides a good balance between speed and accuracy for edge devices.
Convert to Keras format
Use the YAD2K converter to create a Keras model:This creates
tiny-yolo-voc.h5 which contains the Keras model.Configuration
Configure YOLO-Pi to use your model and MQTT broker.Set MQTT broker
Set the MQTT environment variable:Replace with your MQTT broker hostname or IP address.
First Detection
Run YOLO-Pi and start detecting objects!Start the detection script
- Load the YOLO model
- Connect to your MQTT broker
- Start capturing from the camera
- Process frames and detect objects
Monitor detections
Watch the console output for detected objects:Detections are also published to the MQTT topic
yolo in JSON format.Performance Expectations
Detection speed varies by hardware:| Hardware | FPS | Notes |
|---|---|---|
| Raspberry Pi 3 | ~0.5 FPS | One frame every 2 seconds |
| Raspberry Pi 4 | ~1 FPS | Improved performance |
| MacBook Pro | ~5-10 FPS | M1/M2 or recent Intel |
Visualization (Optional)
By default, visualization is disabled. To see the detection output:- Edit
src/yolo-pi.py - Uncomment line 174:
- Run the script with display access
Next Steps
Model Conversion
Learn how to convert other YOLO models
MQTT Integration
Integrate detections with your IoT platform
Raspberry Pi Setup
Optimize for Raspberry Pi hardware
Production Deployment
Deploy in production environments
Troubleshooting
Camera not detected
Camera not detected
Ensure your camera is connected and recognized:You should see
/dev/video0. If using Docker, ensure the device is passed with --device=/dev/video0:/dev/video0.MQTT connection failed
MQTT connection failed
Check the MQTT broker is accessible:Verify the MQTT environment variable is set:
Out of memory errors
Out of memory errors
Model loading errors
Model loading errors
Verify all model files exist:Ensure the paths in
yolo-pi.py match your actual file locations.Get Help
View Full Documentation
Explore comprehensive guides, API reference, and deployment options

