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

Refactor ImageClassification backbones #626

Merged
merged 40 commits into from
Jul 30, 2021
Merged

Conversation

ananyahjha93
Copy link
Contributor

@ananyahjha93 ananyahjha93 commented Jul 30, 2021

What does this PR do?

  1. Breaks the backbones.py file into parts for easier maintainability.
  2. Adds wide resnet weights from vissl.
  3. Updates resnet architecture to accommodate wide resnet weights and customizations for ssl resnet based training.
  4. In process, the PR removes the requirement of torchvision for the resnet backbones.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@pep8speaks
Copy link

pep8speaks commented Jul 30, 2021

Hello @ananyahjha93! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-07-30 16:53:58 UTC

@ananyahjha93 ananyahjha93 enabled auto-merge (squash) July 30, 2021 01:31
flash/image/backbones/__init__.py Outdated Show resolved Hide resolved
flash/image/backbones/resnet.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #626 (1bc6889) into master (22cd201) will decrease coverage by 0.08%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #626      +/-   ##
==========================================
- Coverage   89.96%   89.87%   -0.09%     
==========================================
  Files         149      155       +6     
  Lines        8458     8654     +196     
==========================================
+ Hits         7609     7778     +169     
- Misses        849      876      +27     
Flag Coverage Δ
unittests 89.87% <88.88%> (-0.09%) ⬇️

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

Impacted Files Coverage Δ
...ash/image/classification/backbones/transformers.py 60.00% <60.00%> (ø)
...lash/image/classification/backbones/torchvision.py 80.95% <80.95%> (ø)
flash/image/classification/backbones/resnet.py 90.85% <90.85%> (ø)
flash/core/utilities/url_error.py 100.00% <100.00%> (ø)
flash/image/__init__.py 100.00% <100.00%> (ø)
flash/image/backbones.py 100.00% <100.00%> (+13.72%) ⬆️
flash/image/classification/backbones/__init__.py 100.00% <100.00%> (ø)
flash/image/classification/backbones/timm.py 100.00% <100.00%> (ø)
flash/image/classification/model.py 76.92% <100.00%> (-1.93%) ⬇️
flash/image/embedding/model.py 68.42% <100.00%> (-14.04%) ⬇️
... and 8 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 22cd201...1bc6889. Read the comment docs.

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM, one small issue

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

Awesome, LGTM 😃

@ethanwharris ethanwharris disabled auto-merge July 30, 2021 18:49
@ethanwharris ethanwharris merged commit c95716b into master Jul 30, 2021
@ethanwharris ethanwharris deleted the ssl_weights/wide_resnet branch July 30, 2021 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants