Lyne ADAS

Real-time, on-device driver assistance for any Android phone.

Status
Live
Version
2.0.0
Platform
Android app
License
MIT
01 · Problem

v1 estimated distance from box size alone, so detector jitter became metres of range noise and phantom collision warnings; v2 rebuilds the chain from pixels to alerts to fix this. The app aims to give forward-collision and related warnings offline on ordinary Android phones.

02 · Architecture

How it is put together.

Lyne is a warning-only (Level 1) driver assistance app: mounted on the windshield, the phone's camera watches for vehicles you are closing on, pedestrians and riders in your path, tailgating, lane drift and speed limits. Every model runs on the phone with no cloud or account. A capability probe picks a device tier so one APK runs from a 2 GB budget phone to a flagship. v2 rebuilt the range and TTC chain with ground-plane plus width range cues, inverse-depth Kalman tracking and significance-tested collision warnings.

Camera captureapp/src/main/java/com/lyne/…Perceptionapp/src/main/java/com/lyne/…Motion and locationapp/src/main/java/com/lyne/…Tracking and risk logicapp/src/main/java/com/lyne/…Alertsapp/src/main/java/com/lyne/…Logs and dashcamapp/src/main/java/com/lyne/…Device tieringapp/src/main/java/com/lyne/…framesframesobjects, drivable area, signsobjects, drivable area,…pitch, roll, yaw, GPS speedpitch, roll, yaw, GPS s…gated eventsgated eventsevents, logsevents, logsCamera captureapp/src/main/java/com/lyne/…Perceptionapp/src/main/java/com/lyne/…Motion and locationapp/src/main/java/com/lyne/…Tracking and risk logicapp/src/main/java/com/lyne/…Alertsapp/src/main/java/com/lyne/…Logs and dashcamapp/src/main/java/com/lyne/…Device tieringapp/src/main/java/com/lyne/…framesframesobjects, drivable area, signsobjects, drivable area,…pitch, roll, yaw, GPS speedpitch, roll, yaw, GPS s…gated eventsgated eventsevents, logsevents, logs
FIG. 01Modules and data flows, from the repository layout and documentation.
  1. 1

    Camera capture

    CameraX frames with sensor timestamps, copied into pooled buffers; analyzer never blocks

    app/src/main/java/com/lyne/adas/l1/camera/
  2. 2

    Perception

    LiteRT object detector, drivable-area segmentation and sign classifier on a single inference thread

    app/src/main/java/com/lyne/adas/l1/inference/
  3. 3

    Motion and location

    Gravity + gyro for pitch, roll, yaw; GPS speed; ambient light

    app/src/main/java/com/lyne/adas/l1/sensors/
  4. 4

    Tracking and risk logic

    Tracker, range cues, per-track Kalman, looming-rate fit, yaw-curved corridor, alert gates

    app/src/main/java/com/lyne/adas/l1/fusion/
  5. 5

    Alerts

    Tones, haptics and offline voice cues

    app/src/main/java/com/lyne/adas/l1/alerts/
  6. 6

    Logs and dashcam

    Ring-buffer event clips and accuracy logging

    app/src/main/java/com/lyne/adas/l1/recording/
  7. 7

    Device tiering

    Capability probe, tier selection, thermal management

    app/src/main/java/com/lyne/adas/l1/perf/
03 · Capabilities

Specification.

Warnings
Forward collision, pedestrians and riders, headway/tailgating, lane departure, speed signs + overspeed, traffic moving
Models
YOLOv8n INT8 (objects), TwinLiteNet (drivable area), GTSRB MobileNetV3 INT8 (speed limits), classical CV fallback
Range and TTC
Ground-plane + width-prior range fused in inverse depth; per-object Kalman filter; looming-rate TTC with 2σ/3σ significance gates
Device tiers
Tier A/B/C chosen by a capability probe; NNAPI/GPU or XNNPACK CPU backends; target 30 / 15 / 8 fps
Calibration
Mount pitch/roll from gravity sensor, vehicle-height presets, online camera-height auto-calibration, known-gap range check
Simulation suite (app/src/test)
False collision warnings in 20 min random traffic: v1 626, v2 0; mean range error 7.9 m (v1) vs 2.0 m (v2), synthetic drives
Recording
Event dashcam ring buffer, trip history with route map, per-frame accuracy CSV log
Platform
Android 8+ (minSdk 26, target 35), works offline
Runs on
Android app distributed as an APK; Kotlin + Jetpack Compose + CameraX
Stack
  • Kotlin
  • Jetpack Compose
  • CameraX
  • LiteRT (TensorFlow Lite)
  • Kotlin coroutines
  • Play Services Location
  • DataStore
  • Python (model conversion scripts)
04 · Changelog

Releases.

  1. v2.0.0
    Accuracy overhaul, auto-calibration, a new HUD and a documentation site.
  2. v1.2.0
  3. v1.1.0
  4. v1.0.0