Xinghang Yin , Shuxia Wang , Yue Wang , Peng Wang , Yongxu Liu , Tianle Shen , Hengjie Qiao
{"title":"基于光流和重构制导的零射印刷电路板缺陷检测","authors":"Xinghang Yin , Shuxia Wang , Yue Wang , Peng Wang , Yongxu Liu , Tianle Shen , Hengjie Qiao","doi":"10.1016/j.compind.2025.104355","DOIUrl":null,"url":null,"abstract":"<div><div>Deep learning is widely used in printed circuit board (PCB) defect detection, owing to its excellent performance. Different types and styles of PCBs exist, for application in different fields and scenarios, making it necessary to fine-tune model on unseen PCB types to maintain detection performance. Few-shot learning methods reduce the cost of data collection and annotation, as they require fewer samples. Under ideal circumstances and with standardized electronic components, image differencing techniques can highlight defects by comparing test images with defect-free reference images, making them category-agnostic, generalizable, and highly interpretable. However, they require careful image preprocessing and parameter selection, and fail if the images are misaligned. To address this issue, while preserving the generalizability of image differencing, we propose a method for PCB defect detection by simulating image differencing using a neural network comprising a shared encoder and three decoders for different tasks: (1) The flow decoder outputs an optical flow displacement field to align image pairs and guides the encoder to learn pixel correspondence relationships, (2) The reconstruction decoder guides the encoder to focus on perceiving the discrepancies between images. (3) The mask decoder locates defective areas with significant visual discrepancies between images. We train the network exclusively on synthetic data and then test it on the publicly available datasets, DeepPCB, PCBS, and MVTec AD, achieving results comparable to that of supervised learning with numerous real samples. Ablation experiments demonstrate that optical flow and reconstruction guidance can effectively enhance the robustness of the network.</div></div>","PeriodicalId":55219,"journal":{"name":"Computers in Industry","volume":"173 ","pages":"Article 104355"},"PeriodicalIF":9.1000,"publicationDate":"2025-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Zero-shot printed circuit board defect detection via optical flow and reconstruction guidance\",\"authors\":\"Xinghang Yin , Shuxia Wang , Yue Wang , Peng Wang , Yongxu Liu , Tianle Shen , Hengjie Qiao\",\"doi\":\"10.1016/j.compind.2025.104355\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>Deep learning is widely used in printed circuit board (PCB) defect detection, owing to its excellent performance. Different types and styles of PCBs exist, for application in different fields and scenarios, making it necessary to fine-tune model on unseen PCB types to maintain detection performance. Few-shot learning methods reduce the cost of data collection and annotation, as they require fewer samples. Under ideal circumstances and with standardized electronic components, image differencing techniques can highlight defects by comparing test images with defect-free reference images, making them category-agnostic, generalizable, and highly interpretable. However, they require careful image preprocessing and parameter selection, and fail if the images are misaligned. To address this issue, while preserving the generalizability of image differencing, we propose a method for PCB defect detection by simulating image differencing using a neural network comprising a shared encoder and three decoders for different tasks: (1) The flow decoder outputs an optical flow displacement field to align image pairs and guides the encoder to learn pixel correspondence relationships, (2) The reconstruction decoder guides the encoder to focus on perceiving the discrepancies between images. (3) The mask decoder locates defective areas with significant visual discrepancies between images. We train the network exclusively on synthetic data and then test it on the publicly available datasets, DeepPCB, PCBS, and MVTec AD, achieving results comparable to that of supervised learning with numerous real samples. Ablation experiments demonstrate that optical flow and reconstruction guidance can effectively enhance the robustness of the network.</div></div>\",\"PeriodicalId\":55219,\"journal\":{\"name\":\"Computers in Industry\",\"volume\":\"173 \",\"pages\":\"Article 104355\"},\"PeriodicalIF\":9.1000,\"publicationDate\":\"2025-09-25\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Computers in Industry\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0166361525001204\",\"RegionNum\":1,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computers in Industry","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0166361525001204","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
Zero-shot printed circuit board defect detection via optical flow and reconstruction guidance
Deep learning is widely used in printed circuit board (PCB) defect detection, owing to its excellent performance. Different types and styles of PCBs exist, for application in different fields and scenarios, making it necessary to fine-tune model on unseen PCB types to maintain detection performance. Few-shot learning methods reduce the cost of data collection and annotation, as they require fewer samples. Under ideal circumstances and with standardized electronic components, image differencing techniques can highlight defects by comparing test images with defect-free reference images, making them category-agnostic, generalizable, and highly interpretable. However, they require careful image preprocessing and parameter selection, and fail if the images are misaligned. To address this issue, while preserving the generalizability of image differencing, we propose a method for PCB defect detection by simulating image differencing using a neural network comprising a shared encoder and three decoders for different tasks: (1) The flow decoder outputs an optical flow displacement field to align image pairs and guides the encoder to learn pixel correspondence relationships, (2) The reconstruction decoder guides the encoder to focus on perceiving the discrepancies between images. (3) The mask decoder locates defective areas with significant visual discrepancies between images. We train the network exclusively on synthetic data and then test it on the publicly available datasets, DeepPCB, PCBS, and MVTec AD, achieving results comparable to that of supervised learning with numerous real samples. Ablation experiments demonstrate that optical flow and reconstruction guidance can effectively enhance the robustness of the network.
期刊介绍:
The objective of Computers in Industry is to present original, high-quality, application-oriented research papers that:
• Illuminate emerging trends and possibilities in the utilization of Information and Communication Technology in industry;
• Establish connections or integrations across various technology domains within the expansive realm of computer applications for industry;
• Foster connections or integrations across diverse application areas of ICT in industry.