# RS-YOLOX: A High-Precision Detector for Object Detection in Satellite Remote Sensing Images
## 3 Proposed Methods
### Efficient Channel Attention (ECA)  
Attention mechanisms in computer vision can ensure that models pay more attention to important information and selectively forget unimportant information or disturbing information that affects judgment. Therefore, object detection models can capture better features by using attention mechanisms, improving the performance of the model in detecting small objects. The ECA blocks [37] adopted in this article are an improvement over SE blocks [26].  
SE is the beginning of channel attention mechanisms in computer vision. It strengthens important features by modeling the feature correlation between channels, thereby improving the detection performance of the model. Figure 4 shows the structure of the SE block.  
Figure 4: SE block structure.  
Figure 3: Detection process of RS-YOLOX.  
The SE block uses two fully connected layers to capture nonlinear cross-channel interaction information. The parameters of the two fully connected layers are learned by network training. These parameters act on the feature map and can extract more important features. To reduce the complexity of the model, the first fully connected layer reduces the number of channels, which makes the model more lightweight, but weakens the connection between the channel and the weight vector and is not good for capturing the interrelationships between channels. To address this shortcoming, the ECA block cancels the operation of dimensionality reduction and uses one-dimensional (1D) convolution, which not only reduces the number of parameters, but also improves the detection accuracy of the model. ECA removes the fully connected layer in the SE block and directly learns through a weight-sharing 1D convolution on the features after global average pooling (GAP). One-dimensional convolution involves the hyperparameter k, which is the size of the convolution kernel and represents the coverage of local cross-channel interactions. ECA attempts to capture inter-channel interactions using each channel of feature maps and its k neighbors. Figure 5 displays the structure of an ECA block.  
In Figure 5, the weights of 1D convolution are interleaved, realizing the function of mutual cross-channel. Weights exist in groups, and the number of weights in a group depends on the size of the convolution kernel. The values of weights of each group are shared, which greatly reduces the number of parameters. The attention of SE is calculated through two fully connected layers, while the attention of ECA is calculated through k nearest-neighbor channels. The size of k obviously affects the efficiency of ECA block calculation. In fact, k is related to the number of channels C; the nonlinear mapping relationship between them can be described by an exponential function. This can be formulated as:  
\[\mathrm{C}=\mathrm{\phi(k)}\approx\mathrm{exp}(\mathrm{\gamma*k-b}) \tag{1}\]  
The number of channels is usually an exponential multiple of 2, so k can be calculated by the following formula:  
\[\mathrm{k}=\mathrm{\Psi(C)}=\big{|}\frac{\mathrm{log}_{2}\mathrm{C}}{\mathrm{ \gamma}}+\frac{\mathrm{b}}{\mathrm{\gamma}}\big{|}_{\mathrm{odd}} \tag{2}\]  
The structural design of ECA avoids dimensionality reduction, realizes cross-channel information interaction, and reduces the amount of calculation. It is an effective ultra-lightweight attention mechanism module. We added ECA blocks to the backbone network of YOLOX so that the features extracted by the backbone network were enhanced in the attention weight matrix.