Loss Functions in YOLOv3

Bounding Boxes

For bounding boxes, the loss is MSE of

  • Delta in center coordinates

  • Delta in width and height



Classification

In YOLOv3, the loss for classification is Binary Cross-Entropy loss rather than the general Softmax CE. Softmax links the confidence of each class together while Binary CE keeps them independent. We can treat a binary CE as a 2-class CE.

, where s and 1 - f ( s ) are the score for positive and negative, t and (1-t) are the ground truth.

Applying this to each class, the combined loss for class is as:

The gradient respect to the score can be written as:

or

,
is the sigmoid function , ,