Catarman LGU Climate-Resilient SMART Traffic Light 8-week sprint · Oct 19 – Dec 14, 2026 · 3 members
Key point: The stock YOLOv8 model has no
tricycleorjeepneyclass and struggles with small toy vehicles seen from above. We must train our own model on photos of the exact toy vehicles used in the diorama. Counting, PCU scoring and MQTT are standard once detection works.
Owns detection accuracy. If the model can't tell a tricycle from a motorcycle, nothing downstream works.
tricycle, motorcycle, car, jeepney, van. Write a one-page labeling guide so labels stay consistent (e.g. "a tricycle box includes the sidecar").Owns the live system: camera → detection → counts → PCU → ESP32.
zones.json so they can be adjusted at the venue without code changes."status":"occluded"):Owns everything the dashboard and judges see from vision.
detections_hourly, violations, system_events (e.g. "camera occluded at 14:02"), with CSV export for the municipal licensing demo.| Item | Purpose | If we're lacking |
|---|---|---|
| Laptop (ideally NVIDIA GPU, 8GB+ RAM) | Runs YOLO, MQTT, servers | Intel CPU only: OpenVINO export at imgsz 416. Any CPU: ONNX Runtime + process every 2nd frame. |
| Smartphone, 1080p camera | Overhead camera | USB webcam works; 720p is enough at diorama scale. Bring a second phone as backup. |
| Overhead mount | Holds camera fixed above diorama | Gooseneck phone holder, ring-light stand, or DIY boom from PVC pipe/wood clamped to a table. Selfie stick taped to a chair works for early data collection. It must not move, or zones go out of alignment. |
| USB cables (phone + ESP32) | DroidCam over USB, serial fallback | DroidCam over USB instead of Wi-Fi = less lag, avoids venue interference. |
| Toy vehicles (several per class, same scale) | Training data and demo | Tricycle toys are hard to find: add a cardboard or 3D-printed sidecar to a toy motorcycle. Jeepney: toy van with a painted roof rack. Use the exact same toys for training and demo. |
| Desk lamp or LED strip | Consistent lighting | Any bright, steady lamp. Lighting changes between training and demo are a major cause of accuracy drops. |
| Pocket Wi-Fi or spare phone hotspot | Private local network | Don't rely on school or venue Wi-Fi. |
| Laptop cooling pad | Prevents thermal throttling | Raise the laptop so air flows underneath; keep it plugged in. |
| Tool | Purpose | Alternatives |
|---|---|---|
| Python 3.11 + VS Code | Main language/editor | PyCharm |
ultralytics |
YOLOv8 training and inference | — |
opencv-python |
Camera feed, image processing | — |
supervision (Roboflow) |
Ready-made zone counting, line crossing, box drawing | Write your own with OpenCV |
paho-mqtt + Mosquitto |
Messaging with ESP32 and dashboard | — |
| MQTT Explorer | View MQTT messages live while debugging | mosquitto_sub in terminal |
pyserial |
USB serial fallback | — |
| Flask or FastAPI | MJPEG stream + JSON API for Squad C | WebSocket with base64 frames |
sqlite3 (built in) + pandas |
Logging and CSV export | Plain CSV files |
| Roboflow (free tier) | Labeling, augmentation, YOLO export | CVAT, Label Studio, labelImg (fully offline) |
| Google Colab | Free GPU training | Kaggle Notebooks (~30 free GPU hrs/week) |
| OpenVINO / ONNX Runtime | Faster inference on CPU | — |
| Git + GitHub | Shared repo (/edge_vision) |
— |
| DroidCam or IP Webcam app | Phone as camera | Iriun Webcam |
topic: traffic/vision/approach
{"approach":"N","pcu":4.5,"counts":{"tricycle":3,"motorcycle":2,"car":2},"confidence":0.82,"ts":1729312000}
topic: traffic/vision/heartbeat (every 1 second)
{"status":"ok","fps":17.3}
Suggested PCU weights (confirm with Squad A): car 1.0 · tricycle 0.5 · motorcycle 0.3 · jeepney 2.0 · van 1.5
/docs/mqtt_schema.md, set up repo folder structure.zones.json; add ByteTrack with per-zone counts (test images/video for now).