Font Size: a A A

Research And Application Of YOLO-based Algorithm For PCB Board Surface Defect Detection

Posted on:2024-03-10Degree:MasterType:Thesis
Country:ChinaCandidate:H HuangFull Text:PDF
GTID:2568307181454204Subject:Electronic Information (in the field of computer technology) (professional degree)
Abstract/Summary:PDF Full Text Request
PCB as the carrier of key components of electronic products,its quality directly affects the final performance of electronic products.As PCB production continues to develop in the direction of high density,PCB manufacturers are putting forward more precise requirements for PCB product quality.Therefore,for the timely and accurate detection of PCB board defects has an extremely important research significance,industrial production for PCB surface defects detection gradually become a research hot spot and focus.Aiming at the existing PCB board defect detection,there are difficult and painful problems such as slow detection speed and many missed and false detections,a relevant study is conducted on six types of PCB defects that often occur in industrial production environments.In this thesis,we propose an improved YOLOv5 s model for PCB defect detection and successfully deploy the improved model to edge computing devices to realize a real-time online PCB defect detection system,with the following main research work and contributions:(1)To address the problems of low detection accuracy and inadequate feature extraction by the model due to the small sample size of real PCB defect data.In this thesis,an offline data augmentation strategy is used to expand the dataset so that the model can extract more sufficient feature information about the defects.Mosaic data augmentation is used to expand the dataset and annotate the expanded data to enhance the generalisation capability of the model.(2)To address the problems of small size and variety of PCB board defect types and their easy confusion with the surrounding background,and the lack of detection accuracy.Firstly,a dataset enhancement is carried out to improve the generalization ability of the model.Secondly,a priori frame improvement method based on the YOLOv5 s algorithm was proposed,using the K-means++ algorithm to re-cluster the width and height of this PCB defect to obtain nine sets of a priori frame sizes that are closer to the PCB defect,replacing the original model a priori frame size and improving the accuracy of the model in locating the defect.Finally,an attention mechanism was introduced in the feature extraction stage of the original YOLOv5 s model to enhance the feature extraction capability of the original YOLOv5 s model for different kinds of defects,and the improved YOLOv5 s model was obtained to enhance the model’s capability of feature extraction for different PCB defects.The improved YOLOv5 s model was compared with the YOLO series model for PCB defect detection experiments.The experimental results show that the m AP of the improved YOLOv5 s model is improved by 4.83% compared to the original YOLOv5 s,which reduces false and missed detections and effectively improves the overall performance of PCB defect detection.(3)A real-time online PCB defect detection system based on the improved YOLOv5 s model is implemented for the current complex PCB manufacturing industrial environment.The above improved inference model is deployed in the system with the edge computing device Jetson Xavier NX,and the defect detection time of the system is shortened using the Tensor RT method.A streaming service was also built based on RTMP push-pull real-time video streaming,and the PCB defect detection results were broadcast in real time at the terminal using the Web RTC protocol.The actual detection effect was tested to realise the system visualisation interface to view PCB defect detection results in real time,verifying that the PCB defect real-time online inspection system can basically meet the feasibility of industry for PCB defect detection.
Keywords/Search Tags:PCB defects, YOLOv5s, Attention mechanism, Jetson Xavier NX, Streaming services
PDF Full Text Request
Related items