Vision transformer and Mamba-attention fusion for high-precision PCB defect detection
Defects in printed circuit boards (PCBs) are being detected using computer vision-based techniques. Defect-free PCBs are essential for the reliability of consumer electronics. However, deep learning-based methods often struggle with imbalanced defect distributions and limited generalization. To address these challenges, we propose ViT-Mamba, a hybrid framework that combines Vision Transformers with a Mamba-inspired attention mechanism for global feature extraction and precise defect segmentation. We further introduce an artificial defect generation module that systematically creates six types of PCB defects to improve robustness. A multiscale hierarchical refinement strategy is employed to enhance feature representation for accurate segmentation. Experiments on a public PCB defect dataset show that ViT-Mamba outperforms existing methods, achieving a mean Average Precision (mAP) of 99.69%.
Authors
- Muhammad Umraiz (ORCID: https://orcid.org/0000-0002-9555-0309)
- Kwang Nam Choi (ORCID: https://orcid.org/0000-0002-7420-9216)
- Shafiullah Soomro (ORCID: https://orcid.org/0000-0002-4318-5055)
- Asim Niaz (ORCID: https://orcid.org/0000-0003-3905-9774)
Institutions
- Linnaeus University (SE)
- Chung-Ang University (KR)
Publication Details
- Journal
- PLoS ONE
- Published
- 2025-09-25
- DOI
- https://doi.org/10.1371/journal.pone.0331175
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00