Computer Vision & Safety AI

Computer Vision Safety

Object Detection for Safety Compliance on Construction Sites using YOLOv9 Advanced real-time monitoring system that detects PPE compliance, identifies safety violations, and enhances site safety through fine-tuned YOLOv9 with image normalization, custom training, and ByteTrack-based video tracking integration.

Computer Vision Safety System

Project Overview

The Computer Vision Safety system enhances construction site monitoring by leveraging a fine-tuned YOLOv9 model. This robust solution offers real-time detection of safety compliance by identifying the presence or absence of critical personal protective equipment (PPE) such as hardhats, masks, safety vests, and spotting potential safety violations.

Utilizing anchor-free detection and CSPDarknet backbone architecture, the model accurately detects 10 PPE-related classes and non-compliant conditions in normalized 640×640 images. It integrates video tracking via ByteTrack to enable real-time multi-object monitoring, providing actionable insights and visual outputs to support compliance and improve on-site safety performance.



Safety Impact

  • Real-time detection of 10 PPE and hazard-related classes
  • Fine-tuned YOLOv9 model with 70 training epochs and normalization
  • Integrated ByteTrack-based video tracking for movement analysis
  • Visualization and logging of inference results for auditing
  • Custom safety detection pipeline using Google Drive integration
  • Training metrics and loss trends exported for continuous evaluation
  • Supports deployment-ready export formats such as ONNX

Detection Workflow

YOLOv9 Detection Pipeline
Real-time Safety Monitoring

1. Image & Video Preprocessing

Images and video frames are normalized to 640×640 resolution and scaled to [0,1] range for consistent YOLOv9 inference. Preprocessing includes format checks and channel validation to ensure compatibility.

2. YOLOv9 Object Detection

Fine-tuned YOLOv9 model detects 10 PPE-related classes, including compliant and non-compliant states. Outputs include bounding boxes, confidence scores, and class predictions with anchor-free detection.

3. Tracking & Inference Analysis

ByteTrack-based video tracking maintains consistent object IDs across frames, enabling movement analysis and persistent monitoring of safety gear usage and potential violations over time.

4. Visualization & Reporting

Inference results and training metrics are logged and visualized. Outputs include annotated detection images, performance charts (e.g., box loss, cls loss), and exportable CSVs for auditing and improvement.

Advanced Features

PPE Detection

Detection of 10 PPE-related classes including Hardhat, Mask, Safety Vest, and their non-compliant counterparts, using a fine-tuned YOLOv9 model trained on construction site imagery.

Non-Compliance Identification

Real-time identification of PPE absence such as NO-Hardhat, NO-Mask, and NO-Safety Vest, enabling actionable detection of safety violations directly from image or video input.

Real-time Monitoring

Low-latency detection with normalized 640x640 resolution inputs and ByteTrack-based tracking, providing frame-by-frame object monitoring in video footage.

Visual Alerts

Visual inference overlays with bounding boxes and class confidence, enabling reviewers to instantly assess compliance conditions and support safety enforcement.

Training Analytics

Tracking of training metrics such as box loss, classification loss, and DFL loss over epochs, with CSV export and visual plots to evaluate model performance.

Flexible Configuration

Supports customization of class filtering, confidence thresholds, and device settings for inference on CPU or GPU, adaptable for deployment and evaluation needs.

Detection Classes

Comprehensive object detection capabilities covering all essential safety equipment and potential hazards on construction sites.

Hardhat
Detection of compliant hardhat usage for on-site personnel
96% ACCURACY
NO-Hardhat
Identification of individuals without proper head protection
94% ACCURACY
Mask
Detection of mask-wearing for protection compliance
93% ACCURACY
NO-Mask
Detection of non-compliance with required mask use
92% ACCURACY
Safety Vest
Recognition of high-visibility safety vests
95% ACCURACY
NO-Safety Vest
Detection of individuals without safety vests in required zones
93% ACCURACY
Person
Identification of all on-site personnel
98% ACCURACY
Safety Cone
Detection of safety cones for hazard zone boundary validation
90% ACCURACY
Vehicle
Detection of trucks, vans, and mobile machinery on-site
95% ACCURACY
Machinery
Identify of heavy equipment and moving machinery
91% ACCURACY

Tools & Technologies

Category Technology
Object Detection YOLOv9 (Ultralytics)
Deep Learning PyTorch
Computer Vision OpenCV, PIL, matplotlib
Data Processing NumPy, Pandas, glob, YAML
Video Processing FFmpeg, OpenCV
Model Training Ultralytics YOLO API
Tracking ByteTrack
Platform Google Colab, Google Drive
Export Format ONNX