# A Lightweight Small Target Detection Algorithm for UAV Platforms
## 3 The Proposed RSG-YOLO Algorithms
### RFCAConv  
Receptive-Field Attention (RFA [18]) is introduced to focus on spatial features in the receptive field and dynamically determine the importance of each feature in the receptive field, providing effective attention weights for large-size convolutional kernels and addressing the issue of parameter sharing of convolutional kernels. Self-attention effectively solves the parameter sharing and long-range information dependence issues but also brings significant computational overhead and complexity. As shown in Figure 2a, CA (coordinate attention [19]) is used to encode the captured precise location information into the neural network while modeling the channel relationship and long-range dependence, directing the attention of the spatial attention mechanism in CA to the receptive field spatial features to obtain RFCAConv. The computational flow is shown in Figure 2b, where grouped convolution is used to extract the receptive field spatial features to generate a feature map with the receptive field, and CA captures the position information and channel information to generate the final attention map. This process achieves the simulation of the self-attention mechanism, effectively addresses parameter sharing and long-distance information modeling issues, and requires less computational resources to bring about a significant gain.  
In Figure 2, C, \(H\), and \(W\), respectively, represent the number of channels, height, and width of the feature map. \(r\) represents the compression multiple of the number of channels. \(K\) represents the stride of the convolution operation. X Avg Pool and W Avg Pool,  
Figure 1: The network structure of RSG-YOLO.  
Figure 2: Comparison between CA and RFCAConv. (**a**) The CA calculation flowchart; (**b**) the RFCAConv calculation flowchart.  
respectively, represent the 1D horizontal global average pooling. Y Avg Pool and H Avg Pool, respectively, represent the 1D vertical global average pooling.  
The detection of small targets in complex backgrounds is prone to interference from background noise and irrelevant features. However, the attention mechanism can effectively solve this problem. Moreover, introducing receptive field features into the attention mechanism can help the model adjust the receptive field according to the position and size of the targets. Meanwhile, by utilizing the attention mechanism to focus on the unique features of each target, multiple targets can be detected more accurately, thus improving the precision of multi-target detection. Therefore, it was decided to use RFCAConv to replace the traditional convolution in YOLOv8n, with the expectation of bringing better detection accuracy. By increasing spatial features and channel attention through enhanced receptive field attention, the model learns more important features from the spatial and channel dimensions, inhibits unimportant information, and captures long-distance dependencies in the feature map. This effectively addresses the issues of fewer small target features, complex backgrounds, and the strong reliance on contextual information in the UAV viewpoint, significantly enhancing the model's feature extraction and expression ability.