Optimized loss functions for object detection and application on nighttime vehicle detection
The loss function is a crucial factor that affects the detection precision in the object detection task. In this paper, we optimize both two loss functions for classification and localization simultaneously. Firstly, we reconstruct the classification loss function by combining the prediction results of localization, aiming to establish the correlation between localization and classification subnetworks. Compared to the existing studies, in which the correlation is only established among the positive samples and applied to improve the localization accuracy of predicted boxes, this paper utilizes the correlation to define the hard negative samples and then puts emphasis on the classification of them. Thus the whole misclassified rate for negative samples can be reduced. Besides, a novel localization loss named MIoU is proposed by incorporating a Mahalanobis distance between the predicted box and target box, eliminating the gradients inconsistency problem in the DIoU loss, further improving the localization accuracy. Finally, the proposed methods are applied to train the networks for nighttime vehicle detection. Experimental results show that the detection accuracy can be outstandingly improved with our proposed loss functions without hurting the detection speed.