ViCCo-Group / thingsvision

Python package for extracting representations from state-of-the-art computer vision models
https://vicco-group.github.io/thingsvision/
MIT License
157 stars 21 forks source link

SSLExtractor #115

Closed jonasd4 closed 1 year ago

jonasd4 commented 1 year ago

Previously, the self-supervised learning models that are not included in the Vissl library were added as custom models. This leads to confusion and makes it harder for the user to discover these models. This PR renames the VisslExtractor to SSLExtractor with source ssl and depending on the model, loads it either from the Vissl library or the torch hub. This more generic source also allows easier addition of future SSL models which are not included in Vissl.

Changes:

codecov-commenter commented 1 year ago

Codecov Report

Base: 79.02% // Head: 79.26% // Increases project coverage by +0.23% :tada:

Coverage data is based on head (05810d5) compared to base (40459ca). Patch coverage: 70.37% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #115 +/- ## ========================================== + Coverage 79.02% 79.26% +0.23% ========================================== Files 25 22 -3 Lines 1111 1090 -21 Branches 160 163 +3 ========================================== - Hits 878 864 -14 + Misses 192 184 -8 - Partials 41 42 +1 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `79.26% <70.37%> (+0.23%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/115?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group) | Coverage Δ | | |---|---|---| | [thingsvision/core/extraction/helpers.py](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/115/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group#diff-dGhpbmdzdmlzaW9uL2NvcmUvZXh0cmFjdGlvbi9oZWxwZXJzLnB5) | `71.13% <50.00%> (-1.99%)` | :arrow_down: | | [thingsvision/core/extraction/extractor.py](https://codecov.io/gh/ViCCo-Group/thingsvision/pull/115/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group#diff-dGhpbmdzdmlzaW9uL2NvcmUvZXh0cmFjdGlvbi9leHRyYWN0b3IucHk=) | `78.99% <76.19%> (-0.84%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ViCCo-Group)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

andropar commented 1 year ago

Nice, looks great! Maybe we could we make it backward compatible, i.e. still allowing vissl as a source when using get_extractor but printing out a deprecation warning?

jonasd4 commented 1 year ago

@andropar Good Idea, I implemented it in the latest commit.