question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Swin-Transformer to keras.applications

See original GitHub issue

If you open a GitHub issue, here is our policy:

It must be a bug, a feature request, or a significant problem with the documentation (for small docs fixes please send a PR instead). The form below must be filled out.

Here’s why we have that policy:.

Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.

System information.

TensorFlow version (you are using): 2.6 Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.

Describe the feature clearly here. Be sure to convey here why the requested feature is needed. Any brief description of the use-case would help.

Paper: Swin Transformer: Hierarchical Vision Transformer using Shifted Windows Original Code: https://github.com/microsoft/Swin-Transformer?utm_source=catalyzex.com

It’s a variant of the transformer model and achieves state-of-the-art performance or comparable performance with the best CNN-based models. It also contains enough citations (~250 at this moment) for addition to the package.

On ImageNet-1K and 22K, below is the comparable results with EfficientNet (CNN) models.

- Img Size Top 1K acc - Img Size Top 1K acc Top 22K acc
E3 300 81.6 EfficientNetV2-S - 83.9 84.9
E5 456 83.6 EfficientNetV2-M - 85.1 86.2
E7 600 84.3 EfficientNetV2-L - 85.7 86.8
- - - EfficientNetV2-XL - - 87.3
Swin-T 224 81.3 Swin-B 224 - 85.2
Swin-S 224 83.0 Swin-B 384 - 86.4
Swin-B 224 83.5 Swin-L 384 - 87.3
Swin-B 384 84.5 - - - -

Will this change the current api? How? Yes. It will change as follows

tensorflow.keras.applications.SwinT
tensorflow.keras.applications.SwinS
tensorflow.keras.applications.SwinB
tensorflow.keras.applications.SwinL

Who will benefit from this feature? Keras users.

Contributing

  • Do you want to contribute a PR? (yes/no): yes.
  • If yes, please read this page for instructions
  • Briefly describe your candidate solution(if contributing):

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
bhackcommented, Oct 13, 2022
1reaction
qlzh727commented, Apr 5, 2022

Sorry for the late reply. We probably have to host this in the keras/application for now. Eventually we will move this to keras-cv, but we are not ready yet. Feel free to send PR if you have any.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image classification with Swin Transformers - Keras
Swin Transformer is a hierarchical Transformer whose representations are computed with shifted windows. The shifted window scheme brings greater ...
Read more >
rishigami/Swin-Transformer-TF: Tensorflow implementation of ...
Tensorflow implementation of Swin Transformer model. ... Lambda(lambda data: tf.keras.applications.imagenet_utils.preprocess_input(tf.cast(data, tf.float32) ...
Read more >
Swin Transformers in TensorFlow - Show and Tell
It uses a variant of multi-head attention with a linear complexity w.r.t the input image size ... Add Swin-Transformer to keras.applications.
Read more >
Swin Transformer V2 - Hugging Face
This paper aims to explore large-scale models in computer vision. We tackle three major issues in training and application of large vision models,...
Read more >
TF.Keras: Hybrid EfficientNet Swin Transformer TPU - Kaggle
So, this notebook uses the trained embeddings of the swin-transformer and uses for next stage training with CatBoost model followed by inference.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found