{"title":"基于改进YOLOv5的PCB缺陷检测算法","authors":"Rui Wu, Haibin Li","doi":"10.1117/12.3004442","DOIUrl":null,"url":null,"abstract":"Aiming at the problem of small contrast difference between the defective region and the background region in PCB images, This Article presents an enhanced YOLOv5 algorithm with a multi-scale detection approach. To enhance the YOLOv5 algorithm, this Article upgrades its backbone network by replacing Characteristics Abstraction network with the ASPP module. This change aims to improve the network's perceptual field and Characteristics extraction capability. Secondly, in order to improve the attention of the model to other regions, this Article introduces the attention mechanism Coordinate Attention module, which embeds the location information into the channel attention and achieves multi-scale processing and Characteristics fusion. Finally, this Article uses different sizes of anchor frames for multiscale detection of defective targets. The experimental results show that the size of the improved multiscale network model is only 83% of the size of the original YOLOv5 model, and the mAP on the dataset reaches 97.2%. The algorithm proposed in this Article can effectively detect various defects in PCB images and has high detection precision and low false detection rate, which has good practical value and prospect of popularization and application.","PeriodicalId":143265,"journal":{"name":"6th International Conference on Advanced Electronic Materials, Computers and Software Engineering (AEMCSE 2023)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-08-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"PCB defect detection algorithm based on improved YOLOv5\",\"authors\":\"Rui Wu, Haibin Li\",\"doi\":\"10.1117/12.3004442\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Aiming at the problem of small contrast difference between the defective region and the background region in PCB images, This Article presents an enhanced YOLOv5 algorithm with a multi-scale detection approach. To enhance the YOLOv5 algorithm, this Article upgrades its backbone network by replacing Characteristics Abstraction network with the ASPP module. This change aims to improve the network's perceptual field and Characteristics extraction capability. Secondly, in order to improve the attention of the model to other regions, this Article introduces the attention mechanism Coordinate Attention module, which embeds the location information into the channel attention and achieves multi-scale processing and Characteristics fusion. Finally, this Article uses different sizes of anchor frames for multiscale detection of defective targets. The experimental results show that the size of the improved multiscale network model is only 83% of the size of the original YOLOv5 model, and the mAP on the dataset reaches 97.2%. The algorithm proposed in this Article can effectively detect various defects in PCB images and has high detection precision and low false detection rate, which has good practical value and prospect of popularization and application.\",\"PeriodicalId\":143265,\"journal\":{\"name\":\"6th International Conference on Advanced Electronic Materials, Computers and Software Engineering (AEMCSE 2023)\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-08-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"6th International Conference on Advanced Electronic Materials, Computers and Software Engineering (AEMCSE 2023)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1117/12.3004442\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"6th International Conference on Advanced Electronic Materials, Computers and Software Engineering (AEMCSE 2023)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1117/12.3004442","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
PCB defect detection algorithm based on improved YOLOv5
Aiming at the problem of small contrast difference between the defective region and the background region in PCB images, This Article presents an enhanced YOLOv5 algorithm with a multi-scale detection approach. To enhance the YOLOv5 algorithm, this Article upgrades its backbone network by replacing Characteristics Abstraction network with the ASPP module. This change aims to improve the network's perceptual field and Characteristics extraction capability. Secondly, in order to improve the attention of the model to other regions, this Article introduces the attention mechanism Coordinate Attention module, which embeds the location information into the channel attention and achieves multi-scale processing and Characteristics fusion. Finally, this Article uses different sizes of anchor frames for multiscale detection of defective targets. The experimental results show that the size of the improved multiscale network model is only 83% of the size of the original YOLOv5 model, and the mAP on the dataset reaches 97.2%. The algorithm proposed in this Article can effectively detect various defects in PCB images and has high detection precision and low false detection rate, which has good practical value and prospect of popularization and application.