Abstract:An improved YOLOv5 weld defect detection method based on deep learning was proposed in response to improve the efficiency of automatic detection and processing of weld defects in industry. Aiming at the insufficient weld sample data, a mosaic+mixup data augmentation strategy was proposed. At the same time, in order to reduce the amount of calculation and parameters of network, a lightweight GhostNet network was introduced to replace the residual module in CSP1 module in YOLOv5 backbone network, and CIOU_Loss was used as the coordinate position loss to improve the convergence rate and accuracy of the algorithm. Finally, the testing set was used for weld defect detection. The improved YOLOv5 has a mean average precision (mAP) of 96.88%, and the detection time of a single image is no more than 50 milliseconds, which is better than the traditional machine learning algorithms, could meet the real-time detection requirements of weld defects in practical engineering.