This project implements a real-time Personal Protective Equipment (PPE) detection and compliance monitoring system using YOLOv8 for object detection, Centroid Tracking for person persistence, and optionally SAHI (Slicing Aided Hyper Inference) for enhanced detection of small objects. The backend is built with Flask and Flask-SocketIO for real-time video streaming to a frontend application.
The system is designed for high performance, featuring adjustable speed modes, frame skipping, and optimization for the OAK-D (DepthAI) camera for potential integration into edge computing environments.
PPE_Detection_Final_demo.mp4
- Real-time Detection: Detects persons and various PPE items (Helmet, Mask, Jacket, Shoes, Goggle) in real-time video streams.
- Compliance Monitoring: Tracks individual persons and their PPE compliance history to identify and log violations.
- High Performance: Includes Fast, Balanced, and Accurate speed modes with configurable frame skipping, JPEG quality, and max processing width.
- SAHI Integration: Optional use of Slicing Aided Hyper Inference (SAHI) to significantly improve the detection accuracy of small or distant objects.
-
Tracking: Uses the CentroidTracker with the Hungarian Algorithm (
$LSA$ ) for robust person tracking across frames. - Streaming API: Uses Flask-SocketIO for low-latency, real-time streaming of annotated video frames and statistics to a web frontend.
-
External Stream Support: REST API endpoints (
/stream/frame) allow processing frames from external sources (e.g., another server or a client application). - OAK-D Support: Configured to integrate with the DepthAI (OAK-D) camera for high-quality, real-time video processing.