Dense safety helmet detection based on coordinate attention and soft NMS
In order to solve the problem of low detection accuracy of dense small targets in existing helmet detection algorithms,a safety helmet detection algorithm based on coordinate attention and soft non-maximum suppression(NMS)is proposed.A coordinate attention mechanism is introduced to improve accuracy by focusing on target features associated with the training safety helmet.The softened non-maximum suppression algorithm is used to optimize the confidence of the candidate box,so as to increase the detection precision of the model for dense small targets.The WIoU is used to optimize the bounding box loss function,which can make the model focus on difficult examples and reduce the contribution of simple examples to the loss value,improving the generalization performance of the model.The experimental results indicate that,in comparison with the standard YOLOv5s,the mAP@0.5 of the proposed algorithm is 88.4%,which is increased by 3.0%,the mAP@0.5:0.95 is 65.6%,which is increased by 6.8%,and the recall rate and accuracy are increased by 2.4%and 0.5%,respectively,which can provide a certain reference for the detection of dense small targets.
safety helmet detectioncoordinate attention mechanismSoft non-maximum suppressionYOLOv5sWIoUbounding box loss function