# Improved Matching Algorithm with Anchor Argument for Rotate Target Detection
## 3 The Proposed Method
### Anchor Argument Matching  
After the above analysis, we believe that the capability of the network structure is actually enough, but this has not been excavated yet. If the anchors are set with sufficient angles, the detection results of the network will no longer be affected by the target angle. During training, the RRoI with classification and regression ability will be regarded as a negative sample because of the low IoU of the target and the oriented anchor. In fact, a recent article has proved that many anchors with negative samples can finally predict the correct target [4]. Motivated by this case, our fundamental idea was to reduce the number of anchors with regression ability, which are regarded as negative samples in the network. In rotation object detection with orientation anchor, we proposed an anchor argument matching method, which is an optimization method in the anchor-target matching stage. In particular, we generated multiple duplicates with different angles for each orientation anchor to assist the original anchor in matching. In the training process, when we calculated the IoU between the target and each rotation anchor, we first generated some duplicates for the anchor. The step \(S_{New}\) between the auxiliary copies (including the original anchor) is defined as:  
\[S_{New}=S_{Old}/times \tag{1}\]  
where \(S_{Old}\) is the step between two adjacent anchors, which are used for regression, and times means the number of copies generated to assist an anchor. \(S_{New}\) is the step between  
Figure 4: The auxiliary anchor method can improve the non-anchor angle target score. (**a**) The baseline score when the target and anchor angle is same. (**b**,**c**) The baseline score when the target and anchor angle is different, which shows the decrease in score is 0.19, caused by the angle increase. (**d**) Our method score when the target and anchor angle is the same. (**e**,**f**) Our method score when the target and anchor angle is different in our method, which shows the decrease in score is 0.02, caused by the angle increase. It can be found that this method can effectively improve the score of the target when the angle of the target is different from that of the anchor. two adjacent anchors after we add these duplicates anchors. The angles of these auxiliary duplicates are:  
\[A_{copy}=A-x\times S_{New} \tag{2}\]  
where \(x\in-times\ldots-1,\ 1,\ \ldots times\), \(A_{copy}\) represents the anchor angle of each copy, and A means the original angle of the anchor. We can generate the number of auxiliary copies by setting the value of \(x\). All the structures in the network will remain the same except this; thus, the computation of prediction will not increase. In the matching stage, the IoU is defined as the maximum value of the IoU between the targets and anchors, including the original anchor and auxiliary copies, which is represented as:  
\[\text{IoU}=max\big{(}\text{IoU}_{\text{ori}},\text{IoU}_{copy}\big{)} \tag{3}\]  
where \(\text{IoU}_{\text{ori}}\) is the IoU between the target and the original anchor, and \(\text{IoU}_{copy}\) is the IoU between the target and auxiliary copies. This maximizing process will go through all of the auxiliary copies. Then, the IoU is compared with the threshold to distinguish the positive and negative samples. In this way, we can avoid the missing detection of positive samples due to the angle sensitive characteristics of IoU when the rotating anchor matches the target with a high aspect ratio and get a better matching effect through more copies. This method only increases the number of positive samples, not negative samples. How does this proposed method work? The fairness of our method can be explained as the same target rotated to any angle can match the same number of anchors.