张航,周毅,邱宇峰.融合HGnetv2和注意力机制的钢材表面缺陷检测方法[J].电子测量与仪器学报,2025,39(1):36-49
融合HGnetv2和注意力机制的钢材表面缺陷检测方法
Detection method of steel surface defects with fusion ofHGnetv2 and attention mechanism
  
DOI:
中文关键词:  钢材缺陷  缺陷检测  YOLOv5  注意力机制  深度学习  人工神经网络
英文关键词:steel defects  defect detection  YOLOv5  attention mechanism  deep learning  artificial neural network
基金项目:国家自然科学基金(62372343)项目资助
作者单位
张航 武汉科技大学信息科学与工程学院武汉430081 
周毅 武汉科技大学信息科学与工程学院武汉430081 
邱宇峰 宝信软件(武汉)有限公司武汉430080 
AuthorInstitution
Zhang Hang School of Information Science and Engineering, Wuhan University of Science and Technology, Wuhan 430081,China 
Zhou Yi School of Information Science and Engineering, Wuhan University of Science and Technology, Wuhan 430081,China 
Qiu Yufeng Baosight Software(Wuhan)Co., Ltd, Wuhan 430080,China 
摘要点击次数: 126
全文下载次数: 67
中文摘要:
      针对多尺度、多类型和复杂背景的钢材表面缺陷检测精度低的问题,设计一种融合HGnetv2和注意力机制的改进YOLOv5算法。首先,基于HGnetv2网络结构引入注意力机制作为骨干层,提升对小目标缺陷的特征提取能力。然后,在特征融合层中,将注意力机制和Involution操作结合,实现对浅层边缘信息和深层语义信息的有效聚合。其次,采用CBME_C2f替换了原模型的C3_Bottleneck,提供了更丰富的梯度流信息。此外,使用一种新的预测框损失VCIoU,通过计算预测框和目标框顶点和两者中心点之间的位置信息特征,提高了边界框回归精度。最后,引入了MetaAconC激活函数,自适应地调整每个特征图通道激活的非线性程度,提高从复杂背景中提取特征信息的性能。实验结果表明,此方法在NEU-DET数据集上平均精度mAP50指数达到了81.4%,相较于YOLOv5s算法提高了5.4%,mAP@50:95指数达到了44.1%,相较于YOLOv5s算法提高了2.8%。除此之外,针对此数据集中的微小缺陷Crazing,平均检测精度达到了55.4%,相比原YOLOv5s提高了18.1%,同时检测速度为80.6 fps。与其他主流的缺陷检测算法对比,该算法在满足对钢材表面检测实时性要求的条件下,提高了检测精度。
英文摘要:
      Addressing the low accuracy problem in detecting multi-scale, multi-type steel surface defects within complex backgrounds, this paper designs an improved YOLOv5 algorithm that integrates HGnetv2 with an attention mechanism. First, the HGnetv2 network incorporates an attention mechanism as a backbone layer to enhance feature extraction capabilities for small target defects. Second, in the feature fusion layer, attention mechanisms and involution operations are combined to achieve effective aggregation of edge features in shallow layers and semantic information in deep layers. Besides, CBME_C2f replaces the C3_Bottleneck module to improve gradient flow. Additionally, a new bounding box loss function, VCIoU, is used to calculate positional features between the vertices and center points of the prediction and target boxes, enhancing bounding box regression precision. Finally, MetaAconC is introduced to adaptively adjust the non-linearity of activation for each feature map channel, improving the ability to extract feature information from complex backgrounds. Experimental results on the NEU-DET dataset show that the proposed method achieves an mAP50 of 81.4% and an mAP@50:95 of 44.1%, which is 5.4% and 2.8% better than YOLOv5s respectively. For the small defects such as crazing in this dataset, the detection accuracy reaches 55.4%, representing an 18.1% improvement over YOLOv5s, while maintaining a detection speed of 80.6 fps. Compared to other mainstream defect detection algorithms, this algorithm improves accuracy while meeting the real-time demands of steel surface defect detection.
查看全文  查看/发表评论  下载PDF阅读器