Zyra ADAS
Real-time object detection and lane tracking on Android with on-device NCNN inference
- Status
- Live
- Version
- 0.1.0-phase6
- Platform
- Android app
- License
- MIT
L2 driver assistance in cars is expensive, yet most of the work is computer vision on a small SoC that phones already have. Zyra uses the phone's camera, GPU and sensors to run perception in shadow mode, with no vehicle control.
How it is put together.
Zyra ADAS is an Android app that runs a shadow-mode L2 ADAS on a phone: it watches the road and predicts what an L2 system would do, without controlling the vehicle. A Flutter UI talks over dart:ffi to a C++17 NDK engine that runs YOLOv8 object detection with NCNN (Vulkan or CPU fallback) and a classical Hough-based lane detector. All inference runs on the device; the README states the app uploads no frames and needs no sign-in.
- 1
Flutter UI
Vehicle select and drive screens with camera preview, lane and detection overlay painters, FPS and status bars
lib/features/ - 2
Dart FFI bridge
ZyraEngine opens libzyra_perception.so; submitFrame passes YUV planes, pollDetections returns a detection batch
lib/core/ffi/ - 3
Native engine
Producer/consumer worker with a bounded queue and mutex-guarded result slot
android/app/src/main/cpp/src/engine.cpp - 4
YOLOv8 detector
YUV preprocess and letterbox, NCNN inference, per-class NMS and COCO-to-Zyra class mapping
android/app/src/main/cpp/src/detector.cpp - 5
Hough lane detector
Y plane, ROI, Canny, HoughLinesP, line fit
android/app/src/main/cpp/src/lane.cpp
Specification.
- Object detection
- YOLOv8 via NCNN; pedestrians, cyclists, cars, trucks, motorcycles, auto-rickshaws, traffic lights, traffic signs
- Lane tracking
- Canny + HoughLinesP + trapezoid ROI + weighted line fit, confidence-keyed overlay
- Inference backend
- NCNN with Vulkan FP16 + Winograd; automatic CPU fallback
- Vehicle profiles
- Car or Scooter; mount height, max decel and FCW TTC thresholds passed to the engine
- Frame scheduling
- Single-producer single-consumer bounded queue; older frame dropped on overrun
- Native bridge
- dart:ffi to a single shared object, libzyra_perception.so (arm64-v8a)
- Cloud dependency
- None; all inference on device
- Minimum device
- Android 11 (API 30), arm64-v8a, 4 GB RAM
- Runs on
- Flutter Android app with a C++ NDK engine; built as an APK and installed on a physical device
Releases.
- v0.1.0-phase6v0.1.0 Phase 6: Detection + Lane Tracking
More systems.
Real-time, on-device driver assistance for any Android phone.
Perception and ADAS · LiveDashLabTrain object detectors and visual models on dashcam footage without labelling any of it
Next systemDRIVOXAI dashcam for Android: real-time computer vision with black box recording