## 3 Method
### Region Proposal  
Region Proposal Network (RPN) is mainly used to generate anchor boxes for the predictor head and to perform foreground-background classification on these boxes. However, in the meta-test of meta-learning object detection, the training mode of RPN is fine-tuned based on the parameters learned in meta-training. Due to the small number of samples, RPN has limited regression ability for the new class targets in this way, resulting in low-quality anchor boxes for new classes and affecting the detection of new class targets by the predictor head.  
We propose the Meta-Attention Region Proposal Network (MA-RPN), which utilizes support set features to enhance the expression ability of target classes in query set features and increases the model's attention to foreground regions through spatial attention mecha  
Figure 2: Network architecture of Meta PowerNet.  
nism. Finally, by combining image details, the module could generate higher quality and more effective anchor boxes.  
As shown in Figure 3, in order to activate the important feature representation of the support set classes in query features, the global feature of the support set, which is obtained through global average pooling with support feature \(f_{s}^{i}\), is fused with the query feature \(F_{4}\) by MA-RPN. The specific method to obtain the global feature of support set will be introduced in the next section. More specifically, we use depth-wise cross-correlation [33] as the fusing method, the global feature of support set is used as a convolutional kernel to reweight the query set features \(F_{4}\), and the reweighted query feature \(F_{5}\) can guide MA-RPN to produce anchor boxes relevant to classes of support set. Fusing process is shown in Equation (1).  
\[F_{5}=GAP\Big{(}f_{s}^{i}\Big{)}\otimes F_{4} \tag{1}\]  
Subsequently, MA-RPN trains a spatial weight matrix to weight the reweighted query features through spatial attention mechanism, highlighting the position representation of foreground objects in the features; we mark it as \(F_{5}^{\prime}\). Unlike traditional spatial attention, the input features here are the reweighted query features, which not only enhance the region proposal ability in meta-training but also carry more effective new-class features to participate in the spatial attention in meta-test, which can effectively improve the efficiency of fine-tuning and generate more accurate anchor boxes for new-class objects.  
In addition, in order to reduce the loss of detailed information in the feature extraction network and improve the accuracy in predicting positions of anchor boxes, we also involve the low-level feature in the generation process of anchor boxes. First, we feed the query set feature \(F_{3}\), which carries more detailed information from the third level of backbone to a convolutional layer, which has a convolution kernel with a size of 3\(\times\)3, to adjust its dimension and size. After the L\({}_{2}\) regularization process, the new feature \(F_{3}^{\prime}\) is output. Then, the feature \(F_{5}\) is fused with it, so that the model can generate more effective candidate boxes by combining high-level semantic information with low-level detail information. The fusion method used here is inspired by the Feature Pyramid Network, where features \(F_{5}\) and \(F_{3}^{\prime}\) are added layer by layer to obtain feature \(F_{RPN}\), which is used as the feature layer for anchor boxes extraction. The formula is shown in Equation (2). Subsequently, anchor boxes are classified as foreground or background, and their bounding boxes are regressed  
Figure 3: Architecture of MA-RPN.  
through the same operations as in the original RPN. Finally, a specified number and size of anchor boxes are output and mapped to feature \(F_{4}\) via ROI Align.  
\[F_{RPN}=conv(F_{5})+L_{2}(F_{3}) \tag{2}\]