<p>Metal surface defect detection models have large parameters and high computational complexity, making them difficult to deploy on industrial edge devices. To address these issues, this paper proposes a lightweight algorithm with collaborative pruning and distillation. This algorithm, based on YOLOv8, uses L1 regularization structured pruning to compress the SAF-YOLOv8 model for efficiency. The resulting pruned and unpruned models serve as the student and teacher in subsequent knowledge distillation. The BFCD-KD knowledge distillation method fuses middle-layer features with the regression and classification branches of the detection head and the original model loss. This integrated approach transfers teacher knowledge in feature representation, localization, and classification to improve optimization. Experimental results show that this algorithm reduces the model’s FLOPs by 51.0% and parameters by 41.5%, while achieving a mAP@0.50 of 70.6% on the GC10-DET dataset, balancing accuracy and efficiency. In addition, a real-time interactive metal surface defect detection system is developed for industrial sites using the lightweight SAF-YOLOv8 model. The system integrates industrial cameras, a controllable light source, and a graphical interactive interface built on the PyQt5 framework. It supports real-time visualization and interactive defect detection operations.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Lightweight metal surface defect detection algorithm based on pruning and knowledge distillation

  • Yiqing Cao,
  • Yonger Yao,
  • Lijun Lu

摘要

Metal surface defect detection models have large parameters and high computational complexity, making them difficult to deploy on industrial edge devices. To address these issues, this paper proposes a lightweight algorithm with collaborative pruning and distillation. This algorithm, based on YOLOv8, uses L1 regularization structured pruning to compress the SAF-YOLOv8 model for efficiency. The resulting pruned and unpruned models serve as the student and teacher in subsequent knowledge distillation. The BFCD-KD knowledge distillation method fuses middle-layer features with the regression and classification branches of the detection head and the original model loss. This integrated approach transfers teacher knowledge in feature representation, localization, and classification to improve optimization. Experimental results show that this algorithm reduces the model’s FLOPs by 51.0% and parameters by 41.5%, while achieving a mAP@0.50 of 70.6% on the GC10-DET dataset, balancing accuracy and efficiency. In addition, a real-time interactive metal surface defect detection system is developed for industrial sites using the lightweight SAF-YOLOv8 model. The system integrates industrial cameras, a controllable light source, and a graphical interactive interface built on the PyQt5 framework. It supports real-time visualization and interactive defect detection operations.