## 2 Data and Methodology
### Improvement in Loss Function  
The bounding box regression loss function in the YOLOv5 algorithm reflects the Intersection over Union (IOU) between the predicted box and the ground-truth box, which should be optimized during the training process:  
\[IoU=\frac{|A\cap B|}{|A\cup B|} \tag{1}\]  
where \(A\) and \(B\) denote the ground-truth box and the predicted box, respectively. A basic and commonly used form of bounding box loss is the generalized IOU (GIOU) loss [23], but it tends to result in slow convergence and relatively low accuracy. In the particular cases where one of the boxes is contained in another, GIOU degrades to IOU, which makes the objective function less efficient. An improved formulation of the loss function is the complete IOU (CIOU) loss [24], defined as  
\[L_{CIOU}=1-IOU+\frac{\rho^{2}}{c^{2}}+\alpha v \tag{2}\]  
\[v=\frac{4}{\pi^{2}}\bigg{(}\arctan\frac{w^{gt}}{hs^{gt}}-\arctan\frac{w}{h} \bigg{)}^{2} \tag{3}\]  
\[\alpha=\frac{v}{1-IOU+v} \tag{4}\]  
In the equations above, \(\rho\) stands for the Euclidean distance between the central points of the predicted box \(B\) and the target box \(B^{gt}\) (\(\mathbf{b}\) and \(\mathbf{b}^{gt}\)), \(c\) is the diagonal length of the smallest enclosing box covering both boxes, and \(v\) measures the difference in the width-to-height ratio. Recently, [PERSON] et al. (2021) [25] proposed efficient IOU (EIOU), a modified form of loss function based on CIOU:  
\[L_{EIOU}=1-IOU+\frac{\rho^{2}\big{(}\mathbf{b},\mathbf{b}^{gt}\big{)}}{c^{2}} +\frac{\rho^{2}\big{(}w,w^{gt}\big{)}}{\big{(}w^{c}\big{)}^{2}}+\frac{\rho^{2 }\big{(}h,hs^{gt}\big{)}}{\big{(}h^{c}\big{)}^{2}} \tag{5}\]  
where \(w^{c}\) and \(h^{c}\) denote the width and height of the smallest enclosing box covering \(B\) and \(B^{gt}\). The EIOU loss directly takes into account the relative discrepancies of widths and heights instead of the width-to-height ratios. In this work, we take one further step in the modification of the loss function by revising EIOU into the following form:  
\[\widetilde{L}_{EIOU}=L_{EIOU}(IOU+\beta)^{\gamma} \tag{6}\]  
The parameters \(\beta\) and \(\gamma\) are set to be constants that can be tuned. The major aim of this modified formulation is to make the network focus more on the high-quality anchor boxes by placing more weights on these boxes relative to those with a lower IOU score. In other words, boxes that are more relevant to the targets have a greater influence on the bounding box loss function, thus enhancing convergence during the optimization process. \(\beta\) and \(\gamma\) serve to control the extent to which the effects of irrelevant frames are diminished by manipulating the shape of the coefficient. \(\beta>0\) is required since the boxes with the IOU value of zero can be potential candidates for the localization of the target and are not negligible in the loss function. The weight becomes a concave function of IOU when \(\gamma<1\), the hyperparameter range which proves favorable for our testing, in which case only the gradients of the anchor boxes with very small overlap ratio are significantly weakened. The revised loss function is relatively simple in its formulation and does not require additional treatment for the initialization of the optimization process as long as the parameters are set within an appropriate range.