Font Size: a A A

Research On Surface Defect Detection Technology Of Hydraulic Valve Block Based On Deep Learning

Posted on:2024-02-10Degree:MasterType:Thesis
Country:ChinaCandidate:J J JiFull Text:PDF
GTID:2542307154499864Subject:Master of Mechanical Engineering (Professional Degree)
Abstract/Summary:
The machining process of hydraulic valve block is complex,and several rough machining operations can cause defects on the surface of hydraulic valve block during the production process.These defects not only affect the quality of the workpiece,but also affect the driving safety of the machinery in serious cases,therefore,it is necessary to detect and screen the hydraulic valve blocks with defects on the surface in advance.Unlike the subjectivity of manual inspection and the limitations of machine vision inspection,the defect detection based on deep learning has the advantages of high accuracy,high efficiency and high generalization.In view of this,this thesis studies and improves the surface defect detection algorithm of hydraulic valve block based on deep learning technology,and the improved detection algorithm can complete the task of hydraulic valve block surface defect detection more efficiently and accurately.The main research contents of this thesis are as follows:(1)To discover the detection difficulties through the analysis of the characteristics of the hydraulic valve block surface defects,and to design the overall scheme of the detection system for the project requirements,and then to design the software part and hardware part of the system according to the development environment of the detection system and the imaging effect that should be achieved.(2)Given that there is no publicly available hydraulic valve block surface defect data set at home and abroad,this thesis collects real hydraulic valve block images with defects on the surface,and uses Label Img software to label the collected images with defects,and then expands the data set by fusing offline data enhancement and Mosaic data enhancement to enhance the robustness of the algorithm,and completes the construction of the entire defect data set.(3)Three typical YOLO detection algorithms,YOLOv4,YOLOv5 and YOLOv7,are selected for the hydraulic valve block surface defect detection problem for training study.After studying the network structures and training inference strategies of the three YOLO algorithms,they were trained and tested on the constructed hydraulic valve block surface defect dataset respectively,and the comparative analysis of the detection performance revealed that the detection accuracies of YOLOv4 and YOLOv5 were only 32% and 52.5%,while the accuracy value of YOLOv7 reached 89.2%.Therefore,YOLOv7 was finally selected as the base defect detection model for subsequent improvements based on the high accuracy requirements for industrial inspection.(4)To address the problem of poor positioning ability of the algorithm due to the tiny size of the hydraulic valve block surface defects and the small area share in the image,the K-Means++ algorithm and the addition of CA attention mechanism are proposed to increase the positioning accuracy of the algorithm.The improved algorithm can reduce the localization error caused by the mismatch of the original set a priori frame size and make the algorithm locate tiny defects more accurately by embedding the spatial location information into the feature map.The detection speed of the model with improved positioning capability is 59.8 frame/s,and the detection accuracy value reaches 94.1%,which is 4.9 percentage points higher compared to the original YOLOv7.(5)To address the problem that some information is lost and reduced after multiple convolutional layers of the hydraulic valve block surface micro-defect features,the improved ELAN-Rep Conv structure and the improved Up C multi-branch sampling structure are used on the detection model with improved localization capability to enhance the feature extraction capability of the algorithm for micro-defects,and to obtain the hydraulic valve block detection model proposed in this thesis.surface defect detection model.The proposed ELAN-Rep Conv structure combines the advantages of the EALAN_2 structure and the Rep Conv structure,which can enable the model to extract more defect feature information during training without affecting the inference speed.The proposed Up C multi-branch upsampling structure can reduce the loss of information and enrich the extracted information of tiny defect features while increasing the feature size through parallel upsampling by nearest neighbor interpolation and deconvolution.The detection speed of the improved model is 55.2 frame/s,and the detection accuracy value reaches 97.6%,which is8.4 percentage points higher compared to the original YOLOv7.Through comparison experiments with other inspection algorithms,it is proved that the improved inspection model has the best comprehensive detection performance and can detect the defects existing on the surface of the hydraulic valve block more accurately.(6)In order to use the inspection model more intuitively and conveniently to identify defects,a visual inspection interface was developed using Py Qt5 and the model was deployed to the C++ environment based on Libtorch.The comparison of the detection results before and after deployment shows that the deployed model meets the requirements of high precision detection.
Keywords/Search Tags:Hydraulic valve block, Defect detection, Attention mechanism, Deep learning, YOLOv7
Related items