Helmet Wearing Detection Algorithm Based on Improved YOLOv7
To improve the accuracy of the algorithm for detecting the wearing of safety helmets in workplaces,this paper proposes an improved optimization algorithm based on the YOLOv7 network architecture.This algorithm uses YOLOv7 as the benchmark model and introduces a parameter free attention mechanism SimAM in its ELAN structure and SPPCSPC structure,replacing its original convolution module CBS,to enhance the feature extraction ability of the detection network and improve the model's ability to distinguish between targets and backgrounds in images.Introducing a coordinate convolution module into the convolution of the detection head enables the convolution to perceive spatial information and improve the problem of low target localization accuracy.Replace the native loss function in YOLOv7 with the WIoU loss function,allowing the algorithm to focus on difficult samples and improve its classification performance.The improved model was validated on the dataset,and the experimental results showed that the average accuracy of the improved model was 84.7%,which was 5.7 percentage points higher than the original YOLOv7 model.A series of comparative experiments have demonstrated the effectiveness of the improved algorithm,which has certain advantages compared to mainstream models and has reference value for subsequent research and applications.