نظام ذكي لاكتشاف استخدام الهاتف أثناء القيادة
Real-Time Detection of Mobile Phone Use While Riding
An AI-powered traffic safety system that detects and tracks riders or drivers
using mobile phones while riding or driving. The system uses a custom-trained
YOLO model with instance segmentation and object tracking to highlight violations
in real time from video footage.
Project Overview
This project focuses on identifying dangerous driving behavior by detecting
individuals who use mobile phones while riding motorcycles or driving vehicles.
Using YOLO-based detection, segmentation masks, and tracking IDs, the system
automatically flags violations in real time, making it ideal for smart traffic
surveillance and law enforcement applications.
Key Features
Custom YOLO Detection
- 🔍 Detects the action of “talking on the phone” while riding or driving.
- ⚡ Uses a custom-trained YOLO model for high accuracy.
Real-Time Video Processing
- 🎥 Supports live webcam, dashcam, or CCTV video feeds.
- 🕓 Processes frames in real time with optimized performance.
Instance Segmentation
- 🟥 Applies red mask overlays on detected phone-hand regions.
- 🎯 Clearly highlights the violation area.
Object Tracking & Labeling
- 🆔 Assigns unique tracking IDs to offenders.
- 🏷️ Displays action labels and object IDs on screen.
Lightweight & Debug-Friendly
- 💡 Frame skipping for better real-time performance.
- 🖱️ Mouse pointer (x, y) coordinate debugging for UI tuning.
Technology Stack
- 🐍 Programming Language: Python
- 🎥 Computer Vision: OpenCV
- 🧠 Object Detection & Segmentation: YOLO (Ultralytics)
- 🖥️ Visualization & Annotations: cvzone
- 📐 Numerical Processing: NumPy
- 📦 Custom Model: Trained YOLO model (best.pt)
Use Cases
- 🚓 Traffic Law Enforcement – Automatic violation detection.
- 📹 Smart Surveillance Systems – Monitor illegal phone usage.
- 📊 Behavioral Analytics – Analyze risky riding behavior trends.
- 🧪 Accident Prevention Research – Study phone usage impact on accidents.
Conclusion
This AI-powered solution demonstrates how YOLO and computer vision can be used
to enhance road safety by detecting mobile phone usage while riding or driving.
With real-time detection, segmentation masks, and tracking IDs, the system is
well-suited for smart city traffic monitoring and automated law enforcement.