A browser-based Advanced Driver Assistance System (ADAS) dashcam that runs entirely on your device — no server, no cloud. Point your phone or laptop camera at the road and get real-time object detection, collision warnings, lane departure alerts, driver drowsiness monitoring, and automatic incident recording.
- Visit and.github.io/dashcam/ in your browser (Chrome or Firefox recommended)
- Grant camera and location permissions when prompted
- Tap START ADAS to initialise the detection engine
- Mount your device so the camera faces the road ahead
The app uses an on-device AI model (COCO-SSD via TensorFlow.js) to detect road hazards in real time:
- People, cyclists, motorcycles, animals, vehicles, traffic lights, stop signs
- Each detected object is assigned a threat level (0–100) based on its size, position, and closing speed
- The screen border and an audio beep indicate the current danger level:
- Green — clear
- Amber — caution
- Orange — warning
- Red — danger / imminent collision
The side panel lists every detected object with its confidence score and individual threat bar.
Two horizontal lines are overlaid on the camera feed:
- Caution zone (amber dashed line) — objects crossing this line trigger a caution alert
- Danger zone (red dashed line) — objects crossing this line trigger a danger alert
You can drag both lines up or down in Settings to exclude your vehicle's bonnet from the detection area.
Speed is shown in the panel in km/h. The app fuses two sources:
| Source | How it works |
|---|---|
| GPS | Uses the device's built-in GPS (when available) |
| Camera (visual) | Estimates motion from frame-to-frame optical flow; self-calibrates when GPS is also active |
When enabled, the app detects lane markings and alerts you (with a voice announcement) if the vehicle drifts across a lane boundary.
Enable in Settings → Lane Detection.
Periodically checks whether the driver is alert. Every ~45 seconds the system briefly activates the front camera and analyses eye openness. If sustained eye closure is detected:
- A red DROWSINESS DETECTED overlay flashes on screen
- An audio alarm sounds
- On-screen text instructs you to pull over safely
Enable in Settings → Driver Monitor.
The app maintains a rolling video buffer (10 minutes by default). When a high-danger event is detected, that clip is automatically saved to the Gallery.
- Gallery (
🎬button) — browse and play saved incident clips - Trips (
📍button) — browse past trips by calendar date; tap a trip to see a GPS map and event log
| Control | What it does |
|---|---|
SWITCH CAM button |
Toggle between front and rear camera |
SENS button |
Cycle detection sensitivity: LOW / MED / HIGH |
⚙ (top-right) |
Open Settings |
🎬 (top-right) |
Open Gallery of saved clips |
📍 (top-right) |
Open Trips history |
Open with the ⚙ button.
| Setting | Description |
|---|---|
| Verbose Mode | When on, the app narrates every detected object aloud. Off by default — only critical alerts are spoken. |
| Sensitivity | LOW / MED / HIGH. Higher sensitivity detects objects at lower confidence, producing more alerts. |
| Lane Detection | Enable/disable lane departure warnings. |
| Driver Monitor | Enable/disable periodic drowsiness checks. |
| Recording Retention | How long of a rolling buffer to keep (5 – 30 minutes). |
| Detection Zones | Sliders to move the Caution and Danger zone lines. Push them down if your bonnet is triggering false alerts. |
Settings are saved automatically and persist between sessions.
- A modern browser with WebGL support (Chrome 90+, Firefox 88+, Safari 15+)
- A camera (rear-facing recommended for road detection, front-facing for driver monitoring)
- Location permission for GPS speed (optional but recommended)
- Served over HTTPS or
localhost
No installation, no account, no internet connection required after the page loads. All AI inference runs locally on your device.
- False bonnet alerts? Go to Settings → Detection Zones and drag the Caution/Danger sliders down until the bonnet is below both lines.
- Slow on older devices? Set Sensitivity to LOW — this raises the confidence threshold and reduces the number of objects processed per frame.
- No GPS speed? The camera-based optical flow estimator will self-calibrate once it has a few seconds of data, but accuracy improves significantly with GPS active.
- Portrait vs landscape? The UI adapts to both orientations. Landscape gives a wider camera view; portrait stacks the panel below the feed.