| Manual quality inspection of weld seams can lead to judgment errors,negatively impacting engineering quality and posing risks to physical and mental health due to prolonged testing.The trend is to adopt automated technology combined with machine vision for intelligent detection of weld seam defects.This article focuses on the detection of defects in pole weld seams,integrating laser vision technology,deep learning,and PLC control technology to achieve accurate and efficient defect detection and precise and rapid classification of pole materials.Firstly,the overall plan is determined based on the purpose,size features,and working principles of laser vision sensors for poles,with the pole placed horizontally.Mechanical structure features are analyzed,device selection is made,and a pole weld seam defect detection platform is designed and built.The Zhang Zhengyou camera calibration method is used to measure the internal and external parameters of the camera,and the camera position is adjusted based on the 3D reconstruction image effect.Secondly,to solve the problem of excessive redundant information in the obtained images and insufficient weld seam defect quantity,the region of interest(ROI)is obtained through binarization and morphological processing,and then cropped.Filtering and noise reduction are performed,and edge detection algorithms and their improved algorithms are experimented with to obtain better feature extraction results.Furthermore,images containing weld seam feature information are cropped to a resolution of 640×640,and geometric transformation and generative adversarial network(GAN)data enhancement are used to avoid neural network overfitting and obtain a dataset containing 5816 images.The dataset is divided into training,validation,and testing sets in a ratio of 6:2:2.The YOLO v5 neural network is improved by adding an attention mechanism module,changing the network structure,and improving the localization loss function.The experimental accuracy of the model is 92.6%,and the processing speed is 74FPS.Finally,the control system is designed.Python is used to design upper computer software,create a defect feature library,and store defect images by type in the library,which can be enriched in quantity during production.TIA Portal is used for simulated wiring to achieve communication between the upper computer software and PLC,and a user control program is written.McgsPro configuration software is used to design a touch screen human-machine interface.Weld seam defect detection experiments are conducted to verify the feasibility of the system.This article proposes a method for the control system design of weld seam defect detection based on deep learning and PLC control,which can guide real-time detection of pole weld seams in engineering and dynamically enrich the feature library,thereby improving detection efficiency. |