Design On-Device Distracted Driving Detection for an AI Dashcam

Last updated: November 29, 2026

Quick Overview

Design the end-to-end ML system that detects driver phone use and distraction on an in-cab dashcam with limited compute, decides which events to upload as video, and continuously improves the model from fleet data.

Motive
ML System Design
Machine Learning Engineer
Motive
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the end-to-end ML system that detects driver phone use and distraction on an in-cab dashcam with limited compute, decides which events to upload as video, and continuously improves the model from fleet data.

Motive's AI Dashcam runs dozens of vision models on a Qualcomm processor in the truck, alerts the driver in the cab, and uploads clips for review and coaching. This round checks whether you can balance model accuracy against latency, thermal and bandwidth limits, and whether you understand that false positives in the cab cost driver trust.

What the Interviewer Expects
  • Define the event precisely and pick precision and recall targets for in-cab alerts versus manager review
  • Design an on-device pipeline: frame sampling, detection, temporal smoothing, alert logic
  • Address compute, thermal and quantization constraints
  • Decide what to upload and when, given cellular cost
  • Close the loop with human review labels, active learning, and staged OTA rollout
  • Plan for night, glare, sunglasses, varied cab layouts and privacy
Key Topics to Cover
edge inference
quantization
temporal smoothing
active learning
OTA model rollout
precision recall
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would you measure model quality in the field when you only see uploaded events?
  • How would you roll back a model that doubles false alerts for one camera mounting position?
  • How would you handle drivers who cover the camera?
  • What would you change to detect drowsiness rather than phone use?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Detect phone use (handheld, at ear, texting) and eyes-off-road distraction while the vehicle is moving above a speed threshold. In-cab alert latency under 1 second, so it must run on device. Targets: ...

High-Level Design

Driver-facing frames at 5 to 10 fps go to a small quantized backbone shared by several heads (face and head pose, hand and phone detection, gaze). Per-frame scores feed a temporal module (an exponenti...


Submit Your Answer
Markdown supported

Related Questions