How balajigun/ppe_monitoring works
This is a real-time PPE safety video analytics application. Its principal workflow reads a video stream, detects and tracks people and PPE, associates PPE with workers, confirms violations over time, then produces alerts, reports, and annotated video. Separate branches detect unsafe worker–machinery proximity and monitor camera, application, and GPU health. The README documents several pipeline connections; sampled source confirms key implementations and some orchestration, but not every call in the main processing loop, so documented links cite the README.
Main entry points: main.py Pipeline runner · detector.py YOLO tracker · alert_manager.py Violation alerts · ppe_rules.py PPE association rules
Components 20
Video analytics
- Pipeline runner
src/main.py - Runtime configuration
src/config.py - Video reader
src/video_reader.py - YOLO tracker
src/detector.py - Detection records
src/detection.py
Safety decisions
- PPE association rules
src/ppe_rules.py - Worker PPE state
src/ppe_state.py - Proximity detection
src/proximity_detector.py
Reporting and alerts
- PPE CSV reports
src/csv_logger.py - Worker count log
src/worker_count_logger.py - Violation alerts
src/alert_manager.py - Violation screenshots
- Proximity event log
src/proximity_event_logger.py - Annotated video
src/visualizer.py
Operations
- Camera health
src/camera_health_monitor.py - Application health
src/application_monitor.py - GPU metrics
src/gpu_monitor.py - Application logging
src/logging_setup.py
Other components
- Video source
- Email recipient
Connections 20
- Video source → Video reader: provides video
README.md - Pipeline runner → Video reader: reads frames
README.md - Pipeline runner → YOLO tracker: runs detection
README.md - YOLO tracker → Runtime configuration: loads settings
src/detector.py - YOLO tracker → Detection records: creates records
src/detector.py - Pipeline runner → PPE association rules: evaluates PPE
README.md - PPE association rules → Detection records: evaluates objects
src/ppe_rules.py - Pipeline runner → Worker PPE state: confirms violations
README.md - Pipeline runner → PPE CSV reports: writes reports
README.md - Pipeline runner → Worker count log: logs worker counts
README.md - Pipeline runner → Violation alerts: processes violations
src/main.py - Violation alerts → Violation screenshots: saves screenshots
src/alert_manager.py - Violation alerts → Email recipient: sends email
src/alert_manager.py - Pipeline runner → Proximity detection: checks proximity
README.md - Pipeline runner → Proximity event log: logs events
README.md - Pipeline runner → Annotated video: renders output
README.md - Pipeline runner → Camera health: starts monitoring
src/main.py - Pipeline runner → Application health: starts monitoring
src/main.py - Pipeline runner → GPU metrics: monitors GPU
README.md - Pipeline runner → Application logging: sets up logs
src/main.py