What is total_loss,loss_cls etc
Asked Answered
A

1

8

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

Ammonic answered 30/11, 2021 at 12:15 Comment(1)
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Ptomaine
P
11

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.

  1. 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.

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

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

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

  5. loss_mask: Mask loss in the Mask head. Measures how "correct" 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.

Pear answered 2/12, 2021 at 12:49 Comment(2)
Are those metrics based on DATASETS.TRAIN or DATASETS.TEST ?Deice
The metrics are based on DATASETS.TRAIN @DeiceForta

© 2022 - 2024 — McMap. All rights reserved.