This project implements a low-cost, distributed computer vision system for real-time object detection.
The resource-constrained ESP32-CAM acts as a wireless IP camera streaming MJPEG over Wi-Fi, while a more powerful device (Raspberry Pi or Windows PC) handles YOLOv3-Tiny inference.
- Distributed Processing: Offloads intensive YOLO inference from the microcontroller to a host computer (Pi/PC)
- Real-Time Streaming: Uses ESP32-CAM's built-in web server to stream video via MJPEG
- YOLOv3-Tiny: Lightweight YOLO model for faster CPU-based detection
- Cross-Platform Detection: Python script works on both Raspberry Pi OS (Linux) and Windows
The system operates in two main stages:
- Captures video frames using
esp32_cam_streamer.ino - Hosts a video stream endpoint (e.g.,
http://192.168.1.123/stream)
- Python script (
yolo_detector.py) connects to the ESP32-CAM MJPEG stream - Performs YOLOv3-Tiny object detection using OpenCV DNN module
- Displays annotated results in real-time
| Component | Technology | Role |
|---|---|---|
| Edge Compute | ESP32-CAM | Video capture & MJPEG streaming |
| Firmware | Arduino IDE (C++) | ESP32-CAM streamer code |
| Host Compute | Raspberry Pi / PC | Runs object detection script |
| Detection | Python, OpenCV (DNN) | Connects to stream, performs YOLO inference |
| Model | YOLOv3-Tiny | Pre-trained on COCO dataset |
Download the following YOLOv3-Tiny files and place them in the same directory as yolo_detector.py:
| File | Description | Download Link |
|---|---|---|
yolov3-tiny.cfg |
Model configuration file | Download |
yolov3-tiny.weights |
Pre-trained weights (~34MB) | Download |
coco.names |
Class names (person, car) |
Download |
- Open
esp32_cam_streamer.inoin Arduino IDE - Update Wi-Fi SSID and password
- Flash the code to ESP32-CAM
- Note the IP address printed on Serial Monitor (e.g.,
192.168.1.123)
- Install Python and dependencies:
pip install numpy opencv-python