An improved helmet detection method for YOLOv3 on an unbalanced dataset

Rui Geng, Yixuan Ma, Wanhong HuangarXiv 2020 · arXiv

Introduction

Safety helmets are indispensable for worker protection in industrial and construction environments. Automated monitoring systems often leverage real-time object detection algorithms like YOLOv3. However, these models frequently encounter performance degradation when trained on unbalanced datasets—where certain classes, such as "person," significantly outnumber others, like "helmet." This paper presents an enhanced YOLOv3-based approach designed to maintain high accuracy and real-time processing speeds under these challenging conditions.

Addressing Dataset Imbalance

The primary challenge addressed is the irregularity of training data. In many real-world scenarios, the frequency of "person" tags far exceeds that of "hat" (helmet) tags. This skewness often leads to poor detection of small objects or targets against complex backgrounds.

Figure 2: Distribution of classes in the dataset, illustrating the significant imbalance between 'person' and 'hat' tags.

Proposed Methodology

The researchers implemented several key improvements within the MXNet framework using GluonCV:

1. Gaussian Fuzzy Data Augmentation

To mitigate the effects of data imbalance, a Gaussian blurring pre-processing step was introduced. By applying a 2D Gaussian distribution to calculate weighted averages for 9-pixel grids, the method creates "blurred" image variants. This technique regularizes the input, smoothing out noise and forcing the network to learn more generalized, robust features rather than over-fitting on dominant classes.

2. Architectural Enhancements and Loss Optimization

The model utilizes YOLOv3’s pyramid feature map (FPN) structure to fuse low-level positional data with high-level semantic information, enhancing the detection of small objects.

Figure 3: The YOLOv3 architecture used as the baseline for the improved detection method.

Furthermore, the standard bounding box regression was replaced with Generalized Intersection over Union (GIoU). GIoU provides a more effective gradient for learning when predicted and ground-truth boxes do not overlap, resulting in superior localization accuracy.

Experimental Results

The study utilized a dataset of 7,581 images characterized by a wide variety of industrial backgrounds. Comparative analysis between the standard YOLOv3 and the improved version revealed several key insights:

  • Increased Confidence: The average confidence score for helmet detection improved from 0.966 to 0.982.
  • Enhanced Localization: The use of GIoU and feature fusion led to more precise bounding box placement and better handling of multiple targets in a single frame.
  • Maintained Speed: Because the primary enhancements occur during pre-processing and training, the inference speed remains unchanged, ensuring the model's suitability for real-time industrial applications.

Conclusion and Future Directions

The proposed method successfully boosts helmet detection performance on unbalanced datasets without sacrificing speed. Future research will focus on addressing environmental challenges such as low-light conditions and extreme glare, as well as refining detection for very small, distant targets through techniques like online difficult sample mining.

Summary updated

Abstract

The YOLOv3 target detection algorithm is widely used in industry due to its high speed and high accuracy, but it has some limitations, such as the accuracy degradation of unbalanced datasets. The YOLOv3 target detection algorithm is based on a Gaussian fuzzy data augmentation approach to pre-process the data set and improve the YOLOv3 target detection algorithm. Through the efficient pre-processing, the confidence level of YOLOv3 is generally improved by 0.01-0.02 without changing the recognition speed of YOLOv3, and the processed images also perform better in image localization due to effective feature fusion, which is more in line with the requirement of recognition speed and accuracy in production.
BibTeX
@misc{geng2020improved,
  author = {Rui Geng and Yixuan Ma and Wanhong Huang},
  title = {{An improved helmet detection method for YOLOv3 on an unbalanced dataset}},
  year = {2020},
  eprint = {2011.04214},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.04214},
}
Figure