| Welding is widely used in various industrial fields,due to the impact of welding process and production environment,surface defects are prone to occur during the welding process,which can affect welding quality and pose potential safety hazards.Therefore,it is crucial to detect weld surface defects.Manual inspection methods have high labor intensity,low testing efficiency,and the results are easily affected by subjective factors;Detection methods based on traditional machine vision require manual design of features and training of classifiers,which is cumbersome and has poor robustness.The extensive application of deep learning in image classification,face recognition,and other fields provides new ideas for industrial detection.This paper combines object detection algorithms in the field of deep learning with weld defect detection,and proposes a weld defect detection model based on improved Faster R-CNN from the perspective of detection accuracy and real-time detection.The main work of this paper is as follows:(1)Research and analyze the original Faster R-CNN model,and improve the original model from two aspects: detection speed and detection accuracy.Firstly,the lightweight network Efficient Net is used as the backbone network of the model for feature extraction to reduce the amount of parameters in the model and improve the reasoning speed;Secondly,introduce a shuffle attention mechanism into the backbone network to make the network pay more attention to defect features and obtain more informative feature maps;Finally,use ROI Align to replace the ROI Pooling in the original model to reduce computational errors and obtain more accurate location information.(2)Collect weld defect images and expand them to build a weld defect dataset,and conduct experiments on this dataset.The experimental results show that the average detection accuracy of the improved Faster R-CNN model proposed in this paper is 94.93%,the model parameter amount is 29.75 M,and the detection speed is 38.46 FPS.At the same time,both detection accuracy and real-time performance are taken into account,verifying the effectiveness of the improved model proposed in this paper.(3)Based on the improved Faster R-CNN model,a weld defect detection system was designed and developed,which can automatically detect weld defect images by calling the model,display the detection results in real-time on the interactive interface,and automatically save the detection results. |