ISSN (Online): 2321-3418
server-injected
Engineering and Computer Science
Open Access

Few-Shot Learning for Industrial Defect Detection Using Meta-Learning Techniques

,
DOI: 10.18535/ijsrm/v13i06.ec08· Pages: 2301-2318· Vol. 13, No. 06, (2025)· Published: June 24, 2025
PDF
Views: 3,285 PDF downloads: 4,440

Abstract

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.

Keywords

Few-Shot LearningMeta-LearningIndustrial Defect DetectionContrastive LearningManufacturing AIData ScarcityComputer VisionFew-Shot Classification 1

References

  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  4. Snell, J., Swersky, K., & Zemel, R. (2017). Prototypical networks for few-shot learning. Advances in neural information processing systems, 30.Google Scholar ↗
  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.Google Scholar ↗
  6. Vinyals, O., Blundell, C., Lillicrap, T., & Wierstra, D. (2016). Matching networks for one shot learning. Advances in neural information processing systems, 29.Google Scholar ↗
  7. Nichol, A., Achiam, J., & Schulman, J. (2018). On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999.Google Scholar ↗
  8. Liao, J., Xu, X., Nguyen, M. C., & Foo, C. S. Few-Shot Anomaly Detection on Industrial Images through Contrastive Fine-Tuning.Google Scholar ↗
  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.Google Scholar ↗
  10. Kato, H., & Nagata, F. (2025). Proposal for improving SimCLR using image synthesis for defect recognition tasks. Artificial Life and Robotics, 1-7.Google Scholar ↗
  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.Google Scholar ↗
  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).Google Scholar ↗
  13. Li, H., Li, L., & Wang, H. (2022). Defect detection for wear debris based on few-shot contrastive learning. Applied Sciences, 12(23), 11893.Google Scholar ↗
  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.Google Scholar ↗
  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).Google Scholar ↗
  16. Wang, L. (2023). U.S. Patent Application No. 18/194,050.Google Scholar ↗
  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.Google Scholar ↗
  18. Božič, J. (2022). Mixed supervision for surface-defect detection (Doctoral dissertation, Univerza v Ljubljani, Fakulteta za računalništvo in informatiko).Google Scholar ↗
  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).Google Scholar ↗
  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).Google Scholar ↗
  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).Google Scholar ↗
  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).Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  25. Božič, J. (2022). Mixed supervision for surface-defect detection (Doctoral dissertation, Univerza v Ljubljani, Fakulteta za računalništvo in informatiko).Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  29. Karakolias, S. (2024). Mapping data-driven strategies in improving health care and patient satisfaction.Google Scholar ↗
  30. Ardjomandi, A. (2025). The role of narrative and storytelling in designing for long-term emotional engagement in product design.Google Scholar ↗
  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.DOI ↗Google Scholar ↗
  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).Google Scholar ↗
  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.Google Scholar ↗
  34. Singu, S. K. Performance Tuning Techniques for Large-Scale Financial Data Warehouses.Google Scholar ↗
  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.Google Scholar ↗
  36. ARDJOMANDI, A. (2025). Visual Semiotics and User Perception in Digital Interface Design.Google Scholar ↗
  37. Psarras, A., & Karakolias, S. (2024). A Groundbreaking Insight Into Primary Care Physiotherapists’ Remuneration. Cureus, 16(2).Google Scholar ↗
  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.Google Scholar ↗
  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.DOI ↗Google Scholar ↗
  40. Karakolias, S., Georgi, C., & Georgis, V. (2024). Patient Satisfaction With Public Pharmacy Services: Structural and Policy Implications From Greece. Cureus, 16(4).Google Scholar ↗
  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).Google Scholar ↗
  42. Kosho, P. (2025). Public-Private Collaboration in Michigan’s Post-COVID Economic Development.Google Scholar ↗
  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.Google Scholar ↗
  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).Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
  55. Zhong, J., & Wang, Y. (2025). Enhancing Thyroid Disease Prediction Using Machine Learning: A Comparative Study of Ensemble Models and Class Balancing Techniques.Google Scholar ↗
  56. Kosho, P. (2024). Ethical AI in Immigrant-Serving Workforce Development: A Global Perspective.Google Scholar ↗
  57. Ojomo, T. (2025). Artificial Intelligence in Biomolecular Design and Discovery: Accelerating Innovation in Enzymes, Proteins, and Biomaterials. Emerging Molecular Sciences, 01-10.Google Scholar ↗
  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.Google Scholar ↗
  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.Google Scholar ↗
Author details
Xin NIE
School of Computer Science and Engineering, Wuhan Institute of Technology, Wuhan, Hubei,
✉ Corresponding Author
👤 View Profile →
Chuan-yi YU
School of Computer Science and Engineering, Wuhan Institute of Technology, Wuhan, Hubei
👤 View Profile →