Views
No views yet
Cheng et al., 2021 — Per-Pixel Classification is Not All You Need for Semantic Segmentation (arXiv:2107.06278)
facebook/maskformer-resnet101-ade,
converted to Lucid-native safetensors.| Tag | mIoU | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|
ADE20K (default) | 45.5 | 60.3M | — | 230.55 MB |
1import lucid.models as models
2from lucid.models.weights import MaskFormerResNet101Weights
3
4# default tag
5model = models.maskformer_resnet101(pretrained=True)
6
7# explicit tag (enum or string)
8model = models.maskformer_resnet101(weights=MaskFormerResNet101Weights.ADE20K)
9model = models.maskformer_resnet101(pretrained="ADE20K")
10
11# preprocessing travels with the weights
12weights = MaskFormerResNet101Weights.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/maskformer-resnet101-ade via
python -m tools.convert_weights maskformer_resnet101 --tag ADE20K.
Key mapping + numerical parity verified against the source.other — inherited from the original weights.@inproceedings{cheng2021maskformer,
title={Per-Pixel Classification is Not All You Need for Semantic Segmentation},
author={Cheng, Bowen and Schwing, Alexander G. and Kirillov, Alexander},
booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
year={2021}
}