Instructions to use litert-community/swin_small_patch4_window7_224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/swin_small_patch4_window7_224 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
| library_name: litert | |
| base_model: timm/swin_small_patch4_window7_224.ms_in22k_ft_in1k | |
| tags: | |
| - vision | |
| - image-classification | |
| datasets: | |
| - imagenet-1k | |
| # swin_small_patch4_window7_224 | |
| Converted TIMM image classification model for LiteRT. | |
| - Source architecture: `swin_small_patch4_window7_224` | |
| - Source checkpoint: `timm/swin_small_patch4_window7_224.ms_in22k_ft_in1k` | |
| - File: `model.tflite` | |
| - Input: `float32` tensor in NCHW layout, shape `[1, 3, 224, 224]` | |
| - Output: ImageNet-1K logits, shape `[1, 1000]` | |
| ## Runtime Status | |
| - CPU smoke test: passed with LiteRT `CompiledModel`. | |
| - GPU delegation: currently blocked for this model by rank-5 tensor patterns in the GPU backend, mostly `RESHAPE`, `TRANSPOSE`, and related window/attention operations. The model is published as CPU-ready while GPU support is being improved. | |
| ## Model Details | |
| - **Model Type:** Image classification / feature backbone | |
| - **Model Stats:** | |
| - Params (M): 49.6 | |
| - GMACs: 8.8 | |
| - Activations (M): 27.5 | |
| - Image size: 224 x 224 | |
| - **Papers:** | |
| - Swin Transformer: Hierarchical Vision Transformer using Shifted Windows: https://arxiv.org/abs/2103.14030 | |
| - **Original:** https://github.com/microsoft/Swin-Transformer | |
| - **Dataset:** ImageNet-1k | |
| - **Pretrain Dataset:** ImageNet-22k | |
| ## Citation | |
| ```bibtex | |
| @inproceedings{liu2021Swin, | |
| title={Swin Transformer: Hierarchical Vision Transformer using Shifted Windows}, | |
| author={Liu, Ze and Lin, Yutong and Cao, Yue and Hu, Han and Wei, Yixuan and Zhang, Zheng and Lin, Stephen and Guo, Baining}, | |
| booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)}, | |
| year={2021} | |
| } | |
| ``` | |
| ```bibtex | |
| @misc{rw2019timm, | |
| author = {Ross Wightman}, | |
| title = {PyTorch Image Models}, | |
| year = {2019}, | |
| publisher = {GitHub}, | |
| journal = {GitHub repository}, | |
| doi = {10.5281/zenodo.4414861}, | |
| howpublished = {\url{https://github.com/huggingface/pytorch-image-models}} | |
| } | |
| ``` | |