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
Add LiteRT converted swin_small_patch4_window7_224
Browse files- README.md +60 -0
- model.tflite +3 -0
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: litert
|
| 3 |
+
base_model: timm/swin_small_patch4_window7_224.ms_in22k_ft_in1k
|
| 4 |
+
tags:
|
| 5 |
+
- vision
|
| 6 |
+
- image-classification
|
| 7 |
+
datasets:
|
| 8 |
+
- imagenet-1k
|
| 9 |
+
---
|
| 10 |
+
# swin_small_patch4_window7_224
|
| 11 |
+
|
| 12 |
+
Converted TIMM image classification model for LiteRT.
|
| 13 |
+
|
| 14 |
+
- Source architecture: `swin_small_patch4_window7_224`
|
| 15 |
+
- Source checkpoint: `timm/swin_small_patch4_window7_224.ms_in22k_ft_in1k`
|
| 16 |
+
- File: `model.tflite`
|
| 17 |
+
- Input: `float32` tensor in NCHW layout, shape `[1, 3, 224, 224]`
|
| 18 |
+
- Output: ImageNet-1K logits, shape `[1, 1000]`
|
| 19 |
+
|
| 20 |
+
## Runtime Status
|
| 21 |
+
|
| 22 |
+
- CPU smoke test: passed with LiteRT `CompiledModel`.
|
| 23 |
+
- 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.
|
| 24 |
+
|
| 25 |
+
## Model Details
|
| 26 |
+
|
| 27 |
+
- **Model Type:** Image classification / feature backbone
|
| 28 |
+
- **Model Stats:**
|
| 29 |
+
- Params (M): 49.6
|
| 30 |
+
- GMACs: 8.8
|
| 31 |
+
- Activations (M): 27.5
|
| 32 |
+
- Image size: 224 x 224
|
| 33 |
+
- **Papers:**
|
| 34 |
+
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows: https://arxiv.org/abs/2103.14030
|
| 35 |
+
- **Original:** https://github.com/microsoft/Swin-Transformer
|
| 36 |
+
- **Dataset:** ImageNet-1k
|
| 37 |
+
- **Pretrain Dataset:** ImageNet-22k
|
| 38 |
+
|
| 39 |
+
## Citation
|
| 40 |
+
|
| 41 |
+
```bibtex
|
| 42 |
+
@inproceedings{liu2021Swin,
|
| 43 |
+
title={Swin Transformer: Hierarchical Vision Transformer using Shifted Windows},
|
| 44 |
+
author={Liu, Ze and Lin, Yutong and Cao, Yue and Hu, Han and Wei, Yixuan and Zhang, Zheng and Lin, Stephen and Guo, Baining},
|
| 45 |
+
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
|
| 46 |
+
year={2021}
|
| 47 |
+
}
|
| 48 |
+
```
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{rw2019timm,
|
| 51 |
+
author = {Ross Wightman},
|
| 52 |
+
title = {PyTorch Image Models},
|
| 53 |
+
year = {2019},
|
| 54 |
+
publisher = {GitHub},
|
| 55 |
+
journal = {GitHub repository},
|
| 56 |
+
doi = {10.5281/zenodo.4414861},
|
| 57 |
+
howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
|
| 58 |
+
}
|
| 59 |
+
```
|
| 60 |
+
|
model.tflite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d17ce2a11ceb2610a3966ca2de940e3090f8f373625a1a8c7837ef26e1240d5
|
| 3 |
+
size 202264672
|