## 2 Methods
### Optimize Loss Function  
The bounding box regression loss function used by YOLOv8 is Complete Intersection over Union (CIoU) [43]. Its calculation formula is as follows:  
\[CIoU=1-IoU+\frac{\rho^{2}(b,b^{st})}{c^{2}}+\alpha v \tag{3}\]  
\[\alpha=\frac{v}{(1-IoU)+v} \tag{4}\]  
\[v=\frac{4}{\pi^{2}}(arctan\frac{w^{st}}{h^{st}}-arctan\frac{w}{h})^{2} \tag{5}\]  
\[\frac{\partial v}{\partial w}=\frac{8}{\pi^{2}}(arctan\frac{w^{st}}{h^{st}}- arctan\frac{w}{h})\times\frac{h}{w^{2}+h^{2}}\frac{\partial v}{\partial h}=-\frac{8}{ \pi^{2}}(arctan\frac{w^{st}}{h^{st}}-arctan\frac{w}{h})\times\frac{h}{w^{2}+h ^{2}} \tag{6}\]  
In the formula, \(b\) and \(b^{st}\) represent the center points of the predicted box and true box, respectively; \(\rho(\cdot)\) denotes the Euclidean distance between the two points; \(IoU\) represents the Intersection over Union (\(IoU\)) between the predicted box and the true box. \(c\) is the diagonal length of the smallest enclosing box covering both the predicted and true boxes. \(\alpha\) and \(v\) are hyperparameters. \(w\) and \(h\) represent the width and height of the predicted box, respectively, and \(w^{st}\) and \(h^{st}\) represent the width and height of the true box, respectively. Equations (3)-(6) constitute the complete expression for the CIoU loss function. Although the CIoU loss function takes into account multiple geometric features of the predicted and true boxes, including aspect ratio, center distance, and overlap area, to improve the accuracy of regression localization, CIoU still has the following shortcomings: (1) When \(\big{\{}(w=kw^{st},h=k^{st}|k\in R^{+})\big{\}}\) occurs, it can cause \(v=0\), and the loss function is unable to make an effective judgment at this time; (2) as can be seen from Equation (6), \(\frac{\partial v}{\partial w}\) and \(\frac{\partial w}{\partial h}\) have opposite signs, which means that the aspect ratio of the anchor boxes cannot increase or decrease simultaneously, leading to the predicted boxes not fitting the true boxes well; (3) using the aspect ratio alone cannot effectively reflect the discrepancy between the anchor  
Figure 5: F-C2f structure. boxes and the true boxes, and there are some limitations in dealing with small annotated boxes and non-overlapping low-quality annotated boxes during regression. To address the above issues and enhance the model's performance, this paper adopts Focal-EIoU as a replacement for CIoU. The calculation formula for Focal-EIoU is as follows:  
\[L_{EIoU}=1-IoU+\frac{\rho^{2}\big{(}b,b^{gt}\big{)}}{c_{w}^{2}+c_{h}^{2}}+\frac {\rho^{2}\big{(}w,w^{gt}\big{)}}{c_{w}^{2}}+\frac{\rho^{2}\big{(}h,h^{gt}\big{)} }{c_{h}^{2}} \tag{7}\]  
\[L_{f(x)}= \begin{cases}-\frac{\pi x^{2}[2 ln(\beta x)-1]}{4},0<x\leq 1;\frac{1}{ \epsilon}\leq\beta\leq 1\\ -\alpha ln(\beta)x+C,x>1;\frac{1}{\epsilon}\leq\beta\leq 1\end{cases}  \tag{8}\]  
\[L_{Focal-EIoU}=IoU^{\gamma}L_{EIoU} \tag{9}\]  
In the formula: \(c_{w}\) and \(c_{h}\) indicate the width and height of the smallest enclosing area for both the predicted and true boxes; \(x\) represents the difference between the true values and predicted values; \(e\) is the natural constant; \(\beta\) is used to control the curvature of the curve; \(C\) is a constant; and \(\gamma\) is a parameter used to control the degree of outlier suppression. Efficient Intersection over Union (EIoU) improves upon the shortcomings of CIoU by dividing the loss function into three parts: distance loss, aspect ratio loss, and IoU loss. It modifies the aspect ratio component in CIoU to address issues arising from the use of aspect ratios. Due to the complexity of space environments, the quality of images is highly susceptible to disturbances from surrounding environmental factors, leading to fluctuations in image quality. Especially when images contain a lot of noise and have indistinct contours, deep learning models are prone to false negatives and false positives.