# Improved Matching Algorithm with Anchor Argument for Rotate Target Detection
###### Abstract  
Convolutional neural networks (CNNs) have been widely used in the task of object detection in remote sensing. Remote sensing targets can have arbitrary angles, and many anchor-base methods use a lot of anchors with different angles which cause efficiency and precision problems. To solve the problem caused by too many anchors, this paper presents a novel matching algorithm in the matching stage of the rotating anchor and object, which determines a more accurate rotating region of interests (RRoIs) for target regression using the copies set for each oriented anchor. It makes use of the high recall rate brought by a large number of anchor boxes with different angles and avoids the computation brought by a large number of anchor boxes. We use the remote sensing datasets DOTA and HRSC2016 with rotation bounding boxes to evaluate our improved algorithm on Rotation RetinaNet and compare it with it. For the targets of high aspect ratios, such as large vehicles and ships, our method is superior to Rotation RetinaNet and achieves a better performance.  
object detection; remote sensing images; anchor argument +
Footnote †: journal:  
technique. Thus, the oriented bounding box is necessary for oriented object detection in aerial images.  
Inspired by the arbitrarily oriented text detection model RRPN [3], many methods have been proposed with a rotated region of interests (RRoIs) which matches the oriented ground truth (GT) bounding boxes better. Although these rotation detectors have achieved good results, the computational cost dramatically increases as there is a large number of oriented anchors generated on each pixel. For example, the RRPN's anchors increase five times. Reference article [4] shows the latency of NMS in their algorithm. If the number of anchors increases four times, the latency will increase 2.5 times; these values are showed in Table 1. Alternatively, another solution is to set more reasonable matching rules for the oriented GT bounding boxes and region of interests (RoIs), such as DAL [5]. However, these methods will lead to a complex model structure and a tardy convergence rate.  
For the sake of making use of the accuracy of the oriented anchor matching while minimizing the excessive amount of calculation, we propose a new matching strategy for anchors and targets. As shown in Figure 1, the smaller the angle interval of the oriented anchor set on each pixel (the more the number of anchors at different angles), the more the number of anchors matched by the target and the better the detection effect in the matching stage. Motivated by this, we separated the anchors used in the matching stage from those used in the regression stage. In the matching stage, we designed several auxiliary copies for each anchor used for regression to reduce the angle interval of the oriented anchor and improve the detection ability while avoiding the invalid calculation caused by these auxiliary copies in the regression step. The benefits are illustrated in Figure 2. Based on the proposed framework above, we achieved a performance of 6.96% and 9.90% higher than the baseline on the rotating sensitive datasets, including the large vehicle in DOTA and HRSC2016, respectively.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Anchor Number** & **Nms Execution Time** \\ \hline
200 & 10 ms \\
1000 & 35 ms \\ \hline \hline \end{tabular}
\end{table}
Table 1: The relationship between anchor numbers and latency from Reference article [4].  
Figure 1: (**a**) Oriented objects with horizontal bounding boxes. (**b**) Oriented objects with oriented bounding boxes.