# An Improved YOLOv8 Model for Strip Steel Surface Defect Detection
## 2 Improved YOLOv8 Detection Principle
### SCRD Improved Based on SPPCSPC  
1. SPPCSPC  
The multi-stage spatial pyramid pooling cross-stage partial concatenation (SPPCSPC) module, shown in Figure 3, combines the advantages of the SPP and CSPC modules. The SPP module enhances the detection of different defect scales by capturing more scales of features from the image through multi-scale pooling. The CSPC module introduces cross-stage partial concatenation, which improves the feature utilization efficiency and the gradient  
Figure 2: Structure diagram of YOLOv8-BSPB. flow, and efficiently alleviates the gradient vanishing problem. By combining multi-scale feature extraction with efficient feature linking, the SPPCSPC module can better realize image classification and object detection and ultimately improve the overall performance. 2. Variability Convolution DCNv4  
DCNv4 integrates the sparse attention mechanism with convolution operations, enhancing dynamic attributes and representational capacity. By utilizing the sparse attention mechanism, DCNv4 adaptively adjusts the position and shape of the convolutional kernel, thereby improving the sampling mechanism. In DCNv4, a single thread processes multiple channels within the same group, allowing these channels to share sampling offsets and aggregated weights. This reduces workloads and enables the merging of multiple memory access instructions. Figure 4 illustrates the intra-group shared processing mechanism in DCNv4. When dealing with complex tasks, DCNv4 exhibits better adaptability. For the input feature map \(X\), where the \(\Delta p_{k}\) grid samples the position pk offset, the convolution kernel is \(W_{k}\), and the bias \(b\) and attention weight \(\Delta m_{k}\) are introduced. \(K\) represents the number of sampling points in the convolution kernel, \(p\) denotes the pixel coordinates of the image feature map, and \(p_{k}\) represents the relative position of the \(k\)-th sampling point in the convolution kernel. The output feature map \(Y\) obtained for each point p is  
\[Y(\text{p})=\sum_{k=1}^{K}W_{k}\cdot X(p+p_{k}+\Delta p_{k})\cdot\Delta m_{k}+b \tag{1}\]  
3. Feature Extraction Module RFB  
The receptive field block (RFB) module enhances traditional convolution operations through a series of convolution, normalization, and activation functions. As shown in Figure 5, the RFB module expands the receptive field, enabling the network to capture more comprehensive semantic information. Compared with traditional convolution operations, the RFB module significantly improves the perceptual capabilities of the network without increasing the number of parameters and computational costs. This improvement enables the model to better adapt to target objects of different sizes and shapes, thereby improving its performance in defect detection tasks. Figure 4: Intra-group sharing of DCNv4 processing. Figure 3: Structure diagram of SPPCSPC. SCRD  
To improve attention to the densely packed small target samples, the proposed SCRD structure employs the SPPCSPC module as its core component. To improve the SPPCSPC module to extract multi-scale features, previous studies have shown that modifications to the SPPCSPC module can significantly enhance detection accuracy in multi-scale object recognition tasks. For example, [PERSON] et al. [35] improved classification accuracy through SPPCSPC. Similarly, [PERSON] et al. [36] replaced the SPPF module with an improved SPPCSPC to enhance feature representation capability and efficiently implement multi-scale feature fusion. Initially, dilated convolution and parallel convolution are integrated through the RFB module to enhance the model's feature extraction capabilities. Traditional max pooling, which selects only the maximum value as output, often overlooks detailed and local features, particularly in small target detection where such details are crucial. In contrast, average pooling retains more local detail information and is less sensitive to noise, making it more suitable for detecting small targets.