Views
No views yet
Cheng et al., 2022 — Masked-attention Mask Transformer for Universal Image Segmentation (arXiv:2112.01527)
facebook/mask2former-swin-base-ade-semantic,
converted to Lucid-native safetensors.| Tag | mIoU | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|
ADE20K (default) | 53.9 | 106.9M | — | 407.98 MB |
1import lucid.models as models
2from lucid.models.weights import Mask2FormerSwinBaseWeights
3
4# default tag
5model = models.mask2former_swin_base(pretrained=True)
6
7# explicit tag (enum or string)
8model = models.mask2former_swin_base(weights=Mask2FormerSwinBaseWeights.ADE20K)
9model = models.mask2former_swin_base(pretrained="ADE20K")
10
11# preprocessing travels with the weights
12weights = Mask2FormerSwinBaseWeights.ADE20K
13preprocess = weights.transforms()
14out = model(preprocess(image)[None])
15# SemanticSegmentationOutput: per-pixel class logits (B, C, H, W)
16seg = out.logits.argmax(axis=1) # (B, H, W) class indicesfacebook/mask2former-swin-base-ade-semantic via
python -m tools.convert_weights mask2former_swin_base --tag ADE20K.
Key mapping + numerical parity verified against the source.other — inherited from the original weights.@inproceedings{cheng2022mask2former,
title={Masked-attention Mask Transformer for Universal Image Segmentation},
author={Cheng, Bowen and Misra, Ishan and Schwing, Alexander G. and Kirillov, Alexander and Girdhar, Rohit},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2022}
}