Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Jun 10;14(1):13267.
doi: 10.1038/s41598-024-64080-x.

Lightweight strip steel defect detection algorithm based on improved YOLOv7

Affiliations

Lightweight strip steel defect detection algorithm based on improved YOLOv7

Jianbo Lu et al. Sci Rep. .

Abstract

The precise identification of surface imperfections in steel strips is crucial for ensuring steel product quality. To address the challenges posed by the substantial model size and computational complexity in current algorithms for detecting surface defects in steel strips, this paper introduces SS-YOLO (YOLOv7 for Steel Strip), an enhanced lightweight YOLOv7 model. This method replaces the CBS module in the backbone network with a lightweight MobileNetv3 network, reducing the model size and accelerating the inference time. The D-SimSPPF module, which integrates depth separable convolution and a parameter-free attention mechanism, was specifically designed to replace the original SPPCSPC module within the YOLOv7 network, expanding the receptive field and reducing the number of network parameters. The parameter-free attention mechanism SimAM is incorporated into both the neck network and the prediction output section, enhancing the ability of the model to extract essential features of strip surface defects and improving detection accuracy. The experimental results on the NEU-DET dataset show that SS-YOLO achieves a 97% mAP50 accuracy, which is a 4.5% improvement over that of YOLOv7. Additionally, there was a 79.3% reduction in FLOPs(G) and a 20.7% decrease in params. Thus, SS-YOLO demonstrates an effective balance between detection accuracy and speed while maintaining a lightweight profile.

Keywords: D-SimSPPF; Deep learning; Lightweight network; Strip surface defect detection; YOLOv7.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Figure 1
Figure 1
SS-YOLO network structure.
Figure 2
Figure 2
The realization of depthwise separable convolution.
Figure 3
Figure 3
D-SimSPPF module structure.
Figure 4
Figure 4
SimAM network structure. SimAM can derive 3D attention weights for feature maps without introducing additional parameters. After obtaining the weights for each neuron, it directly evaluates the importance of independent neurons and assigns higher weights to important neurons, enabling the model to focus on surface defect features of steel strips and enhance detection performance.
Figure 5
Figure 5
NEU-DET surface defects.
Figure 6
Figure 6
Illustration of the enhancement effect.
Figure 7
Figure 7
Comparison of the YOLOv7 and SS-YOLO model training results.
Figure 8
Figure 8
Comparison of YOLOv7 and SS-YOLO Precision-Recall (P-R) curves.
Figure 9
Figure 9
Comparison of crazing defect detection. (a) Original images; (b) YOLOv5; (c) YOLOv7; (d) SS-YOLO.
Figure 10
Figure 10
Comparison of inclusion defect detection. (a) Original images; (b) YOLOv5; (c) YOLOv7; (d) SS-YOLO.
Figure 11
Figure 11
Comparison of pitted_surface defect detection. (a) Original images; (b) YOLOv5; (c) YOLOv7; (d) SS-YOLO.
Figure 12
Figure 12
Comparison of patches defect detection. (a) Original images; (b)YOLOv5; (c) YOLOv7; (d) SS-YOLO.
Figure 13
Figure 13
Comparison of rolled-in scale defect detection. (a) Original images; (b)YOLOv5; (c) YOLOv7; (d) SS-YOLO.
Figure 14
Figure 14
Comparison of scratches defect detection. (a) Original images; (b) YOLOv5; (c) YOLOv7; (d) SS-YOLO.

Similar articles

Cited by

References

    1. Li JY, Su ZF, Geng JH, Yin YX. Real-time detection of steel strip surface defects based on improved yolo detection network. IFAC PapersOnLine. 2018;51:76–81. doi: 10.1016/j.ifacol.2018.09.412. - DOI
    1. Ren H, et al. A method for detecting surface defects in hot-rolled strip steel based on deep learning. Metalurgija. 2024;63:423–426.
    1. Berg, A. C., et al. SSD: Single shot multiBox detector. In European Conference on Computer Vision. 21–37. 10.1007/978-3-319-46448-0_2 (2015).
    1. Redmon, J., Divvala, S., Girshick, R. & Farhadi, A. You only look once: unified, real-time object detection. In Computer Vision & Pattern Recognition IEEE. 779–788. 10.1109/CVPR.2016.91 (2016).
    1. Redmon, J. & Farhadi, A. YOLOv3: An incremental improvement. arXiv e-prints. 10.48550/arXiv.1804.02767 (2018).