# SP-YOLOv8s: An Improved YOLOv8s Model for Remote Sensing Image Tiny Object Detection
## 3 Methodology
### YOLOv8s  
As an extensively employed network in object detection, YOLOv8 surpasses numerous preceding models with its faster detection speed and enhanced detection accuracy. The YOLOv8 network has been scaled according to different usage requirements to acquire some network models of various sizes. In this study, the YOLOv8s network is selected as the foundational network model to strike a balance between the speed and accuracy of recognizing tiny objects amidst complex backgrounds. The fundamental components of YOLOv8s encompass the CBS (Convolution, Batch Normalization, SiLU activation) module, SPPF (Spatial Pyramid Pooling Fusion) module, and C2F (C3-inspired lightweight module with ideas from ELAN) module. The CBS module comprises a 3 \(\times\) 3 convolutional layer, a BN (Batch Normalization) [45] layer, and a SiLU (Sigmoid-weighted Linear Unit) [46] activation function. This arrangement enables the selection of models characterized by high efficiency and accuracy. By means of feature reuse, the module mitigates the risk of gradient dispersion while preserving a significant portion of the original information. The SPPF module, inspired by the SPP structure from SPPNet [47], improves classification accuracy by extracting and fusing high-level features. Multiple maximum pooling operations are employed during the fusion process to extract a broad range of high-level semantic features. The C2F module, inspired by the C3 module and ideas from ELAN [48], facilitates lightweight implementation in YOLOv8 while achievingoptimal performance. Notably, YOLOv8 diverges from previous YOLO architectures through its detection head, which adopts the favored decoupling head approach [49]. yolov8 uses BCE Loss for classification loss and CIOU Loss + DFL for regression loss, and VFL proposes an asymmetric weighting operation [50]. DFL (Distribution-based Localization): The spatial coordinates of the bounding box are represented as a generalized distribution. Let the network quickly focus on the location distribution near the object location and make the probability density near that location as prominent as possible, as shown in Equation (1). \(s_{i}\) is the sigmoid output of the network, \(y_{i}\) and \(y_{i+1}\) are the interval orders, and y is the label. Compared with the previous YOLO algorithm, YOLOv8 is very scalable. \[DFL_{(s_{i}s_{i+1})}=-((y_{i+1}-y)\text{log}\left(s_{i}\right)+(y-y_{i})\text{ log}(s_{i+1})) \tag{1}\]  
YOLOv8 distinguishes itself from its predecessors by employing an Anchor-Free approach instead of the traditional Anchor-Based method. The utilization of a dynamic TaskAlignedAssigner for matching policies is another notable enhancement in YOLOv8. To compute the Anchor-level alignment for each instance, Equation (2) is employed, wherein the classification score is denoted by '\(s\)', the IOU value by '\(u\)', and the weight hyperparameters by '\(a\)' and '\(\beta\).' Positive samples are selected by choosing the top'm' anchors with the highest value (\(t\)) for each instance, while the remaining anchors serve as negative samples. Subsequently, the model is trained using an appropriate loss function. These improvements have resulted in a 1% increase in accuracy compared to YOLOv5, establishing YOLOv8 as the most accurate detector thus far. \[t=s^{\kappa}\times u^{\beta} \tag{2}\]  
The object detection process employing the YOLOv8s algorithm closely aligns with other network models within the YOLO series. Initially, the input image is resized to ensure a consistent dimension of 640 \(\times\) 640 for all inputs. Subsequently, the network utilizes the Backbone and Head modules to extract features from the input image, yielding a feature map with dimensions B \(\times\) B \(\times\) C. In this context, the first two dimensions (B \(\times\) B) denote the dimensions of the extracted feature map, while the final dimension, C = n \(\times\) (5 + N), represents the number of bounding boxes predicted per grid as per the YOLO series algorithm.