E-scooter dashcam prototype for Raspberry Pi 5 + QNX 8. Live camera frames go through TensorFlow Lite object detection and OpenCV traffic-light colour checks; warnings show on an OLED, sound on a GPIO buzzer, and optional telemetry goes to an HTTP endpoint.
Prototype only β not a certified driver-assistance or emergency-warning system. Do not rely on it for real-world safety decisions.
Built from QNXβs ai-camera-app sample. Cross-compile on a Fedora x86_64 host; run on the Pi (never build on the Pi).
| Path | Role |
|---|---|
ai-camera-app/ |
C++ application (detection, warnings, OLED, buzzer, uploaders) |
scripts/ |
build_all.sh, deploy.sh, setup-pi.sh, GPIO/I2C test tools |
SETUP.md |
First-time Fedora + QNX SDP setup |
AGENTS.md |
Day-to-day build β upload β run loop |
ROADMAP.md |
Feature checklist |
Dependency clones (build-files, tensorflow, opencv, muslflt, numpy) live as siblings under ~/qnx_workspace/ and are not tracked here β see SETUP.md.
- SSD MobileNet (COCO) β cars, trucks, buses, bikes, pedestrians, traffic lights
- HSV traffic-light colour β red / yellow / green from the detection ROI
- GPS speedβaware danger β e.g. red-light alarm only when approaching fast (
GPS_DEVICE) - SSD1306 OLED β speed, GPS state, light colour, stacked warnings
- GPIO buzzer β danger-scaled beep patterns + green-light chirp
- Telemetry + JPEG snapshots β JSON heartbeats / frames via libcurl
- Multi-camera β one detection pipeline per camera on device
Camera Module 3 βββΊ QSF / camapi βββΊ OpenCV frame
β
βΌ
TensorFlow Lite detector
/ \
vehicles traffic-light ROI
β β
β OpenCV HSV colour
βββββββββββ¬ββββββββββββ
βΌ
DangerMonitor
/ | \
OLED buzzer telemetry
Full environment setup (license, SDP, dependency clones, camera enable): SETUP.md.
Once the Fedora workspace exists:
cd ~/qnx_workspace
source env/bin/activate # cmake < 4
JOBS=4 ./scripts/build_all.shBinary: ai-camera-app/nto/aarch64/o.le/ai-camera-app
Deploy and run:
TARGET_HOST=PI_IP TARGET_USER=qnxuser ./scripts/deploy.sh
# on the Pi
cd /data/home/qnxuser/qnx-traffic-ai
export LD_LIBRARY_PATH="$PWD/lib:$LD_LIBRARY_PATH"
./ai-camera-appDay-to-day rebuild / SFTP details: AGENTS.md.
- Raspberry Pi 5 + QNX 8 quick-start image
- Raspberry Pi Camera Module 3 (connector nearest the USB ports)
- Optional: GPS on a serial device, SSD1306 OLED (I2C), piezo on GPIO
Do not reinstall the Sensor Framework via apk on the Pi β see SETUP.md.
Upstream QNX AI Camera App is Apache License 2.0. Keep its copyright/license headers on modified sample files; add your own notice only on new work.