Design On-Device Distracted Driving Detection for AI Dash Cams

Last updated: November 29, 2026

Quick Overview

Design the ML system that detects phone use and other distracted driving from a driver-facing camera running on the dash cam itself, alerts the driver in-cab within a second, and uploads only the relevant clips for coaching.

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

0

0

0 solved


Design the ML system that detects phone use and other distracted driving from a driver-facing camera running on the dash cam itself, alerts the driver in-cab within a second, and uploads only the relevant clips for coaching.

Samsara's AI Dash Cams run computer vision at the edge to flag behaviors like mobile usage and inattention, then send clips to safety managers. The interviewer checks that you design for constrained hardware, privacy, a precision bar that keeps drivers from tuning out alerts, and a data loop from reviewed clips back into training.

What the Interviewer Expects
  • State latency, compute and power budgets on the device
  • Choose a compact model and a temporal smoothing layer over per-frame scores
  • Define precision and recall targets and how in-cab and cloud thresholds differ
  • Build a labeling loop from safety manager reviews and dismissals
  • Plan staged model rollout with shadow mode and per-cohort metrics
  • Address privacy, night IR imagery, and diverse drivers and cabs
Key Topics to Cover
Edge inference
Computer vision
Temporal smoothing
Active learning
Model rollout
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 detect model degradation on a new camera mount or vehicle type?
  • How do you use dismissed alerts without biasing the training set?
  • What changes for a model that must work at night with IR only?
  • How would you decide between a single multi-task model and separate models?
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

Functional: detect handheld phone use, looking down, and eyes off road for a sustained period; play an in-cab audio alert; upload a short clip plus metadata for review. Non-functional: runs on an embe...

High-Level Design

On device: frame sampler -> quantized (int8) detector or keypoint model (face, hands, phone) -> per-frame behavior scores -> temporal module (exponential smoothing or a small sequence model over 2 to ...


Submit Your Answer
Markdown supported

Related Questions