提出了一种基于注意力机制改进的 YOLOv5 s检测方法,以提高绝缘子缺陷检测的准确率和效率.首先,在YOLOv5 s网络模型的架构中,在其颈部(Neck)引入了空间与通道卷积块注意力模型(CBAM),目的是实现对缺陷区域的重点关注.同时,通过引入双向特征金字塔网络(BiFPN)进行优化改进,进一步完善了模型的性能.此外,对损失函数进行了优化,以进一步提高模型的整体训练效果.实验结果表明,改进的 YOLOv5 s 算法相比原 YOLOv5 s 算法对绝缘子缺陷检测的精准率提升了 4.69%,召回率提升了 2.56%,F1 分数提升了 4.09%,AP提升了 5.16%.
Attention Mechanism-based Improved YOLOv5 Algorithm for Insulator Defect Detection
This paper proposes an improved YOLOv5s detection method based on attention mechanism to give rise to ac-curacy and efficiency of insulator defect detection.First in the architecture of YOLOv5s network model,the spatial and channel convolutional block attention model(CBAM)is introduced in its neck to achieve the focus on the defect area.At the same time,the performance of the model is further improved by introducing bi-directional feature pyramid network(BiFPN)for optimization and improvement.In addition,the loss function is optimized to further improve the overall train-ing effect of the model.The experimental results show that in the aspect of insulator defect detection,the accuracy,recall rate,F1 score,and AP of the improved YOLOv5s algorithm is increased by 4.69%,2.56%,4.09%,and 5.16%,com-pared to the original YOLOv5s algorithm.