Skip to content

Repository files navigation

dashradar.app

Turn a dash-mounted phone into an on-device, computer-vision police detector. A custom model watches the road through the camera and drives a signal meter that climbs as a patrol vehicle comes into view, with an optional beep. You read it at a glance; your eyes stay on the road.

No account, no recording, no images leave the phone.

Why on-device

Crowd-sourced apps like Waze are only as good as the crowd nearby: no alert reaches you until another driver has reported that patrol car. This app looks at the road itself, so it works right away, without having to wait for another driver to report something first.

Sending each frame to a cloud vision model like Claude or ChatGPT doesn't fit either. This isn't take a photo, get an answer: nobody taps anything, and the camera is scanned on its own about once a second for as long as the drive lasts. That's thousands of frames an hour someone would have to pay for and everything the phone's camera sees while the app is open would land on someone else's servers.

So one of the challenges this app takes on is doing the detection on-device: in the browser, on the phone's GPU, with frames that never leave the device.

Features

  • Glanceable signal meter that climbs as a patrol vehicle appears, with an optional beep. No scene to parse, no map to study.
  • 3D scene view, one tap from the meter: what the detector sees, placed on a ground grid at its estimated distance and direction.
  • Fully on-device: inference runs in the browser through onnxruntime-web on WebGPU, finishing each scan in under a second.
  • Offline PWA: install it to the home screen and it works with no connection after the first launch.

Known issue: iPhone stability

We are unfortunately seeing frequent, intermittent crashes on iPhones: Safari sometimes kills and reloads the page mid-scan, and can give up entirely after repeated kills. Every Android device we have tested runs fine. The root cause is not yet fully pinned down; mitigations and diagnostics have shipped, and docs/iPhone.md tracks the evidence, what has been ruled out, and the remaining suspects.

Getting started

pnpm install
pnpm dev   # http://localhost:5173

Other commands:

pnpm build       # Production build (vite build → dist/)
pnpm start       # Serve the production build (vite preview)
pnpm test        # Run tests once (vitest run)
pnpm test:watch  # Run tests in watch mode
pnpm check       # Verify formatting + lint + typecheck
pnpm format      # Auto-fix formatting (prettier --write)

The model

A custom RF-DETR Nano checkpoint, published as ONNX at tuxracer/las-vegas-metro-rfdetr-nano. It recognizes Las Vegas Metro patrol vehicles best today, since they make up most of the training data, and the training set keeps growing toward broader coverage. The app streams the weights from Hugging Face on first launch.

The model is not baked in. docs/Models.md describes what a checkpoint has to look like to run here: tensor signature, head layout, precision, and how to register it.

History

This started in 2022 as a hand-written prototype built on TensorFlow.js and a stock COCO object detector, and was rewritten from scratch in 2026 around a purpose-trained model on WebGPU. docs/Legacy.md covers where it came from and what changed.

Contact

Mastodon: @tuxracer@fosstodon.org

License

MIT

About

Turn your phone into an on device computer vision police detector, spotting patrol vehicles on the road in real time

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages