Visual Quality Inspection of Printed Circuit Boards with Limited Defect Samples

Authors

  • Killian Leddin Department of Computer Science and Engineering, University at Buffalo, Buffalo, NY, USA. Author
  • Luuk Gruijl Department of Computer Science and Engineering, University of Nevada, Reno, Reno, NV, USA. Author
  • Ebba Edman Department of Computer Science, George Mason University, Fairfax, VA, USA. Author

Keywords:

printed circuit board inspection; few-shot learning; anomaly detection; defect synthesis; uncertainty calibration; visual quality control

Abstract

Visual inspection of printed circuit boards is constrained by a severe mismatch between the diversity of real defect modes and the number of labeled defect examples available during production ramp-up, high-mix manufacturing, and line changes. This manuscript develops a coherent methodological framework for limited-sample printed circuit board defect inspection that combines metric-based few-shot representation learning, defect-aware constrained synthesis, normality modeling for open-set anomaly rejection, probability calibration, and cost-sensitive decision making. The central contribution is not a single classifier but an inspection architecture that separates sample-efficient defect discrimination from normal-sample anomaly detection and then reconciles both under an explicit quality-cost criterion. The framework uses episodic support-query training to prevent information leakage across inspection tasks, prototype embeddings to stabilize decisions when only a few labeled defects exist, mask-conditioned synthesis to expand rare defect appearances without inventing unobserved physical mechanisms, and calibrated rejection thresholds to route ambiguous boards to human review. Analytical assessment shows why threshold choice, false-call costs, defect prevalence, augmentation realism, and domain shift jointly determine inspection behavior more strongly than nominal classifier capacity. Practical significance lies in a transparent design logic for factories that cannot assume large balanced defect datasets but still require controlled false accept and false reject rates.

References

1. Chin, R. T., & Harlow, C. A. (1982). Automated visual inspection: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 4(6), 557–573.

2. Moganti, M., Ercal, F., Dagli, C. H., & Tsunekawa, S. (1996). Automatic PCB inspection algorithms: A survey. Computer Vision and Image Understanding, 63(2), 287–313.

3. Mar, N. S. S., Yarlagadda, P. K. D. V., & Fookes, C. (2011). Design and development of automatic visual inspection system for PCB manufacturing. Robotics and Computer-Integrated Manufacturing, 27(5), 949–962.

4. Weimer, D., Scholz-Reiter, B., & Shpitalni, M. (2016). Design of deep convolutional neural network architectures for automated feature extraction in industrial inspection. CIRP Annals, 65(1), 417–420.

5. Ren, R., Hung, T., & Tan, K. C. (2018). A generic deep-learning-based approach for automated surface inspection. IEEE Transactions on Cybernetics, 48(3), 929–940.

6. Snell, J., Swersky, K., & Zemel, R. (2017). Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems 30 (pp. 4077–4087). Curran Associates.

7. Vinyals, O., Blundell, C., Lillicrap, T., & Wierstra, D. (2016). Matching networks for one shot learning. In Advances in Neural Information Processing Systems 29 (pp. 3630–3638). Curran Associates.

8. Finn, C., Abbeel, P., & Levine, S. (2017). Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning (Vol. 70, pp. 1126–1135). PMLR.

9. Bergmann, P., Fauser, M., Sattlegger, D., & Steger, C. (2019). MVTec AD—A comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 9592–9600). IEEE.

10. Ruff, L., Vandermeulen, R., Goernitz, N., Deecke, L., Siddiqui, S. A., Binder, A., Müller, E., & Kloft, M. (2018). Deep one-class classification. In Proceedings of the 35th International Conference on Machine Learning (Vol. 80, pp. 4393–4402). PMLR.

11. Schlegl, T., Seeböck, P., Waldstein, S. M., Schmidt-Erfurth, U., & Langs, G. (2017). Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In Information Processing in Medical Imaging (pp. 146–157). Springer.

12. Shorten, C., & Khoshgoftaar, T. M. (2019). A survey on image data augmentation for deep learning. Journal of Big Data, 6, 60.

13. Cubuk, E. D., Zoph, B., Mane, D., Vasudevan, V., & Le, Q. V. (2019). AutoAugment: Learning augmentation strategies from data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 113–123). IEEE.

14. Pan, S. J., & Yang, Q. (2010). A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10), 1345–1359.

15. Yosinski, J., Clune, J., Bengio, Y., & Lipson, H. (2014). How transferable are features in deep neural networks? In Advances in Neural Information Processing Systems 27 (pp. 3320–3328). Curran Associates.

16. Guo, C., Pleiss, G., Sun, Y., & Weinberger, K. Q. (2017). On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning (Vol. 70, pp. 1321–1330). PMLR.

17. Gal, Y., & Ghahramani, Z. (2016). Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. In Proceedings of the 33rd International Conference on Machine Learning (Vol. 48, pp. 1050–1059). PMLR.

18. Johnson, J. M., & Khoshgoftaar, T. M. (2019). Survey on deep learning with class imbalance. Journal of Big Data, 6, 27.

19. He, K., Zhang, X., Ren, S., & Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (pp. 770–778). IEEE.

20. Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. In International Conference on Learning Representations.

Downloads

Published

2022-11-10