mask2former_swin_large(pretrained: bool | str = False, weights: Mask2FormerSwinLargeWeights | None = None, overrides: object = {})Mask2Former with Swin-Large backbone (Cheng et al., CVPR 2022).
Builds a Mask2FormerForSemanticSegmentation with the largest
Swin backbone (embed_dim = 192, depths = (2, 2, 18, 2),
num_heads = (6, 12, 24, 48)). Reaches ADE20K validation mIoU of
56.1% — the headline result of the paper.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag; a tag string → that specific checkpoint.Explicit weights enum member. Takes precedence over
pretrained.**overridesobject= {}Keyword overrides forwarded into
Mask2FormerConfig.Returns
Mask2FormerForSemanticSegmentationSegmentation model with the Mask2Former-Swin-L configuration applied
(or with overrides merged on top of it).
Examples
>>> import lucid
>>> from lucid.models.vision.mask2former import mask2former_swin_large
>>> model = mask2former_swin_large()
>>> x = lucid.randn(1, 3, 384, 384)
>>> out = model(x)
>>> out.logits.shape[1]
150