# NVlabs/SegFormer

Official PyTorch implementation of SegFormer

Repository: https://github.com/NVlabs/SegFormer
Canonical: https://ross.abutalabs.com/products/segformer
Homepage: https://arxiv.org/abs/2105.15203
Language: Python
License: NOASSERTION
License Family: other
Topics: semantic-segmentation, transformer, ade20k, cityscapes
Last push: 2024-08-02T15:50:33+00:00

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

## Adoption (not part of the score)
Stars 3629, forks 455 (observed 2026-08-28T04:08:12.002305+00:00)

## What it is
Official PyTorch implementation of SegFormer, a transformer-based semantic segmentation framework with a hierarchical encoder and lightweight MLP decoder, built on MMSegmentation v0.13.0. It includes training and evaluation code plus pretrained models (B0-B5) for ADE20K and Cityscapes.

## Use cases
- segment images into semantic classes with transformers
- train a semantic segmentation model on ADE20K
- evaluate pretrained SegFormer checkpoints on Cityscapes
- run efficient real-time scene segmentation on autonomous driving imagery
- fine-tune SegFormer on a custom segmentation dataset
- compare transformer vs CNN segmentation baselines

## When to choose
- you need state-of-the-art transformer-based semantic segmentation with pretrained weights
- you want efficient segmentation models ranging from lightweight (B0) to high-accuracy (B5)
- you are already using the MMSegmentation ecosystem
- you need robustness to resolution differences between training and testing

## When to avoid
- you need a non-PyTorch framework like TensorFlow or JAX
- you want actively maintained code - the repo pins old dependencies (mmcv-full 1.2.7, timm 0.3.2) and recommends using MMSegmentation instead
- you need instance or panoptic segmentation rather than semantic segmentation
- you lack GPU resources for training or inference

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, computer-vision, image-processing
- domain: computer-vision, deep-learning, machine-learning
- platform: python
- tags: semantic-segmentation, transformer, pytorch, ade20k, cityscapes, mmsegmentation, pretrained-models, linux, gpu

## Member repositories
- NVlabs/SegFormer (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:12.002305+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-29T18:31:53.915582+00:00, confidence not recorded.
  - readme: https://github.com/NVlabs/SegFormer (fetched 2026-08-28T04:08:12.002305+00:00, sha 122164cced32)
  - homepage: https://arxiv.org/abs/2105.15203 (fetched 2026-08-29T09:26:33.520597+00:00, sha d6f9275abb12)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T09:26:33.541671+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T09:26:33.545146+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T09:26:33.547026+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T09:26:33.543511+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
