Few-Shot Learning for Industrial Defect Detection Using Meta-Learning Techniques
Downloads
Industrial defect detection plays a pivotal role in maintaining quality and safety across manufacturing processes. Traditional deep learning methods for visual inspection and defect classification rely heavily on large volumes of annotated data, which are often costly and difficult to obtain in real-world industrial settings. This data scarcity poses a significant barrier to deploying robust and generalizable computer vision models for rare or evolving defect types.
To address this challenge, we explore the use of few-shot learning (FSL), a paradigm that enables models to generalize to new classes with only a handful of labeled examples. Building upon this foundation, we integrate meta-learning strategies specifically model-agnostic algorithms and metric-based learners—that are trained to quickly adapt to new tasks with minimal supervision. To further enhance feature discrimination under limited data conditions, we incorporate contrastive learning, which encourages the model to learn meaningful representations by maximizing inter-class differences and minimizing intra-class variations through self-supervised instance discrimination.
This study presents a hybrid framework combining contrastive pretraining with meta-learning to achieve superior performance in few-shot defect detection tasks. Experiments conducted on benchmark industrial datasets such as MVTec AD and DAGM demonstrate that our approach outperforms conventional few-shot baselines in both accuracy and generalization. The inclusion of contrastive learning boosts feature separability and improves recognition performance in low-shot settings. Our findings indicate that the proposed method is a viable and scalable solution for deploying intelligent inspection systems in real-world manufacturing environments, especially where annotated data is limited or difficult to collect.
Downloads
1. Chen, T., Kornblith, S., Norouzi, M., & Hinton, G. (2020, November). A simple framework for contrastive learning of visual representations. In International conference on machine learning (pp. 1597-1607). PmLR.
2. Yang, Z., Wang, J., & Zhu, Y. (2022, October). Few-shot classification with contrastive learning. In European conference on computer vision (pp. 293-309). Cham: Springer Nature Switzerland.
3. Jaiswal, A., Babu, A. R., Zadeh, M. Z., Banerjee, D., & Makedon, F. (2020). A survey on contrastive self-supervised learning. Technologies, 9(1), 2.
4. Snell, J., Swersky, K., & Zemel, R. (2017). Prototypical networks for few-shot learning. Advances in neural information processing systems, 30.
5. Finn, C., Abbeel, P., & Levine, S. (2017, July). Model-agnostic meta-learning for fast adaptation of deep networks. In International conference on machine learning (pp. 1126-1135). PMLR.
6. Vinyals, O., Blundell, C., Lillicrap, T., & Wierstra, D. (2016). Matching networks for one shot learning. Advances in neural information processing systems, 29.
7. Nichol, A., Achiam, J., & Schulman, J. (2018). On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999.
8. Liao, J., Xu, X., Nguyen, M. C., & Foo, C. S. Few-Shot Anomaly Detection on Industrial Images through Contrastive Fine-Tuning.
9. Liao, J., Xu, X., Nguyen, M. C., Goodge, A., & Foo, C. S. (2024). Coft-ad: Contrastive fine-tuning for few-shot anomaly detection. IEEE Transactions on Image Processing.
10. Kato, H., & Nagata, F. (2025). Proposal for improving SimCLR using image synthesis for defect recognition tasks. Artificial Life and Robotics, 1-7.
11. Zabin, M., Kabir, A. N. B., Kabir, M. K., Choi, H. J., & Uddin, J. (2023). Contrastive self-supervised representation learning framework for metal surface defect detection. Journal of Big Data, 10(1), 145.
12. Lyu, S., Zhang, R., Ma, Z., Liao, F., Mo, D., & Wong, W. (2025, April). MVREC: A General Few-shot Defect Classification Model Using Multi-View Region-Context. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 39, No. 6, pp. 5937-5945).
13. Li, H., Li, L., & Wang, H. (2022). Defect detection for wear debris based on few-shot contrastive learning. Applied Sciences, 12(23), 11893.
14. Zajec, P., Rožanec, J. M., Theodoropoulos, S., Fontul, M., Koehorst, E., Fortuna, B., & Mladenić, D. (2024). Few-shot learning for defect detection in manufacturing. International Journal of Production Research, 62(19), 6979-6998.
15. Lee, X. Y., Vidyaratne, L., Alam, M., Farahat, A., Ghosh, D., Diaz, T. G., & Gupta, C. (2023). XDNet: A few-shot meta-learning approach for cross-domain visual inspection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition (pp. 4375-4384).
16. Wang, L. (2023). U.S. Patent Application No. 18/194,050.
17. Liu, J., Wu, Y., Luo, X., & Wu, Z. (2024). Anomaly Multi-classification in Industrial Scenarios: Transferring Few-shot Learning to a New Task. arXiv preprint arXiv:2406.05645.
18. Božič, J. (2022). Mixed supervision for surface-defect detection (Doctoral dissertation, Univerza v Ljubljani, Fakulteta za računalništvo in informatiko).
19. Han, G., Huang, S., Ma, J., He, Y., & Chang, S. F. (2022, June). Meta faster r-cnn: Towards accurate few-shot object detection with attentive feature alignment. In Proceedings of the AAAI Conference on Artificial Intelligence (Vol. 36, No. 1, pp. 780-789).
20. Fan, Q., Zhuo, W., Tang, C. K., & Tai, Y. W. (2020). Few-shot object detection with attention-RPN and multi-relation detector. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition (pp. 4013-4022).
21. Koch, G., Zemel, R., & Salakhutdinov, R. (2015, July). Siamese neural networks for one-shot image recognition. In ICML deep learning workshop (Vol. 2, No. 1, pp. 1-30).
22. Lin, T. Y., Goyal, P., Girshick, R., He, K., & Dollár, P. (2017). Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision (pp. 2980-2988).
23. Raghav, P. K., & Gangenahalli, G. (2021). PU. 1 mimic synthetic peptides selectively bind with GATA-1 and allow c-jun PU. 1 binding to enhance myelopoiesis. International Journal of Nanomedicine, 3833-3859.
24. Jaiswal, A., Babu, A. R., Zadeh, M. Z., Banerjee, D., & Makedon, F. (2020). A survey on contrastive self-supervised learning. Technologies, 9(1), 2.
25. Božič, J. (2022). Mixed supervision for surface-defect detection (Doctoral dissertation, Univerza v Ljubljani, Fakulteta za računalništvo in informatiko).
26. Liao, J., Xu, X., Nguyen, M. C., Goodge, A., & Foo, C. S. (2024). Coft-ad: Contrastive fine-tuning for few-shot anomaly detection. IEEE Transactions on Image Processing.
27. Zhao, J., Kong, L., & Lv, J. (2024). An Overview of Deep Neural Networks for Few-Shot Learning. Big Data Mining and Analytics, 8(1), 145-188.
28. Li, Yawei, et al. "NTIRE 2023 challenge on efficient super-resolution: Methods and results." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023.
29. Karakolias, S. (2024). Mapping data-driven strategies in improving health care and patient satisfaction.
30. Ardjomandi, A. (2025). The role of narrative and storytelling in designing for long-term emotional engagement in product design.
31. Singu, S. K. (2022). Agile Methodologies in Healthcare Data Warehousing Projects: Challenges and Solutions. Journal of Artificial Intelligence & Cloud Computing. SRC/JAICC-400. DOI: doi. org/10.47363/JAICC/2022 (1), 383, 2-5.
32. Barach, J. (2025, January). Towards Zero Trust Security in SDN: A Multi-Layered Defense Strategy. In Proceedings of the 26th International Conference on Distributed Computing and Networking (pp. 331-339).
33. Georgi, C., Georgis, V., & Karakolias, S. (2023). HSD79 Assessment of Patient Satisfaction with Public Pharmacies Dispensing High-Cost Drugs in Greece. Value in Health, 26(12), S308-S309.
34. Singu, S. K. Performance Tuning Techniques for Large-Scale Financial Data Warehouses.
35. Aburidi, M., Aritsugi, M., Barach, J., Benslimane, S., Eggenkemper, F., Ethirajan, L., ... & Wang, H. Xiao, Ling 62 Yamasaki, Toshihiko 62 Yoshida, Shun 62 Zhou, Yu.
36. ARDJOMANDI, A. (2025). Visual Semiotics and User Perception in Digital Interface Design.
37. Psarras, A., & Karakolias, S. (2024). A Groundbreaking Insight Into Primary Care Physiotherapists’ Remuneration. Cureus, 16(2).
38. Barach, J. (2025, February). AI-Driven Causal Inference for Cross-Cloud Threat Detection Using Anonymized CloudTrail Logs. In 2025 Conference on Artificial Intelligence x Multimedia (AIxMM) (pp. 45-50). IEEE.
39. Ojomo, Tolulope , translator. “Advanced Chemical Sensing Technologies for Environmental Monitoring: Developing High-Sensitivity Sensors for Real-Time Detection of Pollutants, Toxins, and Greenhouse Gases to Combat Climate Change”. International Journal of Scientific Research and Management (IJSRM), vol. 13, no. 02, Feb. 2025, pp. 1944-57, https://doi.org/10.18535/ijsrm/v13i02.ec02.
40. Karakolias, S., Georgi, C., & Georgis, V. (2024). Patient Satisfaction With Public Pharmacy Services: Structural and Policy Implications From Greece. Cureus, 16(4).
41. Karakolias, S., & Iliopoulou, A. (2025). Health-Related Quality of Life and Psychological Burden Among and Beyond Children and Adolescents With Type 1 Diabetes: A Family Perspective. Cureus, 17(4).
42. Kosho, P. (2025). Public-Private Collaboration in Michigan’s Post-COVID Economic Development.
43. Barach, J. (2024, December). Enhancing Intrusion Detection with CNN Attention Using NSL-KDD Dataset. In 2024 Artificial Intelligence for Business (AIxB) (pp. 15-20). IEEE.
44. Periyasamy, R., Sasi, S., Malagi, V. P., Shivaswamy, R., Chikkaiah, J., & Pathak, R. K. (2025). Artificial intelligence assisted photonic bio sensing for rapid bacterial diseases. Zeitschrift für Naturforschung A, (0).
45. Raj, L. V., Sasi, S., Rajeswari, P., Pushpa, B. R., Kulkarni, A. V., & Biradar, S. (2025). Design of FBG-based optical biosensor for the detection of malaria. Journal of Optics, 1-10.
46. Rajeswari, P., & Sasi, S. (2024). Efficient k-way partitioning of very-large-scale integration circuits with evolutionary computation algorithms. Bulletin of Electrical Engineering and Informatics, 13(6), 4002-4007.
47. Sasi, S., Rajeshwari, P., Ramkumar, R., & Mondal, S. (2024, November). Lumina-Secure Access Guard. In 2024 5th International Conference on Data Intelligence and Cognitive Informatics (ICDICI) (pp. 57-61). IEEE.
48. Sasi, S., Subbu, S. B. V., Manoharan, P., Kulkarni, A. V., & Abualigah, L. (2025). Design and Implementation of Discrete Field Arithmetic-Based Cylindrical Coil-Driven Crypto Framework for Cloud Data. Journal of Computational and Cognitive Engineering, 4(1), 97-107.
49. Wang, F., Bao, Q., Wang, Z., & Chen, Y. (2024, October). Optimizing Transformer based on high-performance optimizer for predicting employment sentiment in American social media content. In 2024 5th International Conference on Machine Learning and Computer Application (ICMLCA) (pp. 414-418). IEEE.
50. Xi, K., Bi, X., Xu, Z., Lei, F., & Yang, Z. (2024, November). Enhancing Problem-Solving Abilities with Reinforcement Learning-Augmented Large Language Models. In 2024 4th International Conference on Computer Science, Electronic Information Engineering and Intelligent Control Technology (CEI) (pp. 130-133). IEEE.
51. Penmetsa, S. V. (2024, September). Equilibrium Analysis of AI Investment in Financial Markets under Uncertainty. In 2024 IEEE International Conference on Cognitive Computing and Complex Data (ICCD) (pp. 162-172). IEEE.
52. Wairagade, A. (2024, December). Enhancing Behavioral Analytics with Zero Trust in Cloud: A Comparative Analysis. In 2024 International Conference on Engineering and Emerging Technologies (ICEET) (pp. 1-7). IEEE.
53. Zhong, J., Wang, Y., Zhu, D., & Wang, Z. (2025). A Narrative Review on Large AI Models in Lung Cancer Screening, Diagnosis, and Treatment Planning. arXiv preprint arXiv:2506.07236.
54. Zhong, J., Wang, Y., Zhu, D., & Wang, Z. (2025). A Narrative Review on Large AI Models in Lung Cancer Screening, Diagnosis, and Treatment Planning. arXiv preprint arXiv:2506.07236.
55. Zhong, J., & Wang, Y. (2025). Enhancing Thyroid Disease Prediction Using Machine Learning: A Comparative Study of Ensemble Models and Class Balancing Techniques.
56. Kosho, P. (2024). Ethical AI in Immigrant-Serving Workforce Development: A Global Perspective.
57. Ojomo, T. (2025). Artificial Intelligence in Biomolecular Design and Discovery: Accelerating Innovation in Enzymes, Proteins, and Biomaterials. Emerging Molecular Sciences, 01-10.
58. Zabin, M., Kabir, A. N. B., Kabir, M. K., Choi, H. J., & Uddin, J. (2023). Contrastive self-supervised representation learning framework for metal surface defect detection. Journal of Big Data, 10(1), 145.
59. Li, Hang, Li Li, and Hongbing Wang. "Defect detection for wear debris based on few-shot contrastive learning." Applied Sciences 12.23 (2022): 11893.
Copyright (c) 2025 Xin NIE, Chuan-yi YU

This work is licensed under a Creative Commons Attribution 4.0 International License.