## 3 Rotational Feature Enhancement FCOS
### Dual-Aspect RIoU Loss  
Traditional object detection methods primarily focus on the processing of horizontal bounding boxes, which require the prediction of only four parameters \((x,y,w,h)\). In contrast, remote sensing images often feature objects that appear in various orientations, necessitating the inclusion of rotational parameters such as \(\theta\). This introduces a more complex multi-dimensional regression task, where the model must handle both the dimensions of the horizontal bounding box and the angle of rotation.  
To address the complexities introduced by arbitrary orientations, [PERSON] et al. [34] extended the GIoU loss by incorporating a rotated bounding box representation, which allows for the better handling of rotated targets. Similarly, we propose a loss function that integrates the losses from both the horizontal bounding box and the rotated bounding box dimensions. This design enables the model to first minimize the discrepancies in the horizontal bounding box and then focus on optimizing the rotation angle. The process is presented in Figure 6 and our loss function is designed as follows:  
\[Loss=1-CRIoU+R(IoU_{H},IoU_{R})\, \tag{14}\]  
where CRIoU is a variant of the CIoU loss, adapted to include rotational information, and the term \(R(IoU_{H},IoU_{R})\) represents the penalty component that combines both horizontal and rotational intersection over union (\(IoU_{H}\)), offering complementary insights to improve prediction accuracy. This dual-component loss provides complementary insights, enhancing the accuracy of the bounding box predictions. The CRIoU loss function is formulated as follows:  
Figure 5: The structure of the RFF module.  
\[CRIoU=IoU_{R}-\frac{p^{2}\big{(}b_{p},b_{g}\big{)}}{c^{2}}-\alpha v\, \tag{15}\]  
where \(p\big{(}b_{p},b_{g}\big{)}\) is the centroid distance between the predicted and ground truth boxes, \(c\) is the diagonal length of the minimum enclosing box, and the aspect ratio difference term \(v\) and the balance factor \(\alpha\) are determined as follows.  
\[v=\frac{4}{\pi^{2}}\Bigg{(}arctan(\frac{w_{gt}}{h_{gt}})-arctan(\frac{w_{ pred}}{h_{pred}})\Bigg{)}^{2}, \tag{16}\]  
\[\alpha=\frac{v}{(1-IoU_{R})+v}, \tag{17}\]  
where \(IoU_{R}\) is adapted to help with the regression of the oriented bounding box. The penalty term \(R(IoU_{H},IoU_{R})\) is designed to combine the influence of both horizontal and rotational IoU components and is defined as:  
\[R(IoU_{H},IoU_{R})=\lambda\cdot\frac{(1-IoU_{H})\cdot(1-IoU_{R})}{1+\mu\cdot( 1-IoU_{H})\cdot(1-IoU_{R})}, \tag{18}\]  
where \(\lambda\) and \(\mu\) are hyperparameters that regulate the relative significance of the horizontal and rotational IoU. The penalty term allows the network to adjust its focus between the horizontal and rotational components based on their alignment. In particular, when either \(IoU_{H}\) or \(IoU_{R}\) is close to 1, the effort of the penalty term diminishes, resulting in the loss function degenerating to the CRIoU. In this scenario, only minor refinements to the bounding box are required to achieve a satisfactory result. Conversely, when both \(IoU_{H}\) and \(IoU_{R}\) are significantly low, the penalty term exerts a stronger influence, causing the network to make more substantial adjustments to both the horizontal and rotated bounding box parameters, thereby accelerating the improvement process. Figure 6 shows the content of our proposed loss function.