Maskrcnn-benchmark: Why adding ground truth bbbox during training?

Created on 14 Mar 2019  ยท  4Comments  ยท  Source: facebookresearch/maskrcnn-benchmark

โ“ Questions and Help

Could anyone illustrate what is the intuition of add the ground truth bbox during training?

append ground-truth bboxes to proposals

    if self.training and targets is not None:
        boxlists = self.add_gt_proposals(boxlists, targets)

Thanks a lot!

question

Most helpful comment

I believe it is a hack to provide data to roi_heads classification task during training. These ground-truth bboxes are not taken into account in the rpn loss, as you can see here, buy they are taken into account in the roi_heads loss, as you can see here.

Once they are fed into the roi_heads loss evaluator, they will only generator meaningful information to the classification loss, since its bounding boxes must match perfectly to the targets, no regression loss is generated, then no gradients either.

Thus, this feeds your roi_heads with some useful information to train even in the early stages of the training process.

I'm not sure though this is the only reason.

All 4 comments

I believe it is a hack to provide data to roi_heads classification task during training. These ground-truth bboxes are not taken into account in the rpn loss, as you can see here, buy they are taken into account in the roi_heads loss, as you can see here.

Once they are fed into the roi_heads loss evaluator, they will only generator meaningful information to the classification loss, since its bounding boxes must match perfectly to the targets, no regression loss is generated, then no gradients either.

Thus, this feeds your roi_heads with some useful information to train even in the early stages of the training process.

I'm not sure though this is the only reason.

Thanks a lot, that explanation makes sense to me!

This definitely can make the model converge faster. Otherwise, the training of roi_heads would wait until RPN converge first. Besides, it can also make sure the input to the roi_heads is not empty. If the input is empty, it will cause some problems now and hard to solve it now.

I'm closing this issue, please let me know if you have any further question.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaaier picture kaaier  ยท  3Comments

adityaarun1 picture adityaarun1  ยท  3Comments

Idolized22 picture Idolized22  ยท  3Comments

hadim picture hadim  ยท  4Comments

zimenglan-sysu-512 picture zimenglan-sysu-512  ยท  3Comments