File size: 1,926 Bytes
d321bda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
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}}
}
```