| Due to the complexity of the welding process and the randomness of process disturbances,unpredictable welding defects can occur during the weld forming process,which can seriously degrade the mechanical properties of the welded components,leading to serious consequences.Therefore,the detection of weld defects is crucial,but traditional manual detection is inefficient,costly,and susceptible to subjective influences.This paper uses machine vision to simulate manual detection of weld defects,and conducts in-depth research on the three core technologies of machine vision: image acquisition,image processing and analysis,develops a weld defect detection system based on machine vision to improve the automation level and detection efficiency of weld defect detection.The main work is as follows:A company in Guizhou completed the design and construction of a machine vision platform,and collected 4,586 weld images of welding products produced by the welding system.Aiming at the problem of poor quality of collected images,an adaptive segmentation dynamic histogram equalization image enhancement algorithm is proposed.This method establishes a feature pyramid to achieve feature fusion to improve the detection accuracy of small objects,and splits the histogram into multiple sub-histograms,so that each subhistogram has a controllable gray-level dynamic range and avoids image feature loss.In order to verify the effectiveness of the algorithm,an image evaluation index is introduced to compare and analyze the mainstream algorithms.The experimental results show that the improved algorithm in this paper has the best performance on the three evaluation indexes,and it can be seen from the renderings that the image details are the most abundant.Aiming at the low accuracy and slow speed of the original algorithm for small target detection,a defect detection method based on the improved Faster-RCNN algorithm was proposed.This method uses the K-means clustering algorithm to optimize the anchor frame,proposes a decoupling classification refinement structure to achieve reclassification to reduce the network false alarm rate,and establishes a feature pyramid networks to achieve feature fusion to improve the detection accuracy of small objects.The effectiveness of the improved algorithm is verified in the Co Co2017 public data set and the self-collected TIG welding defect data set.The results show that compared with the original Faster-RCNN algorithm,the recall rate of the proposed algorithm is increased by 9.7%,and the accuracy rate is increased by 11.1%.The improved network is compressed by model pruning technology,and the model size is reduced by about 40%.The experimental results show that the improved and pruned algorithm has an accuracy rate of 93.1%,a recall rate of 90.5%,and FPS is 20,which meets the defect detection requirements in product engineering practice.Based on the above research,the weld defect detection system was developed and operated in engineering practice.Design the overall system architecture,system class diagram and database;A model library is constructed to improve the generalization ability of the system,and the SORT target tracking algorithm is used to improve the tracking accuracy.The system was put into use in an enterprise in Guizhou,the detection accuracy of the system reached 94.27%,the missed detection rate was 0.98%,and the detection speed of each picture was 0.65 s,which has certain performance advantages and can effectively meet the actual production needs. |