π¦ΊConstruction Site Safety Detection using YOLOv10
This project implements a real-time computer vision system using YOLOv10 (CNN-based object detection) to monitor construction site safety compliance. It detects whether workers are wearing safety helmets and safety vests and identifies safety violations from live CCTV or webcam video.
This is an industry-grade AI solution used in smart cities, construction companies, and industrial safety monitoring.
π Business Problem
Construction sites are one of the most dangerous workplaces. Accidents occur due to:
Workers not wearing helmets
Missing safety vests
Lack of real-time monitoring
Manual supervision is slow and unreliable. This system provides automatic, real-time safety monitoring.
π§ AI Solution
A YOLOv10 deep learning model is trained to detect:
Person
Helmet
No-Helmet
Safety Vest
The system:
Reads live video
Detects PPE compliance
Highlights violations instantly
π Dataset
This project uses a real construction-site dataset from Kaggle:
Safety Helmet & Vest Detection Dataset https://www.kaggle.com/datasets/andrewmvd/helmet-detection
The dataset contains thousands of labeled images with bounding boxes for helmet, vest, and people.
π End-to-End Pipeline Dataset β YOLOv10 Training β Model Evaluation β Model Export β Live Detection β API
π Project Structure construction-safety-yolov10/ β βββ data/ # Dataset (not uploaded) βββ src/ β βββ train.py β βββ evaluate.py β βββ detect.py β βββ api/ β βββ app.py # FastAPI for live detection β βββ models/ β βββ best.pt # Trained YOLOv10 model β βββ requirements.txt βββ .gitignore βββ README.md
βοΈ Installation pip install -r requirements.txt
ποΈ Train YOLOv10 from ultralytics import YOLO
model = YOLO("yolov10n.pt") model.train(data="safety.yaml", epochs=50, imgsz=640)
π₯ Real-Time Detection from ultralytics import YOLO
model = YOLO("models/best.pt") model.predict(source=0, show=True)
This runs live webcam detection.
π API for CCTV uvicorn api.app:app --reload
Open:
π Tech Stack
Python
YOLOv10
OpenCV
PyTorch
FastAPI
CNN
πΌ Why This Project Matters
This project demonstrates:
Deep learning with CNN
Object detection
Real-time video AI
Industrial safety use case
Production-style deployment
This is not a toy project β it is a real industry solution.
π¨βπ» Author
Syed Sadath G Machine Learning Engineer | Computer Vision | Deep Learning