SegFormer is NVIDIA’s official PyTorch implementation of the SegFormer semantic segmentation model, a simple and efficient transformer-based architecture that became a standard baseline in computer vision. SegFormer pairs a hierarchical transformer encoder — which produces multi-scale features without positional encodings — with a lightweight all-MLP decoder, achieving strong accuracy on benchmarks such as ADE20K and Cityscapes with far fewer parameters than earlier designs. The repository has around 3,700 stars on GitHub.
The repo provides the model code, training and evaluation scripts, and pretrained checkpoints for the SegFormer family (B0 through B5), built on the MMSegmentation ecosystem. The encoder, called Mix Transformer (MiT), outputs features at several resolutions like a CNN backbone, while the decoder fuses them using only MLP layers, keeping the design clean and fast. SegFormer is robust to the resolution differences between training and testing that trip up fixed positional-encoding transformers, which makes it practical for real segmentation pipelines. Configuration files for ADE20K, Cityscapes and other datasets are included so results from the paper can be reproduced directly.
SegFormer is free and open source for research use from NVIDIA’s NVlabs GitHub organisation. The only cost is the GPU compute for training and inference.
Computer-vision researchers and engineers who need a proven semantic segmentation model for tasks such as scene understanding, autonomous driving perception or medical imaging, and anyone benchmarking modern segmentation architectures.