Project Description:
This project focuses on identifying and tracking individuals who are riding motorcycles or driving vehicles while using mobile phones, a behavior that significantly increases the risk of road accidents. By leveraging a custom-trained YOLO model with instance segmentation and object tracking, the system processes video input to detect violations in real time. Offenders are highlighted using bounding boxes, class labels, red segmentation masks, and tracking IDs, enabling authorities or AI-driven systems to monitor such incidents automatically.
Key Features:
-
🔍 Custom YOLO Detection: Identifies the specific action of “talking on the phone” while riding/driving.
-
🎥 Video Processing Support: Processes live webcam feeds or video files (e.g., dashcam, CCTV).
-
🟥 Instance Segmentation: Applies red mask overlays on detected phone-using hand regions.
-
🆔 Object Tracking: Assigns unique tracking IDs to persist detections across frames.
-
🧠 Label & Class Display: Clearly shows the action label (e.g., “talking-on-phone”) and the object ID.
-
🖼️ Mouse Pointer Coordinate Debugging: Displays real-time (x, y) coordinates on mouse movement for UI tuning.
-
💡 Lightweight & Efficient: Optimized to skip frames for better performance in real-time environments.
Technologies Used:
-
YOLO (Ultralytics) – For object detection, segmentation, and tracking
-
Python – Core programming language
-
OpenCV – For video frame handling and image processing
-
cvzone – For enhanced annotation overlays (e.g.,
putTextRect) -
NumPy – For mask array manipulation and computations
-
Custom Trained Model (
best.pt) – Trained specifically to detect “talking-on-phone” behavior
Use Cases:
-
Traffic Law Enforcement: Automatically detect and flag violations for evidence or fines.
-
Rider Safety Campaigns: Collect behavioral data for public safety awareness and education.
-
Smart Surveillance Systems: Integrate with CCTV to monitor and log illegal phone usage.
-
Behavioral Analytics: Analyze trends in rider behavior to optimize safety policy decisions.
-
Accident Prevention Research: Study correlation between phone use while riding and accident frequency.
Conclusion:
This project showcases the power of YOLO in detecting and monitoring traffic safety violations. The model accurately identifies individuals who are talking on the phone while driving or riding, an activity commonly linked to road accidents. The use of instance segmentation masks, track IDs, and real-time video processing makes this solution highly applicable for urban traffic surveillance systems. It can be integrated into city infrastructure or transport department monitoring systems to automatically flag such violations.

Reviews
There are no reviews yet.