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 SwinV2 in TorchVision #6242

Closed
datumbox opened this issue Jul 6, 2022 · 2 comments · Fixed by #6246
Closed

Add SwinV2 in TorchVision #6242

datumbox opened this issue Jul 6, 2022 · 2 comments · Fixed by #6246

Comments

@datumbox
Copy link
Contributor

datumbox commented Jul 6, 2022

🚀 The feature

Swin Transforms were added to TorchVision on #5491 thanks to the work of @xiaohu2015 and @jdsgomes. At that point, the official code of SwinV2 was not released so we decided to postpone its addition. Later @YosuaMichael has refactored the class to make it compatible with 3d use-cases at #6088. With the code of V2 now available, we should consider adding it to TorchVision.

Here is what needs to be done:

  • Examine if it's possible to extend the existing Swin Transformer class to support both V1 and V2 models. An example of such an extension was recently done for EfficientNets. On the other hand, if the implementations are substantially different, we can follow the approach we took for MobileNets v2 and v3 and use separate classes.
  • Provide an implementation that uses TorchVision building blocks and idioms. See New Model Architectures - Implementation and Documentation Details #5319 for pointers.
  • Provide proof in form of pre-trained weights for the smallest variant that reproduces the accuracy of the paper.

Motivation, pitch

We should keep TorchVision fresh by offering the latest influential architectures to support the work of ML researchers and practitioners.

Alternatives

No response

Additional context

No response

cc @datumbox

@datumbox
Copy link
Contributor Author

datumbox commented Jul 8, 2022

@ain-soph thanks for the PR! Please comment on this ticket to be able to assign it to you. Github won't let me do it. :(

@ain-soph
Copy link
Contributor

ain-soph commented Jul 8, 2022

Sure!

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

Successfully merging a pull request may close this issue.

2 participants