Improved Metal Surface Defect Detection Model of YOLOv5 Combining CBAM and BiFPN
摘要
In this paper, a deep learning model based on improved YOLOv5 is proposed to meet the industrial requirements of metal surface defect detection. By integrating CBAM (channel and spatial attention module) attention mechanism and BiFPN (Bidirectional feature pyramid network) feature fusion strategy, the detection accuracy and real-time performance of the model are significantly improved. Experimental validation on the NEU-DET dataset demonstrates that our modified architecture reaches 64.1%, exceeding the original YOLOv5 by 3.8%, while achieving inference speeds of 62 FPS—9.1% faster than the baseline implementation. This performance surpasses mainstream alternatives including Faster R-CNN, YOLOv3, and YOLOv4. Ablation experiments show that CBAM can suppress background interference by enhancing local feature discrimination, and BiFPN can optimize global context awareness by multi-scale bidirectional fusion. The synergistic effect of the two results makes remarkable breakthroughs in performance. The method shows the comprehensive advantages of high precision and high efficiency in industrial quality inspection, and has the potential to extend to the surface defect detection of ceramics, glass and other materials, and provides reliable technical support for intelligent manufacturing.