Font Size: a A A

Defect Detection Of PCB And Color Cloth Based On Deep Learning

Posted on:2024-07-05Degree:MasterType:Thesis
Country:ChinaCandidate:Z X ShiFull Text:PDF
GTID:2531307127453984Subject:Control Science and Engineering
Abstract/Summary:PDF Full Text Request
In the industrial production process,the defect detection of different products is a crucial process.The defect detection method based on digital image processing technology to extract features often needs to manually extract features or design different features according to different defect categories,which lacks adaptability in industrial practical applications.In recent years,the surface defect detection technology of industrial products based on deep learning technology has been gradually applied to practice.Because it uses automatic feature extraction by machines,it has shown excellent performance in practice.Therefore,this paper is based on the YOLOv5 detection model in the YOLO(You Only Look Once)target detection algorithm in deep learning,and introduces different improvement measures in the detection model,so that the detection model can be applied to the actual application of industrial product surface defect detection.Different requirements.This paper proposes a multi-scale PCB(Printed Circuit Board)defect detection model combined with the Transformer encoder structure for the detection difficulties in the surface defect detection of printed circuit boards,where most of the defects are small targets.The improved detection model adds a high-resolution detection head to the detection head part,and connects it with a Transformer encoder structure in the neck network to significantly improve the detection effect on small targets.Then this paper use the CA(Coordinate Attention)mechanism in the backbone network to improve the feature extraction network,and use different IOU(Intersection over Union)algorithms to improve the boundary loss function of the predicted real frame.Compared with other mainstream detection models and the original detection model through simulation experiments,it is proved that these improvements can effectively improve the detection accuracy of PCB defect detection.Next,this paper studies the defect of color cloth.In the defect detection of color cloth,there are a large number of small target defects,and these small target defects are easily affected by image noise.Moreover,there are new detection difficulties such as the extreme aspect ratio of the new defect and the defect that is very similar to the background among the defects.Aiming at these detection difficulties,a color cloth defect detection model combining static and dynamic context information is proposed in this paper.First use the high-resolution detection head,and then use the Co T structure in the CTN(Contextual Transformer Network)to replace the convolution module of the backbone network in the detection model to form a CTN structure,and use static and dynamic context information to improve visual expression ability.Then,different attention mechanisms are added to the neck network for comparison,and the attention mechanism most suitable for cloth surface defect detection is selected.In addition,we continued to improve the IOU algorithm for predicting the real frame,compared several mainstream IOU algorithms and selected an algorithm that is more suitable for color cloth surface defects.The experiments show that the improved detection model has achieved the best detection effect in the detection of cloth surface defects compared with other detection models.Finally,considering industrial applications,in order to facilitate the deployment of detection algorithms to embedded devices,a lightweight detection model based on FPGM(Geometric Median Filter Pruning)is proposed based on the smaller YOLOv5 s detection model in the YOLOv5 series.The new detection model uses a lightweight Ghost convolutional structure in the backbone network to replace the convolutional structure in the original model,and then conducts experiments on the above-mentioned PCB and cloth defect data sets,and selects different pruning rates for experiments.Select the detection model under the best pruning rate.The improved detection model with the best pruning rate has obvious advantages in the number of model parameters and weight file size,and can have both detection speed and detection accuracy.
Keywords/Search Tags:Defect detection, YOLOv5, Transformer encoder, Attention mechanism, Pruning algorithm
PDF Full Text Request
Related items