{"title":"Optimized Design of YOLOv5s Algorithm for Printed Circuit Board Surface Defect Detection","authors":"Kaisi Lin, Lu Zhang","doi":"10.1002/eng2.13117","DOIUrl":null,"url":null,"abstract":"<p>To address the challenge of detecting surface defects on printed circuit board (PCB), this paper proposes an improved method based on YOLOv5s. To enhance the detection of small target defects, the Coordinate Attention mechanism is integrated into the three Convolutional layers module of YOLOv5s, and the Normalized Gaussian Weighted Distance loss is introduced to replace the Complete Intersection over Union loss. To achieve a lightweight model with parameters reduced and to enhance detection speed for real-time applications and terminal deployment, the convolutional layers in the Neck module of YOLOv5s are replaced with Grouped Shuffled Convolution layers. Evaluated on two benchmark data sets, the PCB_DATASET and DeepPCB data sets, the improved model achieves 97.0% and 99.1% in [email protected] and achieves 163 and 167 in Frames Per Second, respectively. In addition, the model parameters are reduced to 6.6 million, meeting the demands of small target detection in real-time applications.</p>","PeriodicalId":72922,"journal":{"name":"Engineering reports : open access","volume":"7 2","pages":""},"PeriodicalIF":1.8000,"publicationDate":"2025-02-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://onlinelibrary.wiley.com/doi/epdf/10.1002/eng2.13117","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Engineering reports : open access","FirstCategoryId":"1085","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/eng2.13117","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
To address the challenge of detecting surface defects on printed circuit board (PCB), this paper proposes an improved method based on YOLOv5s. To enhance the detection of small target defects, the Coordinate Attention mechanism is integrated into the three Convolutional layers module of YOLOv5s, and the Normalized Gaussian Weighted Distance loss is introduced to replace the Complete Intersection over Union loss. To achieve a lightweight model with parameters reduced and to enhance detection speed for real-time applications and terminal deployment, the convolutional layers in the Neck module of YOLOv5s are replaced with Grouped Shuffled Convolution layers. Evaluated on two benchmark data sets, the PCB_DATASET and DeepPCB data sets, the improved model achieves 97.0% and 99.1% in [email protected] and achieves 163 and 167 in Frames Per Second, respectively. In addition, the model parameters are reduced to 6.6 million, meeting the demands of small target detection in real-time applications.