Defect inspection of the surface in ultrasonically welded wire terminations is an important inspection procedure to ensure welding quality. However, the detection task of ultrasonic welding defects based on deep learning still faces the challenges of low detection accuracy and slow inference speed. Therefore, to solve the above problems, we propose a fast and effective lightweight detection model based on You Only Look Once v8 (YOLOv8n), named LightYOLO. Specifically, first, to achieve fast feature extraction, a Two-Convolution module with FasterNet block and Efficient multi-scale attention (CTFE) structures is introduced in the backbone network. Secondly, Group-Shuffle Convolution (GSConv) is used to construct the feature fusion structure of the neck, which enhances the fusion efficiency of multi-level features. Finally, an auxiliary head training method is introduced to extract shallow details of the network. To verify the effectiveness of the proposed method, we constructed a surface defect data set of ultrasonic welding wire terminals and conducted a series of experiments. The results of experiments show that the precision of LightYOLO is 93.4%, which is 3.5% higher than YOLOv8n(89.9%). In addition, the model size was reduced to 1/2 of the baseline model. LightYOLO shows the potential for rapid detection on edge computing devices. The source code and dataset for our project is accessible at https://github.com/JianshuXu/LightYOLO.
Read full abstract