How waqarali-wq/ppe_version1 works
The repository is a PPE surveillance and safety-audit application with desktop camera monitoring and command-line image/video workflows. Its main path is camera or video input → per-camera feature processing → person tracking and PPE assessment → annotated frames and operator alerts. The README also documents image-folder auditing, video tracking, persistent camera configuration, and alert decisions. Some CLI and UI implementation details were not excerpted, so those connections are shown only where the README or indexed references support them.
Main entry points: main_window.py Monitoring window · worker.py Camera worker · detect_images.py Image audit CLI · track_video.py Video audit CLI
Components 21
Desktop monitoring
- Desktop entry
app.py - Monitoring window
src/ui/main_window.py - Camera setup
src/ui/dialogs.py - Camera tile
src/ui/camera_tile.py - Alerts panel
src/ui/alerts_panel.py - Alert and camera store
src/ui/store.py
Video capture
- Camera worker
src/ui/worker.py - Frame source
src/camera.py
PPE audit
- Image audit CLI
detect_images.py - Video audit CLI
track_video.py - Feature registry
src/features.py - Person tracking and fusion
src/tracker.py - PPE detector
src/detector.py - Pose safety analysis
src/pose_analyzer.py - PPE model weights
models/ppe_construction_yolov8.pt
Audit outputs
- Frame annotations
src/visualizer.py - Annotated images
outputs/annotated_images - Annotated videos
outputs/annotated_videos - Alert log and snapshots
outputs
Other components
- Safety operator
- Camera or video
Connections 28
- Safety operator → Desktop entry: launches
app.py - Desktop entry → Monitoring window: opens
app.py - Safety operator → Camera setup: configures sources
README.md - Monitoring window → Camera setup: opens
src/ui/main_window.py - Monitoring window → Camera worker: starts
src/ui/main_window.py - Monitoring window → Camera tile: creates
src/ui/main_window.py - Monitoring window → Alerts panel: displays
src/ui/main_window.py - Monitoring window → Alert and camera store: logs decisions
src/ui/main_window.py - Camera or video → Frame source: provides frames
README.md - Camera worker → Frame source: reads frames
src/ui/worker.py - Camera worker → Feature registry: loads and runs
src/ui/worker.py - Feature registry → Person tracking and fusion: uses tracking
src/features.py - Person tracking and fusion → PPE detector: detects PPE
src/tracker.py - Person tracking and fusion → Pose safety analysis: analyzes person crops
src/tracker.py - PPE detector → PPE model weights: loads weights
src/detector.py - Safety operator → Image audit CLI: runs image audit
README.md - Image audit CLI → PPE detector: detects items
detect_images.py - Image audit CLI → Frame annotations: annotates images
detect_images.py - Image audit CLI → Annotated images: writes results
README.md - Safety operator → Video audit CLI: runs video audit
README.md - Video audit CLI → Person tracking and fusion: tracks and audits
README.md - Video audit CLI → Frame annotations: annotates frames
track_video.py - Video audit CLI → Annotated videos: writes results
README.md - Camera worker → Camera tile: sends frames
src/ui/worker.py - Camera worker → Monitoring window: emits alerts
src/ui/worker.py - Monitoring window → Alerts panel: raises alerts
src/ui/main_window.py - Monitoring window → Alert log and snapshots: records decisions
README.md - Camera worker → Annotated videos: saves video output
README.md