LSD-YOLOv5: A Steel Strip Surface Defect Detection Algorithm Based on Lightweight Network and Enhanced Feature Fusion Mode

Huan Zhao, Fang Wan, Guangbo Lei, Ying Xiong, Li Xu, Chengzhi Xu, Zhou WenSensors 2023 · DOI

TL;DR

This paper introduces LSD-YOLOv5, a lightweight and efficient deep learning model for detecting surface defects on steel strips. By optimizing the network architecture and feature fusion, it achieves a better balance between detection accuracy and speed, making it suitable for real-time industrial applications.

What Problem Does This Paper Address?

The quality control of steel strips is critical in industries like construction and manufacturing, as surface defects can compromise performance and lifespan. Traditional manual inspection is slow and error-prone. While automated and AI-based methods exist, current deep learning approaches often struggle with large model sizes, slow detection speeds, and difficulty in accurately identifying small or overlapping defects. This limits their practical deployment in resource-constrained industrial environments that require real-time monitoring.

Methods

The researchers propose LSD-YOLOv5, an enhanced version of the YOLOv5s architecture, focusing on improving efficiency and accuracy:

  • R-Stem Module: Replaces the initial convolutional layer in the backbone with a custom "R-Stem" module. This module aims to enrich shallow features and improve generalization without significantly increasing computational cost.
  • CA-MbV2 Module: Integrates the Coordinate Attention (CA) mechanism into the MobileNetV2 bottleneck structure. This helps the network focus on relevant spatial information and long-range dependencies, enhancing feature extraction while maintaining a lightweight design.
  • BiFPN-S Module: A smaller version of the Bi-directional Feature Pyramid Network (BiFPN) is used in the neck of the network. This module facilitates more efficient multi-scale feature fusion, crucial for detecting defects of varying sizes.
  • Soft-DIoU-NMS: The traditional Non-Maximum Suppression (NMS) is replaced with a Soft-DIoU-NMS algorithm. This enhancement improves the handling of overlapping or closely spaced defects, reducing missed detections.

Datasets

The study utilizes the GC10-DET dataset, which contains 2312 grayscale images of steel strip surfaces with ten types of defects (Punching, Welding line, Crescent gap, Water spot, Oil spot, Silk spot, Inclusion, Rolled pit, Crease, and Waist folding). The dataset is noted for its diversity in defect size, shape, and location, making it a realistic benchmark. The dataset was preprocessed, with non-conforming images removed, resulting in 2136 images. These were then split into training (80%), validation (10%), and testing (10%) sets. The training images were resized to 640x640.

Key Insights and Ideas

  • Lightweighting is Key for Industry: The paper strongly emphasizes that for real-time industrial applications, a model's size and speed are as crucial as its accuracy. Simply using larger, more complex models isn't always the best solution.
  • Attention Beyond Channel/Spatial: The integration of Coordinate Attention (CA) into a lightweight backbone (MobileNetV2) demonstrates that attention mechanisms can be effectively adapted to improve feature representation in resource-constrained networks.
  • Hierarchical Feature Fusion Matters: The BiFPN-S module highlights the importance of efficient multi-scale feature fusion. By creating a smaller, optimized BiFPN, the model can better integrate information from different levels of the network.
  • NMS Needs Refinement for Overlap: The challenge of overlapping defects is a significant hurdle in industrial inspection. The Soft-DIoU-NMS approach shows that improving the post-processing step can substantially boost performance in these difficult scenarios.

Key Results

The proposed LSD-YOLOv5 model demonstrates significant improvements over the original YOLOv5s:

  • Parameter Reduction: A reduction of 61.5% in model parameters.
  • Speed Improvement: A 28.7% increase in detection speed (from 70 FPS to 90.1 FPS).
  • Accuracy Improvement: A 2.4% increase in mAP (mean Average Precision), reaching 67.9%.
  • Computational Efficiency: Reduced computation by 42.8%.
  • Ablation Study: The paper shows a progressive improvement in performance as each proposed module (R-Stem, CA-MbV2, BiFPN-S, Soft-DIoU-NMS) is added, culminating in the LSD-YOLOv5 model.
  • Comparative Analysis: LSD-YOLOv5 outperforms other popular algorithms like SSD, Faster R-CNN, YOLOv4, and YOLOv7 in terms of the balance between accuracy, speed, and model size.

Limitations and Future Work

  • Limitations: While the model shows excellent performance, the paper acknowledges that further improvements in data augmentation techniques could be beneficial. The study focuses on specific types of defects within the GC10-DET dataset.
  • Future Work: The authors suggest exploring more advanced data augmentation methods, such as Generative Adversarial Networks (GANs), to further enhance recognition and generalization capabilities. They also aim to continue developing lightweight and real-time solutions for industrial defect detection.

Summary updated

Abstract

In the field of metallurgy, the timely and accurate detection of surface defects on metallic materials is a crucial quality control task. However, current defect detection approaches face challenges with large model parameters and low detection rates. To address these issues, this paper proposes a lightweight recognition model for surface damage on steel strips, named LSD-YOLOv5. First, we design a shallow feature enhancement module to replace the first Conv structure in the backbone network. Second, the Coordinate Attention mechanism is introduced into the MobileNetV2 bottleneck structure to maintain the lightweight nature of the model. Then, we propose a smaller bidirectional feature pyramid network (BiFPN-S) and combine it with Concat operation for efficient bidirectional cross-scale connectivity and weighted feature fusion. Finally, the Soft-DIoU-NMS algorithm is employed to enhance the recognition efficiency in scenarios where targets overlap. Compared with the original YOLOv5s, the LSD-YOLOv5 model achieves a reduction of 61.5% in model parameters and a 28.7% improvement in detection speed, while improving recognition accuracy by 2.4%. This demonstrates that the model achieves an optimal balance between detection accuracy and speed, while maintaining a lightweight structure.
BibTeX
@inproceedings{zhao2023lsd,
  author = {Huan Zhao and Fang Wan and Guangbo Lei and Ying Xiong and Li Xu and Chengzhi Xu and Zhou Wen},
  title = {{LSD-YOLOv5: A Steel Strip Surface Defect Detection Algorithm Based on Lightweight Network and Enhanced Feature Fusion Mode}},
  booktitle = {Sensors},
  year = {2023},
  doi = {10.3390/s23146558},
}
Figure