Abstract:In order to achieve automatic detection of defects in metal hoses in industry, a deep learning based defect detection method is proposed. Firstly, a camera is used to capture images of defects in metal hoses, and the defect feature parts in the collected images are classified and calibrated. The surface defects of metal hoses can be divided into three types: broken wire, loose wire, and stacked wire, and corresponding self-made datasets are created; Secondly, the YOLOv5s network is improved by adding SimAM attention mechanism to the backbone network of YOLOv5s; Then use the EIoU loss function to replace the IoU loss function used by the initial network; Finally, the pyramid pooling layer in YOLOv5s was improved by replacing the SPPF module with the SimSPPF module. The improved algorithm was used to train the dataset of metal hose defects. Compared with the initial YOLOv5s network, the average accuracy mAP of the improved algorithm increased by 1.5%, and the missed and false detections of complex features and small targets were significantly improved.