File size: 1,338 Bytes
d9df0ce
 
 
 
 
 
d4a7ed6
d9df0ce
 
e002236
d4a7ed6
d9df0ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e002236
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: Driver Drowsiness Detection
emoji: 🚗
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: mit
paper: arxiv.org/abs/2505.17392
---

# Driver Drowsiness Detection System

This is a real-time driver drowsiness detection system that uses computer vision and deep learning to detect signs of drowsiness in drivers. The system can process webcam feeds, video files, and single images.

## Features

- Real-time webcam monitoring
- Video file processing
- Single image analysis
- Face detection and drowsiness prediction
- Visual feedback with bounding boxes and status indicators

## How to Use

1. **Webcam Mode**: Click the "Start Webcam" button to begin real-time monitoring
2. **Video Mode**: Upload a video file for processing
3. **Image Mode**: Upload a single image for analysis

The system will display the results with:
- Green box: Alert (not drowsy)
- Red box: Drowsy
- Probability score for drowsiness

## Technical Details

- Built with PyTorch and Vision Transformer (ViT)
- Uses OpenCV for face detection
- Gradio interface for easy interaction
- Real-time processing capabilities

## Model

The system uses a Vision Transformer (ViT) model trained on driver drowsiness detection. The model is capable of detecting subtle signs of drowsiness in facial expressions.