Raspberry Pi Vehicle-Triggered LED
Budget: €30 – €250 EUR
I need a compact, reliable vision script for a roadside Raspberry Pi that spots any passing vehicle and immediately drives one GPIO pin high so a connected LED glows solid for a preset time, then turns off until the next detection.
Key context
• Location: mounted outdoors at curbside, so daylight changes, headlights at night, and occasional rain or dust are all realities.
• Target class: vehicles only—cars, trucks, motorbikes. Faces, animals, or other motion must be ignored.
What I already have
– Raspberry Pi 4 with camera module (HQ and wide-angle lens)
– Single 5 mm LED on a breadboard wired to GPIO with resistor
– Basic familiarity with Python
What I need from you
1. A Python/OpenCV or TensorFlow Lite script that loads on boot, watches the live video feed, and asserts a GPIO pin when confidence passes the vehicle threshold.
2. Model weights (custom-trained or pruned COCO, your choice) that run in real time at ≥10 fps on-device without a TPU.
3. Simple config file or command-line flag to set LED-on duration, confidence level, and optional masking zone.
4. Wiring diagram and step-by-step setup guide: package installs, auto-start service, camera calibration, and any system tweaks for headless operation.
5. Quick test video or on-site logs showing at least 90 % detection accuracy with negligible false positives from pedestrians or background noise.
Once the Pi lights the LED solidly whenever a vehicle passes—and only then—the job is done.
Key context
• Location: mounted outdoors at curbside, so daylight changes, headlights at night, and occasional rain or dust are all realities.
• Target class: vehicles only—cars, trucks, motorbikes. Faces, animals, or other motion must be ignored.
What I already have
– Raspberry Pi 4 with camera module (HQ and wide-angle lens)
– Single 5 mm LED on a breadboard wired to GPIO with resistor
– Basic familiarity with Python
What I need from you
1. A Python/OpenCV or TensorFlow Lite script that loads on boot, watches the live video feed, and asserts a GPIO pin when confidence passes the vehicle threshold.
2. Model weights (custom-trained or pruned COCO, your choice) that run in real time at ≥10 fps on-device without a TPU.
3. Simple config file or command-line flag to set LED-on duration, confidence level, and optional masking zone.
4. Wiring diagram and step-by-step setup guide: package installs, auto-start service, camera calibration, and any system tweaks for headless operation.
5. Quick test video or on-site logs showing at least 90 % detection accuracy with negligible false positives from pedestrians or background noise.
Once the Pi lights the LED solidly whenever a vehicle passes—and only then—the job is done.
Related categories:
Python
Linux
Software Architecture
Arduino
Raspberry Pi
OpenCV
Embedded Systems
Video Processing
Computer Vision
Automation