Inspiration
Construction sites are among the most dangerous workplaces — falls, struck-by accidents, and PPE non-compliance cause thousands of injuries every year. We wanted to build something that could passively monitor a site and catch violations in real time, before an accident happens.
What it does
SafePatrol is a real-time construction site safety monitor. A camera feed is analyzed frame-by-frame using YOLOv8 to detect workers missing hardhats, safety vests, or masks. MediaPipe pose estimation flags dangerous postures like lying down or extreme bending. Every violation triggers an instant alert — saved to a dashboard with video clips, timestamps, and confidence scores. A live WebSocket feed pushes new alerts to the dashboard the moment they're detected.
How we built it
Detection: YOLOv8 (PPE violation classes) + MediaPipe pose landmarker Backend: FastAPI + SQLite, REST API + WebSocket broadcast Frontend: React dashboard with real-time alert feed and stats Pipeline: Camera → detector → POST /api/alerts → WebSocket → dashboard
Challenges we ran into
Finding an effective model- Training a model from scratch wasn't feasible in a hackathon, so we used a pre-trained YOLOv8 model trained on construction PPE datasets, achieving reliable detection without extensive compute resources.
Too many violation alerts- The system initially flooded supervisors with repeated alerts. We implemented person tracking with stable IDs and a 180-second cooldown per violation type, significantly reducing alert noise while keeping real violations caught.
What we learned
How to build a full computer vision pipeline end-to-end — from raw camera frames to a live web dashboard — under serious time pressure.
What's next for SafePatrol
Multi-camera support, RTSP stream integration, SMS/email alerts, and a mobile dashboard for on-site supervisors


Log in or sign up for Devpost to join the conversation.