Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Add a switch for POST_NMS per batch/image during training #695

Merged

Conversation

rodrigoberriel
Copy link
Contributor

This PR complements #676, adding the MODEL.RPN.FPN_POST_NMS_PER_BATCH switch:

  • True (default): the code behaves AS IS, to keep it consistent with Detectron;
  • False: POST_NMS is then applied per image, as "it should be":

# TODO resolve this difference and make it consistent. It should be per image,
# and not per batch

I was wondering if I should add a comment on the README; something like this (changes in bold):

Furthermore, we set MODEL.RPN.FPN_POST_NMS_TOP_N_TRAIN 2000 as the proposals are selected for per the batch rather than per image in the default training. The value is calculated by 1000 x images-per-gpu. Here we have 2 images per GPU, therefore we set the number as 1000 x 2 = 2000. If we have 8 images per GPU, the value should be set as 8000. Note that this does not apply if MODEL.RPN.FPN_POST_NMS_PER_BATCH is set to False during training. See #672 for more details.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 19, 2019
Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot!

I think you can now change the README to take this new behavior into account, if you could send a PR it would be great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants