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 more Swin backbones for RetinaNet and VFNet #1042

Merged
merged 34 commits into from
Jan 31, 2022

Conversation

dnth
Copy link
Contributor

@dnth dnth commented Jan 24, 2022

This PR:

  1. Adds Swin-S and Swin-B backbone to RetinaNet models.
  2. Adds Swin-T, Swin-S and Swin-B backbones to VFNet.

@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #1042 (767f0b2) into master (bfbed41) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1042      +/-   ##
==========================================
- Coverage   85.96%   85.95%   -0.02%     
==========================================
  Files         272      281       +9     
  Lines        5794     5922     +128     
==========================================
+ Hits         4981     5090     +109     
- Misses        813      832      +19     
Flag Coverage Δ
unittests 85.95% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
icevision/models/mmdet/download_configs.py 80.95% <100.00%> (ø)
...mdet/models/retinanet/backbones/backbone_config.py 100.00% <100.00%> (ø)
...els/mmdet/models/retinanet/backbones/resnet_fpn.py 100.00% <100.00%> (ø)
...on/models/mmdet/models/retinanet/backbones/swin.py 100.00% <100.00%> (ø)
...on/models/mmdet/models/vfnet/backbones/__init__.py 100.00% <100.00%> (ø)
...ls/mmdet/models/vfnet/backbones/backbone_config.py 100.00% <100.00%> (ø)
.../models/mmdet/models/vfnet/backbones/resnet_fpn.py 100.00% <100.00%> (ø)
...vision/models/mmdet/models/vfnet/backbones/swin.py 100.00% <100.00%> (ø)
icevision/models/mmdet/common/utils.py 81.81% <0.00%> (-5.69%) ⬇️
icevision/models/mmdet/utils.py 57.81% <0.00%> (-3.86%) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfbed41...767f0b2. Read the comment docs.

"https://raw.githubusercontent.com/dnth/mmdetection_configs/custom-configs/configs/swin/retinanet_swin-t-p4-w7_fpn_1x_coco.py",
"https://raw.githubusercontent.com/dnth/mmdetection_configs/custom-configs/configs/swin/retinanet_swin-s-p4-w7_fpn_1x_coco.py",
"https://raw.githubusercontent.com/dnth/mmdetection_configs/custom-configs/configs/swin/retinanet_swin-b-p4-w7_fpn_1x_coco.py",
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can add your new config files in the airctic/mmdetection_configs

    "https://raw.githubusercontent.com/dnth/mmdetection_configs/custom-configs/configs/swin/retinanet_swin-t-p4-w7_fpn_1x_coco.py",
    "https://raw.githubusercontent.com/dnth/mmdetection_configs/custom-configs/configs/swin/retinanet_swin-s-p4-w7_fpn_1x_coco.py",
    "https://raw.githubusercontent.com/dnth/mmdetection_configs/custom-configs/configs/swin/retinanet_swin-b-p4-w7_fpn_1x_coco.py"

We have to find a way to make sure those files don't get lost when we upgrade to a new mmdet version (e.g. mmdet 2.21.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored this after a video conference with Farid. Custom config files are added into the mmdetection_configs in a separate folder.

airctic/mmdetection_configs#4

@dnth dnth requested a review from ai-fast-track January 27, 2022 14:24
@ai-fast-track
Copy link
Collaborator

@dnth Do you have a notebook where you tested either RetinaNet or VFNet with Swin?

What are the COCO metric for 20 iterations? (it must be low because of the un-trainede Neck)

@dnth
Copy link
Contributor Author

dnth commented Jan 29, 2022

Here are the COCO metrics on my machine for RetinaNet

Retina-Swin-T
retina-swin-t

Retina-Swin-S
retina-swin-s

Retina-Swin-B
retina-swin-b

@dnth
Copy link
Contributor Author

dnth commented Jan 29, 2022

Here are the COCO metrics on my machine for VFNet

VFNet-Swin-T
vfnet-swin-t

VFNet-Swin-S
vfnet-swin-s

VFNet-Swin-B
vfnet-swin-b

@dnth
Copy link
Contributor Author

dnth commented Jan 29, 2022

@dnth
Copy link
Contributor Author

dnth commented Jan 29, 2022

During my test, I find that for VFNet model to run, we have to keep the mmdet==2.17.0. The latest mmdet==2.20.0 has this issue.

@ai-fast-track
Copy link
Collaborator

Thanks a lot @dnth!

We should continue using mmdet==2.17.0 until we solve the issue wit mmdet==2.20.0

🔥 VFNet rocks! 66% with Un-trained Neck is mind blowing! I just confirm my preference towards that model!

I think the PR is ready to get merged🚀

@ai-fast-track ai-fast-track merged commit 411101d into airctic:master Jan 31, 2022
@dnth dnth deleted the retina-swin branch April 5, 2022 05:37
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.

2 participants