## 3 Materials and Methods
### Rotated Rectangular Box Optimization  
(1) Rotated circular smoothing labels  
To account for the diverse orientations of objects in remote sensing images, the eight-parameter method is adopted to represent rotated bounding boxes (as RBO). This method represents a rotated rectangle with its four vertices, (x\({}_{1}\), y\({}_{1}\)), (x\({}_{2}\), y\({}_{2}\)), (x\({}_{3}\), y\({}_{3}\)), and (x\({}_{4}\), y\({}_{4}\)), in counterclockwise order, starting from the top-left corner. The input format for this model is in the form of eight-parameter annotations. These eight-parameter annotations are fed into the network, and the decoding process is performed to extract the rotation angle. The decoding process can be described as follows:  
\[arctan(\theta)=\frac{x_{1}+x_{4}-x_{3}-x_{2}}{y_{1}+y_{4}-y_{3}-y_{2}} \tag{5}\]  
The decoding process transforms the bounding box annotation format to a representation based on the angle denoted by \((x,y,w,h,\theta)\). However, this introduces issues such as angle periodicity and boundary discontinuity. The angle regression approach is converted to a classification form to address angle periodicity, avoiding angles beyond their valid range. However, converting the regression problem to a classification problem results in a significant loss of accuracy. To measure the distance between angle labels, we introduce circular smooth labels (CSLs) in this study. CSLs mitigate the issue of boundary discontinuity by defining a window function g(x) to measure the angular distance between predicted and confidence labels. The prediction loss is smaller when the detection value is closer to the ground truth within a specific range. Compared to previous methods, CSLs exhibit higher tolerance to adjacent angles, alleviating the problem of unbalanced angles. The expression for CSLs is given as follows:  
\[ \begin{split} CSL(x)=&\begin{cases}g(x),& \theta-r<x<\theta+r\\ 0,&otherwise\end{cases}\end{split}  \tag{6}\]  
To increase the detection of rotated rectangular bounding boxes, we introduce the concept of circular smooth labels in this study. The original label is denoted by x, while the window function with a radius, r, is represented by g(x). The diameter extent of the window function determines the angle of the current bounding box. Using the window function, our model can calculate the angular distance between the predicted and ground truth labels. This approach enhances the original YOLOv7 model, allowing it to detect rotated rectangular bounding boxes more accurately. Consequently, as the predicted and true values become closer to a true range, the loss value decreases. We also address the issue of angular periodicity by incorporating periodicity, whereby angles like 89 degrees and \(-90\) degrees are considered neighbors. The regression process for rotating bounding boxes with circular smooth labels is illustrated in Figure 4. Through these improvements, we aim to achieve more accurate detection of rotated bounding boxes. Loss function design  
For the new algorithm (EYMR-Net) proposed in this paper, since it supports the learning of rotating bounding boxes, we add the designed angle classification \(Loss_{theta}\) to the original loss function, and the total loss function formula is as follows:  
\[Loss=Loss_{obj}+Loss_{(x,y,w,h)}+Loss_{cls}+Loss_{theta} \tag{7}\]  
In this context, \(Loss_{obj}\) denotes confidence loss, \(Loss_{(x,y,w,h)}\) indicates horizontal bounding box coordinate localization loss, \(Loss_{cls}\) refers to target category loss, and \(Loss_{theta}\) represents angle classification loss. For confidence loss, target category loss, and horizontal bounding box coordinate localization loss, no improvement is needed by using the same loss function as YOLOv7 because the \(\theta\) variable is not involved. The newly added angular categorization loss function formula is shown below:  
\[