Weld Seam Image Defect Detection Technology Based On Improved Yolo Algorithm
DOI:
https://doi.org/10.64252/06b4v351Keywords:
Image Processing; Object Detection; YOLOv8s; SimAM Module; Inner-CIoU Loss FunctionAbstract
In response to the problem of insufficient accuracy in current object detection algorithms for weld seam image defect detection, an improved model based on YOLOv8, called Sim-YOLOv8s, is proposed. First, the C2f module is improved by incorporating the SimAM module to enhance the overall performance of the model, reduce computational redundancy, and speed up network feature extraction. Second, the network structure is optimized based on the scale characteristics of weld seam defect targets to alleviate the loss of small target information caused by excessive downsampling. The Inner-CIoU is used as the new localization regression loss function to improve the learning capability for small target samples and accelerate the convergence of the bounding box regression. Finally, the model is pruned using Layer Adaptive Magnitude Pruning (LAMP), which sacrifices a certain amount of accuracy to reduce the model size and the number of parameters, enabling fast detection on embedded devices. Knowledge distillation is applied to compensate for the detection accuracy lost due to pruning, thereby improving the model's detection performance. Experimental results show that, with a threshold of 0.5, the Sim-YOLOv8s model achieves an average precision (mAP50) of 93.9%, 94.3%, and 97.2% for detecting pores, inclusions, and lack of fusion defects, respectively, improving by 2.4, 2.5 and 1.7 percentage points over the original model, demonstrating better weld seam defect detection performance.