# Automatic Detection of Quasi-Periodic Emissions from Satellite Observations by Using DETR Method
## 3 Automatic Detection Method Development
### QP-DETR Design  
Figure 4 illustrates the detailed architecture of our proposed automatic detection model using DETR, called QP-DETR. One of the key features of DETR is the Transformer attention mechanism, which enables the neural network to extract important information from the input images. Through the attention mechanism, the network dynamically adjusts the weights, assigning higher weights to significant signals (i.e., the target) and lower weights to other signals within the input data. In essence, the attention mechanism mimics the human brain by automatically focusing on the most salient and relevant pixels in the image, with the specific saliency depending on the application [10]. DETR differs from prior target detection algorithms in that it achieves full end-to-end target detection without the need for a non-maximum suppression (NMS) post-processing step or prior knowledge and constraints such as anchor boxes [11].  
The network architecture of DETR is remarkably straightforward and comprises four main components: a backbone for the extraction of image features, a Transformer-based encoder, a decoder, and a prediction module. In the backbone, a traditional convolutional neural network (CNN) is employed to extract features. Following a \(1\times 1\) convolution, the channel is downscaled. Together with the positional encoding of the image, these image features are input into the Transformer-based encoder to generate candidate features. The decoder then decodes both the candidate features and the object query independently. Finally, box coordinates and class labels are obtained through a fully connected layer to formulate the final prediction.  
Figure 4: A comprehensive diagram illustrating the structure of the QP-DETR model. Following the diagram from the top left to the bottom left, the entire flow from the input image to the output of the detection results is depicted. The model incorporates the ECA mechanism. A detailed explanation of the ECA is provided in Section 3.3.  
The encoder in the Transformer model primarily consists of two components: self-attention and a feed-forward neural network (FFN). The decoder is composed of a multi-headed self-attention mechanism and an encoder-decoder attention mechanism. This process allows the model to capture the relationships between different positions within the input sequence and assign appropriate weights to the feature representations.  
After obtaining the weighted feature vector \(Z\) through the self-attention mechanism in the encoder, it is passed to the FFN module. This module primarily consists of two layers: an activation function, namely a Rectified Linear Unit (ReLU) layer, and a linear activation function, as depicted in Equation (2).  
\[FFN(Z)=\max(0,ZW_{1}+b_{1})W_{2}+b_{2} \tag{2}\]  
In Equation (2), \(W_{1}\) and \(W_{2}\), respectively, represent the weight parameters of the activation function. On the other hand, \(b_{1}\) and \(b_{2}\) denote the bias parameters of the linear activation function.  
In the decoder structure, the input is decoded in parallel using X decoder blocks. The input is augmented with positional encoding, which is based on the sine function, to provide information about the positions of the tokens in the sequence. After incorporating positional encoding, the input is passed through the decoder block, which consists of self-attention and FFN layers. The output from the decoder block is then transformed into the final output.