
科学技术与工程

中国技术经济学会
基于改进YOLOv8的窄间隙焊接焊缝缺陷图像检测
Image Detection of Welding Seam Defects in Narrow-gap Welding Based on Improved YOLOv8
为了解决窄间隙焊接过程中焊缝缺陷检测的核心问题,对YOLOv8模型进行了改进。具体而言,将RepViT-CBAM结构嵌入YOLOv8的主干网络,用以替换传统的下采样模块。通过融合ViT架构,显著增强了模型的特征提取能力。研究结果显示:在引入1.3%计算量的前提下,平均精度(mean average precision, mAP)提升了3.9%;其次,引入高效通道注意力机制(shuffle attention, SA)进一步增强了模型对微小气孔和裂纹缺陷的召回能力;最后,采用WIoU损失函数对焊缝缺陷的定位精度进行了优化。实验结果表明:改进后的模型在自建及开源混合数据集中实现了96.47%的mAP,相较于原始YOLOv8s模型提高了4.55%,并且帧率达到114.59帧/s,能够有效满足焊缝缺陷实时检测的需求。由此可见,该方法显著提升了窄间隙焊接焊缝缺陷检测的精度与效率,具有重要的工业应用价值。
In order to address the critical issue of defect detection in narrow gap welding, an improved YOLOv8 model was used to investigate the enhancement of weld defect detection accuracy and efficiency. The results show that by introducing the RepViT-CBAM structure to replace the downsampling module in the YOLOv8 backbone network, the feature extraction capability was significantly improved, resulting in a 3.9% increase in mean average precision (mAP) with only a 1.3% increase in computation. Additionally, the integration of the shuffle attention(SA) module enhanced the recall rate for small pores and cracks, while the use of the WIoU loss function optimized the defect localization accuracy. It is concluded that the proposed method achieves an mAP of 96.47% on mixed self-built and open-source datasets, surpassing the original YOLOv8s model by 4.55% with a frame rate of 114.59 frames/s, making it suitable for real-time weld defect detection in industrial applications.
YOLOv8 / 缺陷检测 / RepViT-CBAM / 注意力机制
YOLOv8 / defect detection / RepViT-CBAM / attention mechanism
/
| 〈 |
|
〉 |