# Automatic Detection of Quasi-Periodic Emissions from Satellite Observations by Using DETR Method
## 3 Automatic Detection Method Development
### Adding Efficient Channel Attention Module  
The SE attention mechanism is a frequently employed channel attention mechanism that generates feature channel weights using a fully connected (FC) layer. However, the utilization of two non-linear FC layers unavoidably leads to a significant increase in parameters and computations, particularly when dealing with deep features containing numerous channels.  
In recent years, some scholars have proposed lightweight attention mechanisms, such as the ECA mechanism [28] (see Figure 6). In this paper, the ECA attention mechanism is used to assign weights to the features of the QP events in the channel dimension, thereby enhancing the important texture features. The ECA attention mechanism offers a more efficient and streamlined implementation compared to SE. Instead of compressing and reducing the input feature image channels, it uses one-dimensional convolution to effectively perform local cross-channel interactions. Attention weights are then obtained by taking into account the dependencies between the image channels. As the input image passes through the network, the size and number of its channels change, resulting in the extraction of deep features. The ECA module is applied to these features to enhance the representation.  
Figure 6 demonstrates the process of the ECA attention module. It begins by conducting a global average pooling operation on the input feature map with dimensions \(\text{H}\times\text{W}\times\text{C}\). Subsequently, a 1D convolution operation is applied using a convolution kernel of size k. The value of the convolution kernel k is obtained as an adaptive function of the number of input channels C, as depicted in Equation (3), where \(\left|x\right|_{old}\) denotes the closest odd number to x.  
\[k=\psi(c)=\left|\frac{log_{2}c+1}{2}\right|_{old} \tag{3}\]  
Following the convolution operation, the weights W for each channel are obtained through the application of the sigmoid activation function. To enhance the network's performance, the convolution shared weights are employed, enabling the efficient capturing of local interaction channel information while reducing the number of network parameters. The shared weight method is illustrated in Equation (4).  
\[W_{i}=\sigma\left(\sum_{j=1}^{k}W_{i}^{j}Y_{i}^{j}\right),Y_{i}^{j}\epsilon \Omega_{i}^{k} \tag{4}\]  
Figure 6: Diagram of our ECA module. Given the aggregated features obtained by global average pooling (GAP), ECA generates channel weights by performing a fast 1D convolution of size k, where k is adaptively determined via a mapping of channel dimension C.  
In Equation (4), \(\Omega_{i}^{k}\) indicates the set of k adjacent channels of \(\gamma_{i}^{j}\). \(\sigma\) represents the sigmoid activation operation. \(W_{i}\) denotes the i-th weight matrix acquired through the grouping of the C channels. \(W_{i}^{j}\) stands for the jth local weight matrix within the ith weight matrix. Additionally, \(\gamma_{i}^{j}\) is obtained using the same methodology.  
Finally, the obtained weights are multiplied by the original input feature map, resulting in a feature map with attention weights. The ECA attention mechanism, serving as a plug-and-play module, employs simple ideas and operations compared to other attention mechanisms. It has minimal impact on the network processing speed while significantly enhancing the classification accuracy.  
In our study, this enables our model to enhance the feature representation without significantly increasing the computational costs. The channel attention mechanism dynamically adjusts the weights of the channel features, enabling the model to better emphasize essential features. By doing so, the mechanism improves the discriminative ability of the features, consequently enhancing the overall performance of the model. Additionally, the capability to prioritize important features promotes better generalization, contributing to improved performance in diverse scenarios.