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 timm backbones to mmdet models #848

Open
wants to merge 100 commits into
base: master
Choose a base branch
from

Conversation

ai-fast-track
Copy link
Collaborator

@ai-fast-track ai-fast-track commented May 18, 2021

I added mmdet + timm support. The API is very similar to the existing one. I separate the namespaces in order to be able to navigate through the different backbones families and have the autocompletion kicking in.

Both mobilenet and resne(s)t backbones plugged to a retinanet model are provided as an example showing how a user could add support for a specific backbone/model combination. Given we have over 250 timm backbones and over 50 mmet models, it isn’t realistic to imagine a support for all backbone/model combinations. In both the documentation and the notebook, we show all the different ways to plug a Timm backbone to an MMDetection model.

closes #847

@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #848 (579c3fe) into master (944b47c) will decrease coverage by 0.55%.
The diff coverage is 80.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #848      +/-   ##
==========================================
- Coverage   87.62%   87.06%   -0.56%     
==========================================
  Files         232      248      +16     
  Lines        4994     5367     +373     
==========================================
+ Hits         4376     4673     +297     
- Misses        618      694      +76     
Flag Coverage Δ
unittests 87.06% <80.61%> (-0.56%) ⬇️

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

Impacted Files Coverage Δ
...det/models/retinanet/backbones/mmdet/resnet_fpn.py 100.00% <ø> (ø)
...mdet/models/retinanet/retinanet_no_backbone_fpn.py 0.00% <0.00%> (ø)
icevision/models/mmdet/backbones/timm/resnest.py 41.81% <41.81%> (ø)
...vision/models/mmdet/backbones/timm/efficientnet.py 76.25% <76.25%> (ø)
icevision/models/mmdet/utils.py 70.70% <80.00%> (+4.04%) ⬆️
icevision/models/mmdet/backbones/timm/mobilenet.py 87.50% <87.50%> (ø)
icevision/models/mmdet/backbones/timm/resnet.py 92.72% <92.72%> (ø)
icevision/models/mmdet/__init__.py 100.00% <100.00%> (ø)
icevision/models/mmdet/backbones/timm/__init__.py 100.00% <100.00%> (ø)
icevision/models/mmdet/backbones/timm/common.py 100.00% <100.00%> (ø)
... and 28 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 944b47c...579c3fe. Read the comment docs.

Copy link
Collaborator

@lgvaz lgvaz left a comment

Choose a reason for hiding this comment

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

Seems good on a high level, just a couple of things to address before we merge:

  • Carefully handle timm imports, right now doing from icevision.all import * will try to import timm no matter if it's installed or not
  • remove commented out code
  • rename backbone names that start with ice

icevision/backbones/timm/mobilenet.py Outdated Show resolved Hide resolved
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

Add timm backbones to mmdet models
2 participants