Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tta to HTC and Cascade RCNN #1251

Merged
merged 8 commits into from
Sep 14, 2019
Merged

Add tta to HTC and Cascade RCNN #1251

merged 8 commits into from
Sep 14, 2019

Conversation

d0ng1ee
Copy link
Contributor

@d0ng1ee d0ng1ee commented Aug 25, 2019

Add tta to HTC and Cascade RCNN

write with the similar tta scheme of fasterrcnn in this repo

Here are the experiment results

Cascade Mask R-CNN

Backbone Test method Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-FPN Orign repo 1x 5.3 0.683 7.4 41.2 35.7 model
R-50-FPN TTA(hflip) 41.9 36.2
R-50-FPN TTA(hflip+2scale) 42.7 36.8

Hybrid Task Cascade (HTC)

Backbone Test method Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-FPN Orign repo 1x 7.4 0.936 4.1 42.1 37.3 model
R-50-FPN TTA(hflip) 43.0 37.8
R-50-FPN TTA(hflip+2scale) 43.6 38.4

experiment with the config file:

img_scale=[(1333, 800),(1600,960)],
flip=True,

@hellock
Copy link
Member

hellock commented Aug 25, 2019

Nice work! Could you fix the linting errors?

@d0ng1ee
Copy link
Contributor Author

d0ng1ee commented Aug 25, 2019

Nice work! Could you fix the linting errors?

I will try it. This is the first time I've contributed code to the open source community, and I've ignored the importance of the code format.

@hellock hellock requested a review from yhcao6 August 25, 2019 15:39
@clw5180
Copy link

clw5180 commented Sep 5, 2019

Nice work! Could you fix the linting errors?

I will try it. This is the first time I've contributed code to the open source community, and I've ignored the importance of the code format.

Add tta to HTC and Cascade RCNN

write with the similar tta scheme of fasterrcnn in this repo

Here are the experiment results

Cascade Mask R-CNN

Backbone Test method Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-FPN Orign repo 1x 5.3 0.683 7.4 41.2 35.7 model
R-50-FPN TTA(hflip) 41.9 36.2
R-50-FPN TTA(hflip+2scale) 42.7 36.8

Hybrid Task Cascade (HTC)

Backbone Test method Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-FPN Orign repo 1x 7.4 0.936 4.1 42.1 37.3 model
R-50-FPN TTA(hflip) 43.0 37.8
R-50-FPN TTA(hflip+2scale) 43.6 38.4

experiment with the config file:

img_scale=[(1333, 800),(1600,960)],
flip=True,

Have you tried multi-scale training and how much mAP improvement you get ? Thanks! @donglee-afar

@d0ng1ee
Copy link
Contributor Author

d0ng1ee commented Sep 5, 2019

Nice work! Could you fix the linting errors?

I will try it. This is the first time I've contributed code to the open source community, and I've ignored the importance of the code format.

Add tta to HTC and Cascade RCNN

write with the similar tta scheme of fasterrcnn in this repo

Here are the experiment results

Cascade Mask R-CNN

Backbone Test method Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-FPN Orign repo 1x 5.3 0.683 7.4 41.2 35.7 model
R-50-FPN TTA(hflip) 41.9 36.2
R-50-FPN TTA(hflip+2scale) 42.7 36.8

Hybrid Task Cascade (HTC)

Backbone Test method Lr schd Mem (GB) Train time (s/iter) Inf time (fps) box AP mask AP Download
R-50-FPN Orign repo 1x 7.4 0.936 4.1 42.1 37.3 model
R-50-FPN TTA(hflip) 43.0 37.8
R-50-FPN TTA(hflip+2scale) 43.6 38.4
experiment with the config file:

img_scale=[(1333, 800),(1600,960)],
flip=True,

Have you tried multi-scale training and how much mAP improvement you get ? Thanks! @donglee-afar

I haven't try it on coco dataset, but in my experience on Kaggle and some other competition dataset, it usually can boost about 0.5~1.5% mAP

@mosheliv
Copy link

mosheliv commented Sep 6, 2019

This looks promising... Will this work on retinanet? Is it only active as is in the "test" mode or also used with the API for single images?

@clw5180
Copy link

clw5180 commented Sep 6, 2019

I haven't try it on coco dataset, but in my experience on Kaggle and some other competition dataset, it usually can boost about 0.5~1.5% mAP

Thanks a lot, I tried the multi-scale training but I find the mAP get worse. So do you think multi-scale training is necessary when I already use FPN ? @donglee-afar 另外能否留个企鹅啥的

@d0ng1ee
Copy link
Contributor Author

d0ng1ee commented Sep 6, 2019

qq:1955662900

scale_factor, flip)
mask_rois = bbox2roi([_bboxes])
mask_roi_extractor = self.mask_roi_extractor[-1]
mask_feats = mask_roi_extractor(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for your work. This two statements seems redundant.

mask_rois = bbox2roi([_bboxes])
mask_feats = self.mask_roi_extractor[-1](
x[:len(self.mask_roi_extractor[-1].featmap_strides)],
mask_rois)
Copy link
Collaborator

Choose a reason for hiding this comment

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

mask_feats seems redundant.

Copy link
Contributor Author

@d0ng1ee d0ng1ee Sep 11, 2019

Choose a reason for hiding this comment

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

You are right, mask_feats does not need to be calculated here in cascadercnn because there is no semantic_feat to be add.
I have delete it and test it again, results is the same as what i posted before.

@hellock hellock merged commit 69e93f6 into open-mmlab:master Sep 14, 2019
JegernOUTT pushed a commit to JegernOUTT/mmdetection that referenced this pull request Nov 23, 2019
* add tta to HTC and Caccade RCNN

* format file with yapf

* fix import error with isort

* Update htc.py

* Update cascade_rcnn.py

* fix bug

* delete some redundant codes
FANGAreNotGnu pushed a commit to FANGAreNotGnu/mmdetection that referenced this pull request Oct 23, 2023
* Vision: Error if invalid kwargs specified

* Fixed vision unit tests

* Fixed vision docs

* Fix vision HPO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants