Helmet Detection Algorithm of Electric Bicycle Riders Based on YOLOv5 with CBAM Attention Mechanism Integration
摘要
Object detection algorithms can assist in detecting the helmet-wearing status of electric bicycle riders, thereby saving regulatory manpower costs. However, there is currently a lack of standardized and publicly available datasets. Additionally, the basic YOLOv5s object detection algorithm, due to its limited feature extraction capabilities, may lead to numerous instances of both false negative and false positive. To enhance the model’s focus on critical information within the feature maps, this paper introduces the CBAM attention mechanism module into the Backbone section of YOLOv5s. This module sequentially infers attention maps from the input feature maps along both channel and spatial dimensions independently, and then multiplies these attention maps with the input feature maps to achieve adaptive feature optimization. This paper have established self-built dataset for experimental research, and the results indicate that compared to the original YOLOv5s model, the proposed method has improved the model’s overall mAP score by 1.89%.