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

Multi-scale testing #804

Merged
merged 3 commits into from
May 24, 2019
Merged

Multi-scale testing #804

merged 3 commits into from
May 24, 2019

Conversation

fallingdust
Copy link
Contributor

@fallingdust fallingdust commented May 21, 2019

Implemented bbox augmentations(h-flip, multi-scale, multi-scale h-flip) in test time, just like Detectron.

There's a little hack in the data loading process, if you have better solution, please tell me.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

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

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@zimenglan-sysu-512
Copy link
Contributor

zimenglan-sysu-512 commented May 21, 2019

hi @fallingdust
can u give some results of augmentations (flip, scales, flip+scales)?

@fallingdust
Copy link
Contributor Author

hi @zimenglan-sysu-512 ,
I evaluated on coco_2014_minival with pretrained model downloaded from https://download.pytorch.org/models/maskrcnn/e2e_faster_rcnn_R_101_FPN_1x.pth, here is the bbox mAP:

Settings mAP
w/o BBOX_AUG 39.1
w/ H_FLIP: True 39.7
w/ SCALES: (400, 600, 1000, 1200) MAX_SIZE: 2000 40.8
w/ H_FLIP: True SCALES: (400, 600, 1000, 1200) MAX_SIZE: 2000 SCALE_H_FLIP: True 41.1

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.

This looks very reasonable to me.

One drawback is that I think it will be very slow, as it will compute a lot of mask predictions, which will be filtered afterwards. But as a first implementation this is great!

One thing I'd do differently is that I would not use a global config in the code, but let's not be blocked by changing this.

Thanks a lot!

import torch
import torchvision.transforms as TT

from maskrcnn_benchmark.config import cfg
Copy link
Contributor

Choose a reason for hiding this comment

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

using the config globally in the library is something I've tried to avoid, but let's merge this as is and maybe modify this later on

@fmassa fmassa merged commit 7a9b185 into facebookresearch:master May 24, 2019
@shikunyu8
Copy link

Since you disabled the bbox filtering after box head, you will have 1000 boxes fed into the mask head. How could you fit 1000 masks into GPU memory?

@shikunyu8
Copy link

I guess you test on faster rcnn, but the config file is mask rcnn.

@youngwanLEE
Copy link

@fallingdust @shikunyu8 @fmassa
This TTA is only for box detection? Is it available for mask rcnn?

@shikunyu8
Copy link

Hi, @youngwanLEE
Yes. It's not available for mask rcnn.

Lyears pushed a commit to Lyears/maskrcnn-benchmark that referenced this pull request Jun 28, 2020
* Implement multi-scale testing(bbox aug) like Detectron.

* Add comment.

* Fix missing cfg after merge.
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.

6 participants