## 4 Design of Decoupled Detection Head for Elliptical Center Sampling
### Decoupled Detection Branch Design  
The decoupled detection head comprises three branches. The first branch is the classification branch, which processes the feature map designated for classification through a fully connected layer to directly output a \(c\)-dimensional vector, representing the confidence scores for \(c\) classes within the detected box. The second branch is a five-dimensional vector for bounding box regression. It processes the feature map for bounding box regression through a convolutional layer to directly output the object's positional information, predicting the detection box's center coordinates, height, width, class, and rotation angle. The third branch is a one-dimensional vector that is used to output the object's _Center-ness_ score. Figure 8 illustrates the structure of the anchor-free decoupled detection head proposed in this section.  
Due to the adoption of an anchor-free method, a large number of prediction bounding boxes with low intersections over unions (IOUs) were observed to be generated at locations far from the true target center during experiments. Therefore, a Center-ness branch is added to the detection head to suppress the generation of these low-quality-prediction bounding boxes. Its calculation method is shown in Equation (7). The representations of \(t,r,l,b\) are illustrated in Figure 9.  
Figure 7: Horizontal object detection regression process diagram: (**a**) initial anchor; (**b**) removal of the background anchor; and (**c**) after regression.  
First, the bounding box regression mentioned above can provide a target's 2D coordinates. However, horizontal detection boxes are limited by their inability to rotate. To address this problem, this paper extends the four-dimensional position vector \((x,y,w,h)\) by adding an angle vector \(\theta\), resulting in a five-dimensional position vector \((x,y,w,h,\theta)\). As shown in Figure 10, the goal of oriented object detection is achieved by regressing the variable \(\theta\). To implement a rotated bounding box regression in the object detection head, a rotation factor \(\theta\) and the target's height \(h\) and width \(w\) are added to the general smooth L1 loss function in this paper. Five parameters \((x,y,w,h,\theta)\) are used to represent arbitrarily oriented rectangles, with \(\theta\) restricted to an acute angle within the range \([\pi/2,0]\). The formula for the rotated bounding box is given in Equation (8).  
Figure 8: Decoupled object detection head architecture.  
Figure 9: Center-ness calculation representation.  
\[\left\{\begin{aligned} & t_{x}=(x-x_{a})/w_{a},t_{y}=(y-y_{a})/h_{a}\\ & t_{w}=\log(\frac{w}{w_{a}}),t_{h}=\log(\frac{h}{h_{a}})\\ & t_{\theta}=\theta-\theta_{a}\end{aligned}\right. \tag{8}\]  
where \(x,y,w,h,\theta\) represent the box's center coordinates, width, height, and rotation angle, respectively. The multi-dimensional loss function is defined as follows:  
\[L=\frac{\lambda_{1}}{N}\sum_{n=1}^{N}t_{y}^{\prime}\sum_{j\in\{x,y,w,h,\theta\} ^{N}}^{N}L_{\text{reg}}(v_{nj}^{\prime},v_{nj})+\frac{\lambda_{2}}{N}\sum_{n=1 }^{N}L_{\text{cls}}(p_{n},t_{n}) \tag{9}\]  
where \(N\) represents the number of anchors and \(t_{n}^{\prime}\) represents the foreground hot encoding: \(t_{n}^{\prime}=1\) for background and \(t_{n}^{\prime}=0\) for foreground. \(v_{j}\) denotes the predicted offset vector, while \(v_{j}^{\prime}\) represents the target vector of \(GT\). \(t_{n}\) indicates the target's label class, and \(P_{n}\) is the class probability. The distribution of various categories is calculated using the sigmoid function. Hyperparameters \(\lambda_{1}\) and \(\lambda_{2}\) are manually adjusted as weights, with a default setting of 1. The classification loss \(L_{cls}\) and regression loss \(L_{reg}\) are implemented using Focal Loss [28].