Skip to content
Β 
Β 

Latest commit

Β 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QNX Traffic AI

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).

What’s in this repo

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.

Features

  • 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

Architecture

Camera Module 3 ──► QSF / camapi ──► OpenCV frame
                                         β”‚
                                         β–Ό
                              TensorFlow Lite detector
                                 /              \
                          vehicles            traffic-light ROI
                              β”‚                     β”‚
                              β”‚              OpenCV HSV colour
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β–Ό
                                 DangerMonitor
                          /        |         \
                     OLED       buzzer     telemetry

Quick start

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.sh

Binary: 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-app

Day-to-day rebuild / SFTP details: AGENTS.md.

Hardware

  • 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.

Licensing

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.

Upstream

About

E-scooter safety dashcam for Raspberry Pi 5 + QNX 8: TFLite detection, OpenCV traffic-light checks, OLED & buzzer alerts - cuHacking 7 Winner. πŸ…

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages