zeromodels / segformer_b4_ade_512

huggingface.co
Total runs: 50
24-hour runs: 0
7-day runs: 9
30-day runs: 7
Model's Last Updated: August 27 2026
image-segmentation

Introduction of segformer_b4_ade_512

Model Details of segformer_b4_ade_512

See our collection for all versions of SegFormer.

Run SegFormer with Keras 3: JAX, PyTorch, or TensorFlow

GitHub Docs Collection

kerasformers/segformer_b4_ade_512

Paper: SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers (arXiv:2105.15203) · HF Papers

SegFormer pairs a hierarchical transformer encoder (MiT) with a lightweight all-MLP decoder. The encoder produces features at four scales, and the decoder upsamples, concatenates, and projects them. Sequence-reduction attention and no positional encoding keep it efficient and resolution-flexible.

For more details on the model, please go to NVIDIA's original model card .

Pure- Keras 3 conversion of nvidia/segformer-b4-finetuned-ade-512-512 for kerasformers . One implementation runs unmodified on TensorFlow / Torch / JAX .

This is a semantic segmentation checkpoint ( SegFormerSemanticSegment ) for ADE20K (150 classes, MiT-B4, 512px).

✨ Quick start
import os
os.environ["KERAS_BACKEND"] = "torch"  # or "jax" / "tensorflow"

from PIL import Image
from kerasformers.models.segformer import (
    SegFormerSemanticSegment,
    SegFormerImageProcessor,
)

model = SegFormerSemanticSegment.from_weights("kerasformers/segformer_b4_ade_512")
processor = SegFormerImageProcessor.from_weights("kerasformers/segformer_b4_ade_512")

image = Image.open("your_image.jpg").convert("RGB")
output = model(processor(image)["pixel_values"], training=False)
result = processor.post_process_semantic_segmentation(
    output, target_size=(image.height, image.width)
)
print(result["unique_classes"], result["class_names"])

Load any SegFormer variant the same way with from_weights("kerasformers/<variant>") :

Variant Hub Dataset Res
segformer_b0_ade_512 kerasformers/segformer_b0_ade_512 ADE20K 512
segformer_b1_ade_512 kerasformers/segformer_b1_ade_512 ADE20K 512
segformer_b2_ade_512 kerasformers/segformer_b2_ade_512 ADE20K 512
segformer_b3_ade_512 kerasformers/segformer_b3_ade_512 ADE20K 512
segformer_b4_ade_512 kerasformers/segformer_b4_ade_512 ADE20K 512
segformer_b5_ade_640 kerasformers/segformer_b5_ade_640 ADE20K 640
segformer_b0_cityscapes_768 kerasformers/segformer_b0_cityscapes_768 Cityscapes 768
segformer_b0_cityscapes_1024 kerasformers/segformer_b0_cityscapes_1024 Cityscapes 1024
segformer_b1_cityscapes_1024 kerasformers/segformer_b1_cityscapes_1024 Cityscapes 1024
segformer_b2_cityscapes_1024 kerasformers/segformer_b2_cityscapes_1024 Cityscapes 1024
segformer_b3_cityscapes_1024 kerasformers/segformer_b3_cityscapes_1024 Cityscapes 1024
segformer_b4_cityscapes_1024 kerasformers/segformer_b4_cityscapes_1024 Cityscapes 1024
segformer_b5_cityscapes_1024 kerasformers/segformer_b5_cityscapes_1024 Cityscapes 1024
Tips
  • Set KERAS_BACKEND before importing Keras / kerasformers.
  • Prefer SegFormerImageProcessor.from_weights(...) so the resize matches the variant (ADE B5 is 640; Cityscapes is often 1024).
  • See SegFormer docs and Loading Weights .
  • Community / upstream safetensors still work via the hf: prefix, e.g. SegFormerSemanticSegment.from_weights("hf:nvidia/segformer-b4-finetuned-ade-512-512") .
Special Thanks

A huge thank you to the NVIDIA SegFormer authors for creating and releasing these models.

License: see the NVIDIA SegFormer LICENSE (Hub tag: other ).

Runs of zeromodels segformer_b4_ade_512 on huggingface.co

50
Total runs
0
24-hour runs
0
3-day runs
9
7-day runs
7
30-day runs

More Information About segformer_b4_ade_512 huggingface.co Model

More segformer_b4_ade_512 license Visit here:

https://choosealicense.com/licenses/other

segformer_b4_ade_512 huggingface.co

segformer_b4_ade_512 huggingface.co is an AI model on huggingface.co that provides segformer_b4_ade_512's model effect (), which can be used instantly with this zeromodels segformer_b4_ade_512 model. huggingface.co supports a free trial of the segformer_b4_ade_512 model, and also provides paid use of the segformer_b4_ade_512. Support call segformer_b4_ade_512 model through api, including Node.js, Python, http.

segformer_b4_ade_512 huggingface.co Url

https://huggingface.co/zeromodels/segformer_b4_ade_512

zeromodels segformer_b4_ade_512 online free

segformer_b4_ade_512 huggingface.co is an online trial and call api platform, which integrates segformer_b4_ade_512's modeling effects, including api services, and provides a free online trial of segformer_b4_ade_512, you can try segformer_b4_ade_512 online for free by clicking the link below.

zeromodels segformer_b4_ade_512 online free url in huggingface.co:

https://huggingface.co/zeromodels/segformer_b4_ade_512

segformer_b4_ade_512 install

segformer_b4_ade_512 is an open source model from GitHub that offers a free installation service, and any user can find segformer_b4_ade_512 on GitHub to install. At the same time, huggingface.co provides the effect of segformer_b4_ade_512 install, users can directly use segformer_b4_ade_512 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

segformer_b4_ade_512 install url in huggingface.co:

https://huggingface.co/zeromodels/segformer_b4_ade_512

Url of segformer_b4_ade_512

segformer_b4_ade_512 huggingface.co Url

Provider of segformer_b4_ade_512 huggingface.co

zeromodels
ORGANIZATIONS

Other API from zeromodels