## 2 Materials and Methods
### The Feature Extraction Network of CSPD-YOLO Model  
The network depth is very important to the performance of a deep learning model, which can extract efficient features for detection. However, the deeper the network layers, the more complex the detection network, and the deep learning model will quickly reach saturation with the deepening of network layers, resulting in gradient disappearance or explosion. In order to solve the degradation of the deep learning model, the Residual Network (ResNet) [40; 41; 42] and Dense Network (DenseNet) [43; 44; 45] were proposed to reduce the effect of gradient disappearance and explosion. The ResNet structure in DarkNet-53 is composed of convolutional layers--(Conv) \(1\times 1\) and Conv \(3\times 3\). Specifically, the Conv \(1\times 1\) layer compresses the number of channels for the feature layer X, and then the Conv \(3\times 3\) layer is used to enhance feature extraction and expand the number of channels. Finally, the feature layer X and F(X) are connected by a shortcut and the feature layer H(X) is obtained, which can be defined in Formula (1). \[\text{H(X)}=\text{F(X)}+\text{X} \tag{1}\]  
The structure of ResNet can improve detection accuracy by increasing the depth considerably; at the same time, the internal residual unit uses shortcut connection to alleviate the gradient disappearance caused by increasing the depth of the deep learning model. In deep neural networks, as the network layers deepen, the transmission of image features will gradually be weakened. To solve this problem, DenseNet was introduced to prevent the feature from disappearing, and thereby the performance of deep neural networks can be improved. The basic structure of DenseNet is shown in Figure 3, which uses a feed-forward manner to connect each layer to other layers; in other words, the \(\ell\)th layer receives all the feature maps of the previous \(\ell-1\) layers as input:  
\[X_{\ell}=H_{\ell}([X0,X1,\dots,X_{\ell-1}]) \tag{2}\]  
In Formula (2), \(X_{\ell}\) denotes the output of \(\ell\)th layer, \([X0,X1,\dots,X_{\ell-1}]\) represents the spliced feature maps of the previous \(\ell-1\) layers, and \(H_{\ell}(\cdot)\) refers to the non-linear trans  
Figure 2: The entire structure of Cross Stage Partial Dense YOLOv3 (CSPD-YOLO) model. form function composed of batch normalization (BN), the rectified linear unit (ReLU), and a convolutional layer (Conv). Generally, BN-ReLU-Conv (1 \(\times\) 1) and BN-ReLU-Conv (3 \(\times\) 3) are employed as transform functions. In order to further improve the feature extraction network of YOLO-v3, DenseNet and Cross Stage Partial Network (CSPNet) [46] were introduced into YOLO-v3 in this paper. CSPNet is the backbone network of YOLO-v4, used to enhance the learning capacities of CNN, which reduces the computing bottleneck and memory cost while being lightweight. This paper applied the Cross Stage Partial Dense (CSPD) blocks to the DarkNet53 network and constructed a CSPD-YOLO model; the structure of CSPD blocks is shown in Figure 4. CSPD blocks divided the feature maps of the input feature layer into two parts, and then concatenated through the cross-stage hierarchical structure to reduce the amount of calculation while ensuring detection accuracy. Specifically, in Figure 4a, CSPD block1 is composed of two Conv 3 \(\times\) 3, one Conv 1 \(\times\) 1, four residual units, and four dense units, used to extract scale feature 52 \(\times\) 52. Firstly, the input feature layer was 128 \(\times\) 104 \(\times\) 104, and then Conv 256 \(\times\) 3 \(\times\) 3/2 was used to reduce dimensions, and the feature maps 256 \(\times\) 52 \(\times\) 52 were obtained.