Font Size: a A A

Research On Surface Defect Detection Method Of Industrial Products Based On Attention Mechanism

Posted on:2024-05-07Degree:MasterType:Thesis
Country:ChinaCandidate:H C DuFull Text:PDF
GTID:2542306941478214Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Surface defect detection of industrial products is an important step in product quality assurance.Surface defects directly affect the appearance of the product,and can seriously lead to safety issues.Artificial defect detection methods are susceptible to subjective factors,and excessive fatigue can seriously affect detection accuracy and efficiency.Surface defect detection based on traditional image algorithms has gradually been applied to the detection field,but such methods can only identify specific features of defects,which has limitations and is difficult to generalize to other product defect detection.The cost of defect detection methods based on anomaly detection is low,but in the face of defects in complex backgrounds,the detection accuracy is difficult to meet the quality standards of industrial products.The detection method based on depth learning performs well in detecting complex background images.YOLOX is a one stage object detection model proposed in recent two years,which has the advantages of fast detection speed and high accuracy.In this paper,YOLOX model is selected as the benchmark model,and attention mechanism is integrated to study the problem of difficult detection of defects in complex background images.To solve the problem of high similarity between defect features and background features in complex background images,a YOLOX model defect detection method based on self attention mechanism was proposed.In the feature graph fusion stage of the feature aggregation network,Transformer Encoder is used to replace the CSP convolutional block,and the self attention mechanism in the Encoder can perform global analysis of the feature graph.During model training,the Mish activation function is used to replace the Swish activation function to improve the accuracy of model detection,while Focal Loss is used to replace the original object loss to improve the weight of difficult to classify samples.This method achieves 90.17%accuracy on defects similar to background features,surpassing other target detection models compared,but has lower accuracy on small target defects.To solve the problem of low detection accuracy of small defects in complex background images,a YOLOX model defect detection method based on channel attention mechanism was proposed.Introducing ECAM behind CSP convolution blocks in the backbone network enhances the ability to express important features by capturing the interdependencies between each channel of the feature graph and its k neighboring channels.In the feature aggregation network,a weighted bidirectional feature pyramid network is used to replace the original network,and the importance of each input feature to the output feature is determined by continuously adjusting the network weight.At the same time,NWD Loss is used to replace the original IoU loss to enhance the robustness of target box detection at different scales.This method achieves an accuracy of 84.90%on small target defects,surpassing other target detection models compared.Based on the method proposed in this paper,a surface defect detection system for industrial products was developed.It includes image acquisition,image preprocessing,defect detection,and result statistics functions,providing new technologies for surface defect detection in industrial production.
Keywords/Search Tags:surface defect detection, YOLOX model, feature extraction, feature fusion, attention mechanism
PDF Full Text Request
Related items