Scratches and cracks in steel severely affect its service life and performance. However, owing to the irregular shapes and sizes of steel surface defects, defects within the same class may be different, whereas defects between classes may be similar. Existing methods focus only on spatial information, resulting in low detection accuracy. To alleviate these problems, this paper proposes the ECDY (EIFEM CARAFE DyHead) network to enhance the detection capability of steel defects. We first design a feature extraction module that focuses on the edge information of feature contours. This module uses the Sobel operator to extract the edge information of a feature and fuses it with the overall spatial information so that richer semantic information can be obtained. The module has improved accuracy in the YOLOv5, YOLOv8, and YOLOv10 versions, and uses fewer parameters and calculations. In particular, in YOLOv8x, mAP@0.5 increased by 2.5%, and the number of parameters was reduced by 12.4M. Second, to retain the detailed information in the feature pyramid, and to better reconstruct features, we choose the content-aware reassembly feature method (CARAFE) as the upsampling method. Finally, the detection head was replaced with a dynamic unified detection head (DyHead) to adapt to different defect sizes and different task requirements. Compared with YOLOv8s, the proposed method improves precision by 1.6%, recall by 4%, and mAP@0.5 by 4%. This value is 4.2% higher than the mAP@0.5 of the current SOTA model RT-DETR-L in the field of object detection and has 23.2M fewer parameters.
Read full abstract