A computer vision-based pipeline that detects texting while driving using YOLOv8. Built for real-time monitoring with a focus on privacy compliance (GDPR).
- Project Overview
- Dataset
- Model Architecture
- Evaluation Metrics
- Results
- Installation
- Usage
- Future Work
- Contributors
- License
Texting while driving is a major cause of road accidents. This project presents an automated detection system using the YOLOv8 object detection model to identify drivers who are texting while driving. The system is trained on a curated dataset and shows high precision and recall.
- Source: Roboflow “Phone While Driving” dataset
- Classes:
Phone,Wheel - Splits:
- Training: 620 images
- Validation: 177 images
- Testing: 89 images
Annotation format: YOLO bounding boxes.
- Framework: YOLOv8 by Ultralytics
- Components:
- Backbone: CSPDarknet53 + C2f
- Neck: FPN + PAN
- Head: Bounding box and class predictions
| Metric | Validation | Test |
|---|---|---|
| mAP50-95 | 0.888 | 0.855 |
| mAP50 | 0.987 | 0.983 |
| Precision | 0.967 | 0.973 |
| Recall | 0.981 | 0.978 |
- High detection accuracy on both
PhoneandWheelclasses - Minimal overfitting between validation and test sets
- Clear potential for real-world deployment
git clone https://github.com/YOUR_USERNAME/texting-detection-yolov8.git
cd texting-detection-yolov8
pip install -r requirements.txt