File size: 1,806 Bytes
0d2cf22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f999f4e
0d2cf22
 
 
 
 
f999f4e
0d2cf22
 
 
f999f4e
0d2cf22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
62
63
64
65
66
67
68
69
70
71
72
---
library_name: lucid
license: apache-2.0
tags:
  - image-classification
  - maxvit
  - lucid
datasets:
  - imagenet-1k
pipeline_tag: image-classification
model-index:
  - name: maxvit-tiny
    results:
      - task: { type: image-classification }
        dataset: { name: ImageNet-1k, type: imagenet-1k }
        metrics:
          - { type: acc@1, value: 83.62 }
          - { type: acc@5, value: 96.49 }
---

# MaxViT-Tiny

> Tu et al., 2022 — *MaxViT: Multi-Axis Vision Transformer* (arXiv:2204.01697)

[Lucid](https://github.com/ChanLumerico/lucid) port of `timm/maxvit_tiny_tf_224.in1k`,
converted to Lucid-native safetensors.

## Available weights

| Tag | acc@1 | acc@5 | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|---|
| `IN1K` *(default)* | 83.62 | 96.49 | 30.9M | — | 118.18 MB | timm |

## Usage

```python
import lucid.models as models
from lucid.models.weights import MaxViTTinyWeights

# default tag
model = models.maxvit_tiny_cls(pretrained=True)

# explicit tag (enum or string)
model = models.maxvit_tiny_cls(weights=MaxViTTinyWeights.IN1K)
model = models.maxvit_tiny_cls(pretrained="IN1K")

# preprocessing travels with the weights
weights = MaxViTTinyWeights.IN1K
preprocess = weights.transforms()
logits = model(preprocess(image)[None]).logits
```

## Conversion

Converted from `timm/maxvit_tiny_tf_224.in1k` via
`python -m tools.convert_weights maxvit_tiny --tag IN1K`.
Key mapping + numerical parity verified against the source.

## License

`apache-2.0` — inherited from the original weights.

## Citation

```
@inproceedings{tu2022maxvit,
  title={MaxViT: Multi-Axis Vision Transformer},
  author={Tu, Zhengzhong and Talebi, Hossein and Zhang, Han and Yang, Feng and Milanfar, Peyman and Bovik, Alan and Li, Yinxiao},
  booktitle={ECCV}, year={2022}
}
```