<p>First, to understand the YOLOv4 loss, I think you should read about the original YOLO loss that was released in YOLO first paper (<a href="https://arxiv.org/abs/1506.02640" rel="noreferrer">https://arxiv.org/abs/1506.02640</a>), you can find it <a href="https://i.stack.imgur.com/5boQl.png" rel="noreferrer">here</a>.<br />
In YOLOv4, you will have the exact same ideas, but with:</p>
<ul>
<li>Binary cross entropy for the objectness and classification scores,</li>
<li>Box-per-cell level prediction instead of cell level prediction for the class probabilities, so a slightly different penalization for the classification terms,</li>
<li>CIoU Loss instead of MSE for the regression terms (x,y,w,h). CIoU stands for Complete Intersection over Union, and is not so far from the MSE loss. It proposes to compare width and height a bit more interestingly (consistency between aspect ratios), but it keeps the MSE for the comparison between bounding box centers. You can find more details in <a href="https://arxiv.org/pdf/1911.08287.pdf" rel="noreferrer">this</a> paper.</li>
</ul>
<p>Finally, YOLOv4 loss can be written <a href="https://i.stack.imgur.com/Z2toj.png" rel="noreferrer">this way</a>. With the complete CIoU loss terms, it looks like <a href="https://i.stack.imgur.com/0Wf6m.png" rel="noreferrer">this</a>.</p>
What's the complete loss function used by yolov4?
<p>I am unable to find the explanation for the loss function of yolov4.</p>