What is total_loss,loss_cls etc
I want to train a custom dataset on using faster_rcnn or mask_rcnn with the Pytorch and Detectron2 .Everything works well but I wanted to know I want to know what are the results I have.
[11/29 20:16:31 d2.utils.events]:  eta: 0:24:04  iter: 19  total_loss: 9.6  loss_cls: 1.5  loss_box_reg: 0.001034  loss_mask: 0.6936  loss_rpn_cls: 6.773  loss_rpn_loc: 0.5983  time: 1.4664  data_time: 0.0702  lr: 4.9953e-06  max_mem: 2447M

I have this as result and I want to know what all of this means

Those are metrics printed out at every iteration of the training loop. The most important ones are the loss values, but below are basic descriptions of them all (eta and iter are self-explanatory I think).
total_loss: This is a weighted sum of the following individual losses calculated during the iteration. By default, the weights are all one.

loss_cls: Classification loss in the ROI head. Measures the loss for box classification, i.e., how good the model is at labelling a predicted box with the correct class.

loss_box_reg: Localisation loss in the ROI head. Measures the loss for box localisation (predicted location vs true location).

loss_rpn_cls: Classification loss in the Region Proposal Network. Measures the &quot;objectness&quot; loss, i.e., how good the RPN is at labelling the anchor boxes as foreground or background.

loss_rpn_loc: Localisation loss in the Region Proposal Network. Measures the loss for localisation of the predicted regions in the RPN.

loss_mask: Mask loss in the Mask head. Measures how &quot;correct&quot; the predicted binary masks are.
For more details on the losses (1) and (2), take a look at the Fast R-CNN paper and the code.
For more details on the losses (3) and (4), take a look at the Faster R-CNN paper and the code.
For more details on the loss (5), take a look at the Mask R-CNN paper and the code.


time: Time taken by the iteration.
data_time: Time taken by the dataloader in that iteration.
lr: The learning rate in that iteration.
max_mem: Maximum GPU memory occupied by tensors in bytes.
