SAVRN
Search Contact SAVRN

Open-weight model · Image segmentation

beit-large-finetuned-ade-640-640

by Microsoft microsoft/beit-large-finetuned-ade-640-640

BEiT model pre-trained in a self-supervised fashion on ImageNet-21k (14 million images, 21,841 classes) at resolution 224x224, and fine-tuned on ADE20k (an important benchmark for semantic segmentation of images) at resolution 640x640.

Parameters503M
Context
Weights4.5 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads32.4k

Runs On

What it takes to serve beit-large-finetuned-ade-640-640 (503M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 1.0 GB 1.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.5 GB 0.6 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.3 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Microsoft, published under apache-2.0, revision a38fe98baf3d.

BEiT model pre-trained in a self-supervised fashion on ImageNet-21k (14 million images, 21,841 classes) at resolution 224x224, and fine-tuned on ADE20k (an important benchmark for semantic segmentation of images) at resolution 640x640. It was introduced in the paper BEIT: BERT Pre-Training of Image Transformers by Hangbo Bao, Li Dong and Furu Wei and first released in this repository. Disclaimer: The team releasing BEiT did not write a model card for this model so this model card has been written by the Hugging Face team. The BEiT model is a Vision Transformer (ViT), which is a transformer encoder model (BERT-like). In contrast to the original ViT model, BEiT is pretrained on a large…

Read Microsoft's full model card

BEiT (large-sized model, fine-tuned on ADE20k)

BEiT model pre-trained in a self-supervised fashion on ImageNet-21k (14 million images, 21,841 classes) at resolution 224x224, and fine-tuned on ADE20k (an important benchmark for semantic segmentation of images) at resolution 640x640. It was introduced in the paper BEIT: BERT Pre-Training of Image Transformers by Hangbo Bao, Li Dong and Furu Wei and first released in this repository.

Disclaimer: The team releasing BEiT did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

The BEiT model is a Vision Transformer (ViT), which is a transformer encoder model (BERT-like). In contrast to the original ViT model, BEiT is pretrained on a large collection of images in a self-supervised fashion, namely ImageNet-21k, at a resolution of 224x224 pixels. The pre-training objective for the model is to predict visual tokens from the encoder of OpenAI's DALL-E's VQ-VAE, based on masked patches. Next, the model was fine-tuned in a supervised fashion on ImageNet (also referred to as ILSVRC2012), a dataset comprising 1 million images and 1,000 classes, also at resolution 224x224.

Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which are linearly embedded. Contrary to the original ViT models, BEiT models do use relative position embeddings (similar to T5) instead of absolute position embeddings, and perform classification of images by mean-pooling the final hidden states of the patches, instead of placing a linear layer on top of the final hidden state of the [CLS] token.

By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: for semantic segmentation, one can just add one of the decode heads available in the mmseg library for example, and fine-tune the model in a supervised fashion on annotated images. This is what the authors did: they fine-tuned BEiT with an UperHead segmentation decode head, allowing it to obtain SOTA results on important benchmarks such as ADE20k and CityScapes.

Intended uses & limitations

You can use the raw model for semantic segmentation of images. See the model hub to look for fine-tuned versions on a task that interests you.

How to use

Here is how to use this model for semantic segmentation:

from transformers import BeitFeatureExtractor, BeitForSemanticSegmentation
from datasets import load_dataset
from PIL import Image

# load ADE20k image
ds = load_dataset("hf-internal-testing/fixtures_ade20k", split="test")

feature_extractor = BeitFeatureExtractor.from_pretrained('microsoft/beit-large-finetuned-ade-640-640')
model = BeitForSemanticSegmentation.from_pretrained('microsoft/beit-large-finetuned-ade-640-640')

inputs = feature_extractor(images=image, return_tensors="pt")
outputs = model(**inputs)
# logits are of shape (batch_size, num_labels, height/4, width/4)
logits = outputs.logits

Currently, both the feature extractor and model support PyTorch.

Training data

This BEiT model was pretrained on ImageNet-21k, a dataset consisting of 14 million images and 21k classes, and fine-tuned on ADE20k, a dataset consisting of thousands of annotated images and 150 classes.

Training procedure

Preprocessing

The exact details of preprocessing of images during training/validation can be found here.

Images are cropped and padded to the same resolution (640x640) and normalized across the RGB channels with the ImageNet mean and standard deviation.

Pretraining

For all pre-training related hyperparameters, we refer to page 15 of the original paper.

Evaluation results

For evaluation results on several image classification benchmarks, we refer to tables 1 and 2 of the original paper. Note that for fine-tuning, the best results are obtained with a higher resolution (384x384). Of course, increasing the model size will result in better performance.

BibTeX entry and citation info

@article{DBLP:journals/corr/abs-2106-08254, author = {Hangbo Bao and Li Dong and Furu Wei}, title = {BEiT: {BERT} Pre-Training of Image Transformers}, journal = {CoRR}, volume = {abs/2106.08254}, year = {2021}, url = {https://arxiv.org/abs/2106.08254}, archivePrefix = {arXiv}, eprint = {2106.08254}, timestamp = {Tue, 29 Jun 2021 16:55:04 +0200}, biburl = {https://dblp.org/rec/journals/corr/abs-2106-08254.bib}, bibsource = {dblp computer science bibliography, https://dblp.org} }

Configuration

Architecture
BeitForSemanticSegmentation
Layers
24
Hidden size
1,024
Feed-forward size
4,096
Attention heads
16
Vocabulary size
8,192
Stored precision
float32
Model type
beit

Identity and Version

Repository
microsoft/beit-large-finetuned-ade-640-640
Publisher
Microsoft
Task
Image segmentation
Modality
Image
Library
transformers
Parameters
503M parameters
Languages
Not stated by the source
Revision
a38fe98baf3d5a6f69fa1a07a62b698780e5dcb1
First published
2022-03-02
Last updated
2024-01-25

Files and Weights

6 files, 4.5 GB in total. The weights are 2 files totalling 4.5 GB in bin, safetensors.

Weights2 files · 4.5 GB
Configuration2 files · 7.2 KB
Documentation1 file · 5.4 KB
Repository1 file · 1.2 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights2.3 GB 49a9dfc6b9d1
pytorch_model.binWeights2.3 GB 476d8d77e1e2
config.jsonConfiguration7.0 KB
preprocessor_config.jsonConfiguration276 B
README.mdDocumentation5.4 KB
.gitattributesRepository1.2 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
4.5 GB
Download from Microsoft

Released by Microsoft through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published4.5 GB
16-bit1.0 GB
8-bit0.5 GB
4-bit0.3 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About beit-large-finetuned-ade-640-640

How much GPU memory does beit-large-finetuned-ade-640-640 need?

About 1.2 GB at 16-bit and 0.3 GB at 4-bit: the weights (503M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run beit-large-finetuned-ade-640-640 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use beit-large-finetuned-ade-640-640 commercially?

Yes. beit-large-finetuned-ade-640-640 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image segmentation

sapiens2-seg-0.4b

AI at Meta

Per-pixel body-part segmentation with 29 classes (28 parts + background). This repository contains the 0.4B Body-Part Segmentation checkpoint, finetuned from the Sapiens2-0.4B pretrained backbone. Install the Sapiens2 repo (pip install -e.), download the checkpoint, and run the demo: See the Body-Part Segmentation guide for details on inputs, outputs, and visualization options. See the Sapiens2 Collection for all variants and other downstream task checkpoints. Released under the Sapiens2 License.

Open weights other 407M parameters sapiens2

EoMT (Encoder-only Mask Transformer) is a Vision Transformer (ViT) architecture designed for high-quality and efficient image segmentation. It was introduced in the CVPR 2025 highlight paper: by Tommie Kerssies, Niccolò Cavagnero, Alexander Hermans, Narges Norouzi, Giuseppe Averta, Bastian Leibe, Gijs Dubbelman, and Daan de Geus. The original implementation can be found in this repository. The HuggingFace model page is available at this link. Here is how to use this model for Panotpic Segmentation: If you find our work useful, please consider citing us as

Open weights mit 317M parameters transformers

Model · Image segmentation

upernet-swin-large

OpenMMLab

UperNet framework for semantic segmentation, leveraging a Swin Transformer backbone. UperNet was introduced in the paper Unified Perceptual Parsing for Scene Understanding by Xiao et al. Combining UperNet with a Swin Transformer backbone was introduced in the paper Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. Disclaimer: The team releasing UperNet + Swin Transformer did not write a model card for this model so this model card has been written by the Hugging Face team. UperNet is a framework for semantic segmentation. It consists of several components, including a backbone, a Feature Pyramid Network (FPN) and a Pyramid Pooling Module (PPM). Any visual backbone can…

Open weights mit 234M parameters transformers

Model · Image segmentation

BiRefNet

Peng Zheng

This repo is the official implementation of "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" (CAAI AIR 2024). Visit our GitHub repo: https://github.com/ZhengPeng7/BiRefNet for more details -- codes, docs, and model zoo! This repo contains the weights of BiRefNet proposed in our paper, which has achieved the SOTA performance on three tasks (DIS, HRSOD, and COD). Go to my GitHub page for BiRefNet codes and the latest updates: https://github.com/ZhengPeng7/BiRefNet:) + Online Image Inference on Colab: + Online Inference with GUI on Hugging Face with adjustable resolutions: + Inference and evaluation of your given weights: + Many thanks to @Freepik for their generous…

Open weights mit 221M parameters birefnet

Model · Image segmentation

RMBG-2.0

BRIA AI

href="https://huggingface.co/briaai/FIBO" target="blank" rel="noopener" aria-label="Explore FIBO on Hugging Face" style=" src="https://huggingface.co/front/assets/huggingfacelogo-noborder.svg" alt="Hugging Face" width="18" height="18" style="display:block" RMBG v2.0 is our new state-of-the-art background removal model significantly improves RMBG v1.4. The model is designed to effectively separate foreground from background in a range of categories and image types. This model has been trained on a carefully selected dataset, which includes: general stock images, e-commerce, gaming, and advertising content, making it suitable for commercial use cases powering enterprise content creation at…

Access requested at publisher other 221M parameters transformers

Model · Image segmentation

BiRefNet_HR

Peng Zheng

This repo is the official implementation of "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" (CAAI AIR 2024). Visit our GitHub repo: https://github.com/ZhengPeng7/BiRefNet for more details -- codes, docs, and model zoo! This repo contains the weights of BiRefNet proposed in our paper, which has achieved the SOTA performance on three tasks (DIS, HRSOD, and COD). Go to my GitHub page for BiRefNet codes and the latest updates: https://github.com/ZhengPeng7/BiRefNet:) + Online Image Inference on Colab: + Online Inference with GUI on Hugging Face with adjustable resolutions: + Inference and evaluation of your given weights: + Many thanks to @freepik for their generous…

Open weights mit 221M parameters birefnet