All models

SegFormer_b5_decode_head

Hierarchical Transformer encoder plus an all-MLP decoder for semantic segmentation, no positional encodings.

Segmentation · 2,020 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,020 operations (5 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
84.7M
Operations
2,020
Framework
PyTorch
Recurrent
No
Published
2021
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m2769
Graph hash
5e29041e18f0435476b17be7132e6776d2c02bbdc8235a11ce845c8a50097aaa
Skeleton hash
8527fd30de301f07990f0b63f34fb0f72f89e8fa13776d3b567f28756206f4da
Architecture hash
05e6e95938e4d97a200c6de9f86298504d95d54bbf6bd1eb9e653d4f476bc451
Diagram SHA-256
0c4105cda60e42ebd881f5e62de2f4ad63aa47e27bbcc91a5b150d594c28dd18
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

SegFormer is a semantic segmentation model that combines a hierarchical Transformer encoder, the Mix Transformer or MiT, with a lightweight all-MLP decoder. It avoids positional encodings and complex decoders and achieves state-of-the-art performance on benchmarks like ADE20K and Cityscapes. This simple and lightweight design is more efficient and scalable.

SegFormer works with any input size, padding inputs to be divisible by the configured patch sizes. The captured segmentation members follow the b0 to b5 encoder sizes behind checkpoints such as nvidia/segformer-b0-finetuned-ade-512-512, but are built from configs with random weights, and one further member uses the SegformerForImageClassification head instead. A labeling quirk to know: some datasets, ADE20k among them, use index 0 for background without a background class, so the processor's do_reduce_labels option reduces all labels by 1. You can find all the original SegFormer checkpoints under the NVIDIA organization.

Key idea. A hierarchical Transformer encoder paired with an all-MLP decoder, dropping positional encodings and heavy decoders for efficient, scalable semantic segmentation.

  • SegFormer
  • Mix Transformer
  • MiT
  • MiT-b0
  • MiT-b5
  • semantic segmentation
  • ADE20K
  • Cityscapes
  • NVIDIA
  • all-MLP decoder
  • Hugging Face Transformers

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.