This report presents a method for helmet detection in construction sites using YOLOv8, a state-of-the-art object detection algorithm, and Total Variation Denoising (TVD) for improving image quality. The aim is to enhance the detection accuracy of helmets under challenging environmental conditions, such as poor lighting and noise. The approach involves dataset collection, preprocessing, model training, and evaluation, where we demonstrate the effectiveness of TVD in reducing noise and improving detection precision. The results highlight the potential of this system in real-time safety monitoring for construction workers.
The safety of workers in construction sites is a critical concern, and helmet usage is one of the most effective measures to prevent head injuries. Detecting whether workers are wearing helmets can help improve safety compliance. However, construction site images are often noisy due to factors like poor lighting, motion blur, and environmental conditions. This report aims to develop an automated system for detecting helmets using YOLOv8, a deep learning-based object detection model, combined with Total Variation Denoising (TVD) to enhance image quality.
In this study, the primary objectives are:
The dataset used for training the YOLOv8 model is sourced from the Kaggle Hard Hat Detection dataset, which contains images of construction workers with annotated bounding boxes for helmets.
YOLOv8 (You Only Look Once, version 8) is a state-of-the-art Convolutional Neural Network (CNN) designed for real-time object detection. It divides an image into a grid of cells, and each cell predicts bounding boxes along with confidence scores for each object it detects.
For the helmet detection task, YOLOv8 will predict the following for each bounding box:
The model is trained to minimize the following loss function, which is the sum of three components:
To address the noise in construction site images, Total Variation Denoising (TVD) is applied as a preprocessing step. TVD reduces high-frequency noise while preserving essential object boundaries, making the helmets more distinguishable for the model.
TVD works by minimizing the total variation of an image while keeping the edges intact. The formula for TVD is given by:
where:
Once the dataset is prepared and denoised, YOLOv8 is trained using the following parameters:
The model's performance was evaluated on a test set, and the following results were obtained:
Below are sample images showing the model's predictions, where the green box indicates the detection of a helmet, and the red box indicates a lack of helmet detection.
Figure 1: Helmet detection results on construction site images.
Figure 2: Additional helmet detection results showing model performance under varying conditions.
The incorporation of TVD significantly improved detection accuracy, especially in noisy images:
This demonstrates the importance of image denoising in real-world scenarios where environmental noise is prevalent.
The YOLOv8-based helmet detection system, enhanced with Total Variation Denoising, shows significant promise for improving construction site safety by automating helmet detection. The system is capable of real-time detection, even in challenging environmental conditions. Future work could explore the detection of additional safety equipment and the deployment of this system in real-time safety monitoring applications.