ILSVRC/imagenet-1k
Viewer • Updated • 1.43M • 76.4k • 819
Liu et al., 2021 — Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (arXiv:2103.14030)
Lucid port of torchvision/Swin_S_Weights.IMAGENET1K_V1,
converted to Lucid-native safetensors.
| Tag | acc@1 | acc@5 | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|---|
IMAGENET1K_V1 (default) |
83.196 | 96.36 | 49.6M | 8.741 | 189.26 MB | torchvision |
import lucid.models as models
from lucid.models.weights import SwinSmallWeights
# default tag
model = models.swin_small_cls(pretrained=True)
# explicit tag (enum or string)
model = models.swin_small_cls(weights=SwinSmallWeights.IMAGENET1K_V1)
model = models.swin_small_cls(pretrained="IMAGENET1K_V1")
# preprocessing travels with the weights
weights = SwinSmallWeights.IMAGENET1K_V1
preprocess = weights.transforms()
logits = model(preprocess(image)[None]).logits
Converted from torchvision/Swin_S_Weights.IMAGENET1K_V1 via
python -m tools.convert_weights swin_small --tag IMAGENET1K_V1.
Key mapping + numerical parity verified against the source.
mit — inherited from the original weights.
@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={ICCV}, year={2021}
}