|
|
--- |
|
|
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. |