# NGIoU Loss: Generalized Intersection over Union Loss Based on a New Bounding Box Regression
## 3 NGIoU Loss
Nevertheless, just like the aforementioned experiments, the confidence is affected, and it is found that the confidence of some targets has decreased. Therefore, the algorithm in this paper still has a lot of room for improvement. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Loss**} & \multicolumn{2}{c}{**AP**} & \multicolumn{2}{c}{**AP75**} \\ \cline{2-5}  & **Box** & **Mask** & **Box** & **Mask** \\ \hline SL1 & 31.5 & 29.1 & 32.4 & 30.1 \\ GIoU & 32.4 & 29.5 & 34.1 & 30.6 \\ CIoU & 32.2 & 29.6 & 33.9 & 30.9 \\ NGIoU & **32.5** & **29.6** & **34.4** & **31.0** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The comparison of performance indicators with different loss functions in the YOLACT algorithm. Figure 11: The comparison of confidence loss values trained by using different regression loss functions. ## 5 Conclusions

In this paper, a new generalized intersection over the union loss based on a new bounding box regression is proposed when the predicted box overlap with the regression box. By adding a bounding box regression, the loss will not fall into a plateau when the predicted box overlaps with the ground-truth box. Otherwise, the moving gradient makes the predicted box quickly moving to the ground-truth box and accelerating the regression. Experiment results demonstrate that compared with the GIoU Loss function, the NGIoU Loss function proposed in this paper makes the regression faster and more stable. In the two-dimensional target detection task, the NGIoU Loss function well replaces the GIoU Loss function, which provides a new and effective algorithm for the IoU series regression loss functions. Nevertheless, our algorithm still has some shortcomings. Firstly, the penalty term coefficient needs more theoretical support to adjust and find the best loss function. Secondly, the AP of the YOLOv4 algorithm does not run to the best effect, and needs further improvement. Finally, we only modify the loss function and improve the positioning effect of object detection, but do not consider the impact on other aspects, such as the confidence of detection. In the future work, it is planned to introduce two regression boxes for weighting, adjust the proportion coefficient of penalty terms and balance the proportion of penalty terms. This expansion and weighting as a loss may have a great potential to improve the performance of the target detection framework. Conceptualization, C.T. and Q.H. ; methodology, C.T., Q.H. and F.Q. ; software, C.T. ; validation, C.T. and Q.H. ; formal analysis, C.T. and F.Q. ; investigation, Q.H. and F.Q. ; resources, C.T., X.Y. and F.Q. ; data curation, C.T. and Q.H. ; writing--original draft preparation, C.T. ; writing--review and editing, Q.H. and F.Q. ; visualization, X.Y. ; supervision, X.Y. ; project administration, C.T., X.Y. and Q.H. ; funding acquisition, C.T., X.Y. and F.Q. All authors have read and agreed to the published version of the manuscript. This work was supported by the National Natural Science Foundation of China 61971297. Not applicable. **Data Availability Statement:** All data included in this study are available upon request by contact with the corresponding author. **Conflicts of Interest:** We declared that they have no conflict of interest to this work. We declared that we do not have any commercial or associative interest that represents a conflict of interest in connection with the work submitted. Figure 12: Test results of weight trained by using GIoU and NGIoU regression loss functions in the YOLACT algorithm. ## References

* (1) [PERSON]; [PERSON] Very deep convolutional networks for large-scale image recognition. _arXiv_**2014**, arXiv:1409.1556. * (2) [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Going Deeper with Convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7-12 June 2015; pp. 1-9. * (3) [PERSON]; [PERSON]; [PERSON]; [PERSON] Identity Mappings in Deep Residual Networks.