Abstract
Accurate detection of surface defects for steel is essential to improve surface quality and service life. Deep learning (DL) used in steel surface defect detection can solve the problems of low efficiency and poor accuracy of traditional manual detection. The classic YOLOv5 as a DL method is used to accomplish defect detection tasks without attention mechanisms, resulting in a loss of global information. Besides, it is difficult to complete complex network detection tasks with low-configuration hardware, especially for surface defects with complex defect types and variable defect sizes. To solve these issues, this paper introduces an improved global feature reuse and hardware-aware YOLOv5 by using BoTNet, RepGhost, and EfficientRep model (BGE-YOLOv5). The multi-head self-attention layer is used to obtain global information and only part of the convolutional layers is replaced to avoid the excessive computational cost. The RepGhost model is introduced to extract the remaining feature information for feature reuse. EfficientRep is used to replace the original structure to achieve hardware-aware and to balance the detection veracity and efficiency. The distance IOU is replaced by SCYLLA-IOU to accelerate the iteration and improve stability. The results of the framework on the surface defect database (NEU-DET) show that BGE-YOLOv5 achieves a mean average precision of 79.5%, which is 10.3% greater than the baseline. The proposed BGE-YOLOv5 has a better performance in steel surface defect detection.