Weld defects detection method based on improved YOLOv5s
-
Graphical Abstract
-
Abstract
To solve the problem of low detection accuracy for complex weld defects, the paper proposes a weld defects detection method based on improved YOLOv5s. To enhance the ability to focus on key information in feature maps, the scSE attention mechanism is introduced into the backbone network of YOLOv5s. A Fusion-Block module and additional layers are added to the neck network of YOLOv5s to improve the effect of feature fusion, which is to meet the needs of complex object detection. To reduce the computational complexity of the model, the C3Ghost module is used to replace the CSP2_1 module in the neck network of YOLOv5s. The scSE-ASFF module is constructed and inserted between the neck network and the prediction end, which is to realize the fusion of features between the different layers. To address the issue of imbalanced sample quality in the dataset and improve the regression speed and accuracy of the loss function, the CIoU loss function in the YOLOv5s model is replaced with the Focal-EIoU loss function. Finally, experiments are conducted based on the collected weld defect dataset to verify the feasibility of the improved YOLOv5s for weld defects detection. The experimental results show that the precision and mAP of the improved YOLOv5s in detecting complex weld defects are as high as 83.4% and 76.1%, respectively, which are 2.5% and 7.6% higher than the traditional YOLOv5s model. The proposed weld defects detection method based on the improved YOLOv5s in this paper can effectively solve the problem of low weld defects detection accuracy.
-
-