# KCFS-YOLOv5: A High-Precision Detection Method for Object Detection in Aerial Remote Sensing Images
## 2 Related Works
### Principles of the Conventional YOLOv5 Detection Framework  
The YOLOv5 object detection framework proposed in 2020 by Ultralytics LLC is an improved framework based on the YOLO series. Structurally, it is a one-stage detection framework composed of four units: the Input, the Backbone network, the Neck network, and the Output. After drawing on the advantages of earlier versions of the YOLO series and other detection algorithms, YOLOv5 embeds the Focus layer into the input for data augmentation. Meanwhile, it used the DarkNet53 in the backbone to extract the main features from the image. A feature fusion framework which incorporates the feature pyramid structure [37] (FPN) and the bottom-up Path Aggregation Network [38] is also embedded in the neck network to strengthen the short-circuit linking and cross-layer fusion in multi-scale features. The complete YOLOv5 framework is shown in Figure 1. The four constituent units in the YOLOv5 network are demonstrated as follows:Input: similar to YOLOv4, YOLOv5 uses the Mosaic module to augment the data. It uses four photographs, thus significantly increasing the amount of data between different pictures. Fusion enhances the detection generalization ability of background information and multi-scale objects and reduces the computational burden. The improved framework adjusts the size of input images to a unified 640 \(\times\) 640 pixels through the adaptive image scaling module to improve data complexity. Meanwhile, in the process of network parameter training, the input framework generates the preset anchor box of the object through a K-means adaptive anchor box algorithm, calculates the deviation between the preset anchor and the ground truth box of the object, and update the network weight through the reverse transmission of the fusion framework. The backbone network: YOLOv5 adopts CSPDarknet53 [14] as the backbone network; the backbone network consists of Focus layer, CSPNet framework and Spatial Pyramid Pooling (SPP) module [39]. The Focus layer is a method for data enhancement on the data side. When dealing with larger feature maps, YOLOv5 can first split and splice a feature map, then pass concatenating layers to stack images so that feature representations at different levels can then be extracted through convolutional layers. The CSPNet framework forms the backbone network and enhances the feature fusion ability of feature maps with different dimensions through residual connections, which is the basis of backpropagation in the network. The SPP module performs maximum pooling in four different dimensions: 1 \(\times\) 1, 5 \(\times\) 5, 9 \(\times\) 9, and 13 \(\times\) 13, to strengthen the network's receptive ability of pictures and differentiate feature information. The Neck network: this fuses the texture information and position information in the feature map to strengthen the ability of information fusion on multi-scale objects, the neck network of YOLOv5 adopts the fusion structure of PAFPN [40]. The FPN structure further enhances the features of different dimensions in the network through Up-sampling, Graph fusion ability and multi-size object detection ability. The PAN framework can bring the information of the shallow layer to the bottom layer through short-circuit links, which improves the detection results of disturbing objects. Figure 1: The conventional YOLOv5 algorithm framework. The Output: The output consists of the NMS module and the loss function, the original YOLOv5 used CIoU loss function in the output. It overcomes the problem where IoU is not steerable in special cases and improves the detection effect when the prediction frames overlap. Weighted NMS is used to consolidate the detection performance in multi-objective environment, thus obtaining the optimal detection framework. Although YOLOv5 has shown excellent performance in different tasks of object detection, it still has some problems to be optimized in the object detection task for remote sensing images.