facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
29.3k stars 7.32k forks source link

add DATALOADER.REPEAT_SQRT #5245

Closed stephenyan1231 closed 3 months ago

stephenyan1231 commented 3 months ago

Summary: For sampler RepeatFactorTrainingSampler, current per-category weight is computed as 1/sqrt(frequency).

This works fine on LVIS but is not sufficient in highly imbalanced data we have for person segmentation.

Thus we add an argument DATALOADER.REPEAT_SQRT. If false, we compute per-category weight as 1/frequency.

This is change is entirely back-compatible.

Differential Revision: D55355021

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D55355021

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D55355021

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D55355021

facebook-github-bot commented 3 months ago

This pull request has been merged in facebookresearch/detectron2@afe9eb920646102f7e6bf0cd2115841cea2aca13.