# facebookresearch/MaskFormer

Per-Pixel Classification is Not All You Need for Semantic Segmentation (NeurIPS 2021, spotlight)

Repository: https://github.com/facebookresearch/MaskFormer
Canonical: https://ross.abutalabs.com/products/maskformer
Language: Python
License: NOASSERTION
License Family: other
Archived: true
Last push: 2022-03-11T15:41:52+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1902, "days_push": 1636, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1460, forks 156 (observed 2026-08-28T04:04:47.378318+00:00)

## What it is
MaskFormer is a PyTorch/Detectron2-based implementation of the NeurIPS 2021 paper 'Per-Pixel Classification is Not All You Need for Semantic Segmentation', which reformulates semantic segmentation as mask classification. It provides trained models, training and evaluation code for major segmentation datasets like ADE20K, Cityscapes, COCO-Stuff, and Mapillary Vistas.

## Use cases
- run semantic segmentation on images with a mask classification model
- train a state-of-the-art segmentation model on ADE20K or Cityscapes
- evaluate pretrained MaskFormer checkpoints on segmentation benchmarks
- compare mask classification vs per-pixel classification segmentation approaches
- fine-tune MaskFormer on a custom segmentation dataset
- use MaskFormer as a baseline before upgrading to Mask2Former

## When to choose
- you need strong semantic segmentation results with an efficient mask-classification architecture
- you want reproducible baselines and pretrained checkpoints for ADE20K, Cityscapes, COCO-Stuff, or Mapillary Vistas
- your research builds on the MaskFormer meta-architecture and you already use Detectron2

## When to avoid
- you need a permissively licensed model for commercial products - the code is CC BY-NC 4.0 (non-commercial)
- you want the newest state-of-the-art universal segmentation - use Mask2Former instead
- you need panoptic or instance segmentation out of the box - MaskFormer focuses on semantic segmentation
- you want a maintained production library - this is research code with limited recent activity

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing, computer-vision
- domain: computer-vision, deep-learning, machine-learning, image-processing
- platform: python
- tags: semantic-segmentation, panoptic-segmentation, instance-segmentation, detectron2, transformers, research-code, neurips-2021, non-commercial-license, linux, gpu

## Member repositories
- facebookresearch/MaskFormer (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:47.378318+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:35:24.077054+00:00, confidence not recorded.
  - readme: https://github.com/facebookresearch/MaskFormer (fetched 2026-08-28T04:04:47.378318+00:00, sha 4bd7feb20e5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
