Inferensys
AI Driver Safety cover

Case study / Driver monitoring AI

Multi-Modal Driver Monitoring System

AI Driver Safety is an in-cabin computer vision system for driver drowsiness detection, distraction detection, and phone-use detection.

It turns video into annotated clips, event logs, safety scores, and reports for fleet safety, ADAS, telematics, and automotive AI teams.

PythonOpenCVMediaPipe Face LandmarkerONNX RuntimeYOLO11NumPyPydantic

Project

AI Driver Safety

Category

Driver monitoring AI, drowsiness detection, and in-cabin sensing

Core loop

Video frame, landmarks, object detection, event scoring, alerts, report

Signals

Eye closure, yawning, drowsiness, distraction, phone use, vehicle context, sensor drowsiness

Outputs

Annotated MP4, event JSON, CSV, summary JSON, HTML report, screenshots

Repository

github.com/Inferensys/ai-driver-safety

Detection scope

What the system tracks.

Drowsiness

Eye closure, yawning, and drowsy state events across video frames.

Distraction

Head position, face presence, visible phone use, and attention signals.

Review data

Timestamp, frame index, signal, score, severity, landmarks, boxes, and metadata.

Demo

Demo video.

A real cabin clip running through the AI driver monitoring pipeline.

Drowsiness detection

Distraction and phone-use detection

Annotated MP4, JSON/CSV, and HTML report

Repository

Review the AI Driver Safety codebase.

Python package, config profiles, demo assets, architecture notes, edge guide, tests, and sample outputs.

github.com/Inferensys/ai-driver-safetySource repository

Core components

Driver monitoring AI components.

Computer vision, object detection, event rules, scoring, and exports.

Vision

Face landmarks

Measures eye aspect ratio, mouth movement, head position, and face presence.

Eye aspect ratioMouth aspect ratioHead offsetFace presence

Objects

Phone-use detection

Uses ONNX YOLO11 to identify visible cell phones.

ONNX RuntimeYOLO11Cell phoneDistraction

Signal logic

Event rules

Uses thresholds, frame counters, and cooldowns before recording an event.

Frame countersSmoothingThresholdsCooldowns

Scoring

Driver risk scoring

Combines fatigue, distraction, phone use, sensor, and vehicle signals.

Signal weightingSignal interaction rulesSeverityRisk score

Evidence

Report exports

Exports MP4, event JSON, CSV, summary JSON, and an HTML report.

MP4Events JSONCSVHTML report

Use cases

Use cases.

Fleet safety AI, ADAS driver monitoring, insurance telematics, and in-cabin sensing.

Fleet

Fleet safety monitoring

Detect drowsiness, distraction, and phone use across a trip.

Fleet safetyDriver coachingRisk reportsTrip review

ADAS

ADAS driver monitoring

Evaluate driver attention and readiness in assisted-driving prototypes.

ADASAttentionReadinessCabin camera

Telematics

Insurance telematics

Pair fatigue and distraction signals with harsh braking, lane drift, and speeding.

TelematicsHarsh brakingLane driftSpeeding

Fatigue

Driver fatigue detection

Track eye closure, yawning, drowsiness, and optional physiological signals.

FatigueEye closureYawningHeart-rate signal

Distraction

Phone-use and distraction detection

Detect visible phone use and head-position changes.

Phone useHead poseDistractionObject detection

Demo outputs

Screenshots.

Live monitor, event timeline, clip batch, and phone-use detection.

Live monitor

Live driver monitor.

Annotated frame, driver state, active events, and score.

Risk scoreDriver stateAnnotated frame
AI Driver Safety live monitor screenshot

Event timeline

Event timeline.

Timestamped drowsiness, yawning, eye-closure, distraction, and phone-use events.

TimestampSignalSeverity
AI Driver Safety event timeline screenshot

Batch summary

Batch summary.

Event counts, confidence, duration, and runtime details across demo clips.

Batch summaryEvent countsRuntime metrics
AI Driver Safety real human clip batch screenshot

Phone use

Phone-use detection.

Visible cell phone detection recorded as a phone_use event.

Cell phoneONNXphone_use
AI Driver Safety phone-use detection screenshot

Pipeline

From video frame to event log.

AI Driver Safety event timeline

01

Read video

The runtime reads video or webcam frames and wraps each one as a typed FramePacket.

02

Detect signals

Face landmarks produce eye, mouth, head-position, and face-presence signals. ONNX adds phone detection.

03

Apply rules

Counters, thresholds, and cooldowns control event creation.

04

Score driver state

The scorer combines fatigue, distraction, sensor, and vehicle signals.

05

Export files

The system writes annotated media, DetectionEvent records, timeline data, summary JSON, CSV, and HTML reports.

Edge deployment

Designed for local video analysis.

Runs locally with OpenCV and MediaPipe. Supports ONNX Runtime for object detection.

Baseline

CPU profile

The edge CPU profile processes every second frame and writes output at 15 FPS for local video or webcam demos.

CPU15 FPS outputVideo filesWebcam

Face

MediaPipe model

Runs the face landmark model locally.

Face landmarksLocal modelOpenCVFallback

Objects

ONNX detector path

Runs YOLO11 phone detection through ONNX Runtime.

YOLO11ONNXPhone detectorEdge accelerators

Performance

Runtime metrics

Reports FPS, latency, runtime FPS, detector provider, and fusion model.

Source FPSLatencyRuntime FPSProviders

Tuning

Config profiles

Profiles cover default, edge CPU, night driving, and phone demo runs.

DefaultEdge CPUNight drivingPhone demo

FAQ

Driver monitoring AI FAQ.

Answers for teams evaluating drowsiness detection, distraction detection, phone-use detection, ADAS, and edge AI.

What is an AI driver monitoring system?

An AI driver monitoring system uses in-cabin sensors such as cameras and optional physiological or vehicle data to detect driver attention, fatigue, distraction, drowsiness, phone use, and readiness.

How does AI Driver Safety detect drowsiness?

AI Driver Safety reads face landmarks for eye closure, mouth movement, head position, and face presence. It checks those signals over time before recording drowsiness, yawning, eye-closure, or distraction events.

Does the system detect phone use while driving?

Yes. The phone-use demo uses an ONNX YOLO11 detector to identify visible cell phones, records phone_use events, and includes them in the same safety timeline.

Can this run on edge devices?

Yes. The project runs locally with OpenCV and MediaPipe on CPU, and it documents an ONNX Runtime path for object detection and edge accelerators.

Is this certified automotive safety software?

It is research and demo software, not certified automotive safety software. It is suited for prototypes, demos, and workflow design before a production safety program.

Output gallery

Demo artifacts.

Video, timeline, batch view, and phone-use detection screenshots.

Live monitor screen

Live monitor

Event timeline screen

Event timeline

Clip batch screen

Clip batch

Phone-use detection screen

Phone-use detection

Contact

Talk to the team about your AI system.

Share what you are building, where you need help, and what needs to ship next. We will reply with the right next step.

01

NDA available

We can start under NDA when the work requires it.

02

Direct team access

You speak directly with the team doing the technical work.

03

Clear next step

We reply with a practical recommendation on scope, implementation, or rollout.

30m

working session

Direct

team access

Share the architecture, scope, and timeline so we can understand the work quickly.

NDA availableDirect team accessClear next step