电子科技2025,Vol.38Issue(9):79-84,6.DOI:10.16180/j.cnki.issn1007-7820.2025.09.010
基于改进YOLOv7的焊缝缺陷检测算法
Weld Defect Detection Algorithm Based on Improved YOLOv7
摘要
Abstract
In view of the problems of low detection accuracy and slow detection speed caused by small target size,diverse features and complex background of pressure vessel welding defects,a weld defect detection algorithm based on improved YOLOv7(You Only Look Once version 7)is proposed.The GAM(Global Attention Mechanism)module is added to the Neck part of the network to prevent the loss of feature information for smaller sizes and weak defects,and to enhance feature extraction,which effectively improved the accuracy of detection.The ELAN(Effi-cient Layer Aggregation Network)module in the network is replaced by CNeB(ConvNeXt Block)module,which sim-plifies the whole model,reduces the time spent in the training and reasoning process of the model,improves the de-tection accuracy and speed,and significantly improves the speed of detection while improving detection accuracy.In order to enhance the robustness of the improved YOLOv7 model,GAM module and CNeB module are integrated.The experimental results show that the speed of the proposed method is 48.1 frame·s-1,the mAP(mean Average Preci-sion)of the improved algorithm reaches 94.2%,which is 2.9 percentage points higher than that of the original algo-rithm.These results indicate that the improved algorithm can realize the detection of weld defects.关键词
压力容器/X射线焊缝缺陷/YOLOv7/注意力机制/GAM注意力/CNeB/目标检测/深度学习Key words
pressure vessel/X-ray weld defects/YOLOv7/attention mechanism/GAM attention/CNeB/target detection/deep learning分类
信息技术与安全科学引用本文复制引用
齐浩东,程晓颖,李海生,陈晓,徐鑫炯..基于改进YOLOv7的焊缝缺陷检测算法[J].电子科技,2025,38(9):79-84,6.基金项目
"纺织之光"应用基础研究项目(J202103)Textile Light Application Basic Research of China(J202103) (J202103)