首页|面向铝合金焊缝DR图像缺陷的Sim-YOLOv8目标检测模型

面向铝合金焊缝DR图像缺陷的Sim-YOLOv8目标检测模型

扫码查看
针对当前目标检测算法在铝合金焊缝数字射线成像(DR)图像缺陷检测中精度不足的问题,提出了一种基于YOLOv8的改进模型Sim-YOLOv8.首先改进C2f,通过增加SimAM模块提升模型的整体性能;其次,针对部分像素较小的气孔和夹渣缺陷,将首层卷积模块更换为Focus模块,以提升模型对小目标的检测能力;最后添加WIoU损失函数,以提高模型锚框的质量,从而提高检测效果.实验结果表明:在阈值为0.5的前提下,Sim-YOLOv8模型对气孔、夹杂、未焊透这三类缺陷检测的平均精度(mAP@0.5)达到了 93.6%、94.4%、97.3%,较原模型分别提高了2.5、1.9和1.7个百分点,具有更好的焊缝缺陷检测效果.
Sim-YOLOv8 Object Detection Model for DR Image Defects in Aluminum Alloy Welds
Objective Owing to the influence of manufacturing processes and welding environments,aluminum alloy materials,are prone to various internal welding defects during the welding process,such as pores,slag inclusions,and incomplete penetration.Currently,defects in DR(digital radiography)weld seam images are typically manually identified by trained professionals.However,the manual detection of DR ray film defects has a high workload,low efficiency,and problems with false positives and missed detection.With the rapid development of computer and digital image-processing technologies,deep learning is widely used in object recognition.The current target detection algorithms exhibit sub-optimal performance in accurately detecting weld defects.Furthermore,enhancement of the detection accuracy of the model often comes at the cost of decreased speed and increased parameter count.This in turn hinders effective deployment.To address this issue in the defect detection of aluminum alloy weld DR images,a lightweight weld defect detection algorithm based on YOLOv8 is proposed.This improved algorithm effectively resolves the problems associated with increased parameter counts and reduced detection speeds resulting from model enhancement.Methods First,the SimAM module was added to C2f to improve the overall network performance.The specific approach is introducting the SimAM module into the bottleneck module of the C2f module(Fig.4).This can improve the feature expression ability of the module without increasing the number of model parameters.The loss function was then replaced with the WIoU loss function to improve the quality of the anchor frame,and the first-layer convolution module was replaced with the Focus convolution module to increase the detection speed while increasing the network sensory field.These improved the detection effect on small targets.The YOLOv8 model underwent consistent parameter and indicator during model enhancement.This in turn ensured the effectiveness of the improvement points by comparing all indicators across the verification sets.Before improving the model,the dataset was expanded and divided.By rotating,flipping,and adjusting the brightness of the 823 images in the original dataset,the dataset was expanded to 3098 images.There were 1983 pictures in the training set,495 pictures in the training set,and 620 pictures in the verification test set.Results and Discussions This study improves the YOLOv8 model and proposes a new algorithm,Sim-YOLOv8.First,the overall performance of the model is improved by optimizing the C2f module in the original network structure and adding a SimAM module to this module.Compared with the original algorithm,the improved network accuracy index of this module,mAP@0.5,improves by 1 percentage point and slightly improves the detection speed(Table 4).Subsequently,by replacing the loss function with the WIoU loss function,the anchor box quality is improved.The Focus module can improve the detection of small target defects,and the effectiveness of the corresponding improvement points is verified.After replacing the original loss function with the WIoU loss function,the overall accuracy index,mAP@0.5,is improves by 1.3 percentage points(Table 4).mAP@0.5 is improved by 2 percentage points after replacing the first-layer convolution module with the Focus module(Table 4).The improved algorithm effectively improves the accuracy of the welding seam defect detection.The improved model enhances the detection accuracy of each defect without compromising the detection speed and the number of model parameters when compared with the original model.Specifically,the detection accuracy for pore defects,slag inclusions,and incomplete penetration increase by 2.5,1.9,and 1.7 percentage points,respectively(Table 1).All of these indices exceed those achieved by the other defect detection models.Conclusions To improve the detection accuracy of the YOLO model,a new algorithm,Sim-YOLOv8,is proposed for detecting defects in DR images of welds.The improved algorithm effectively improves the accuracy of defect detection in the DR images of aluminum alloy welds without increasing the number of model parameters or affecting the detection speed of the model.First,the SimAM module is added to C2f to improve the overall network performance,primarily by adding a SimAM module to the bottleneck module in the C2f module.The improved model in this module improves the detection accuracy indicator mAP@0.5 by 1 percentage point(Table 4).The loss function is then replaced with the WIoU loss function,with an average accuracy improvement of 1.3 percentage points(Table 4).The first-layer convolution module is replaced with the Focus convolution module,improving the average accuracy by 2 percentage points(Table 4).Finally,when compared with the original YOLOv8 model,the overall accuracy index of the improved Sim-YOLOv8 model increases by 2 percentage points,accuracy of pore detection increases by 2.5 percentage points,accuracy of slag inclusion detection increases by 1.9 percentage point,and accuracy of incomplete penetration detection increases by 1.7 percentage points(Table 1).The number of parameters and floating-point operations did not change.Compared with other object detection models,the improved model exhibits the highest detection accuracy,better overall indicators,and is more suitable for deployment in DR image detection equipment for aluminum alloy weld defects.

laser techniqueimage processingDR image defect detectionYOLOv8SimAM moduleWIoU loss function

吴磊、储钰昆、杨洪刚、陈云霞

展开 >

上海第二工业大学智能制造与控制工程学院,上海 201209

上海电机学院,上海 201306

激光技术 图像处理 DR图像缺陷检测 YOLOv8 SimAM模块 WIoU损失函数

国家自然科学基金上海市自然科学基金

5180916118ZR1416000

2024

中国激光
中国光学学会 中科院上海光机所

中国激光

CSTPCD北大核心
影响因子:2.204
ISSN:0258-7025
年,卷(期):2024.51(16)