SAVRN
Search Contact SAVRN

Open-weight model · Image segmentation

BiRefNet-portrait

by Peng Zheng ZhengPeng7/BiRefNet-portrait

Check the main BiRefNet model repo for more info and how to use it: https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md Also check the GitHub repo of BiRefNet for all things you may want: https://github.com/ZhengPeng7/BiRefNet + Many thanks to @fal…

Parameters221M
Context
Weights884.9 MB
Licensemit
AccessOpen weights
Monthly Downloads23.4k

Runs On

What it takes to serve BiRefNet-portrait (221M 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 0.4 GB 0.5 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.2 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 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 Peng Zheng, published under mit, revision b6561965a700.

Check the main BiRefNet model repo for more info and how to use it: https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md Also check the GitHub repo of BiRefNet for all things you may want: https://github.com/ZhengPeng7/BiRefNet + Many thanks to @fal for their generous support on GPU resources for training this BiRefNet for portrait matting.

Read Peng Zheng's full model card

Bilateral Reference for High-Resolution Dichotomous Image Segmentation

Peng Zheng 1,4,5,6,  Dehong Gao 2,  Deng-Ping Fan 1*,  Li Liu 3,  Jorma Laaksonen 4,  Wanli Ouyang 5,  Nicu Sebe 6
1 Nankai University  2 Northwestern Polytechnical University  3 National University of Defense Technology  4 Aalto University  5 Shanghai AI Laboratory  6 University of Trento 

This repo holds the official weights of BiRefNet for general matting.

Training Sets:

Validation Sets:

  • TE-P3M-500-P

Performance:

Dataset Method Smeasure maxFm meanEm MAE maxEm meanFm wFmeasure adpEm adpFm HCE
TE-P3M-500-P BiRefNet-portrai--epoch_150 .983 .996 .991 .006 .997 .988 .990 .933 .965 .000

Check the main BiRefNet model repo for more info and how to use it:
https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md

Also check the GitHub repo of BiRefNet for all things you may want:
https://github.com/ZhengPeng7/BiRefNet

Acknowledgement:

  • Many thanks to @fal for their generous support on GPU resources for training this BiRefNet for portrait matting.

Citation

@article{zheng2024birefnet,
  title={Bilateral Reference for High-Resolution Dichotomous Image Segmentation},
  author={Zheng, Peng and Gao, Dehong and Fan, Deng-Ping and Liu, Li and Laaksonen, Jorma and Ouyang, Wanli and Sebe, Nicu},
  journal={CAAI Artificial Intelligence Research},
  volume = {3},
  pages = {9150038},
  year={2024}
}

Configuration

Architecture
BiRefNet

Identity and Version

Repository
ZhengPeng7/BiRefNet-portrait
Publisher
Peng Zheng
Task
Image segmentation
Modality
Image
Library
birefnet
Parameters
221M parameters
Languages
Not stated by the source
Revision
b6561965a70070d9143fd9e558f6ca3c481510db
First published
2024-05-13
Last updated
2026-08-29

Files and Weights

9 files, 885.0 MB in total. The weights are 1 file totalling 884.9 MB in safetensors.

Weights1 file · 884.9 MB
Configuration4 files · 97.6 KB
Documentation1 file · 4.6 KB
Other1 file · 149 B
Repository2 files · 3.4 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights884.9 MB 4a4eb3a5469b
BiRefNet_config.pyConfiguration298 B
birefnet.pyConfiguration92.1 KB
config.jsonConfiguration414 B
handler.pyConfiguration4.7 KB
README.mdDocumentation4.6 KB
requirements.txtOther149 B
.gitattributesRepository1.5 KB
.gitignoreRepository1.9 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
884.9 MB
Download from Peng Zheng

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

Built From

Memory Requirements

PrecisionWeights in memory
As published884.9 MB
16-bit0.4 GB
8-bit0.2 GB
4-bit0.1 GB

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

Questions About BiRefNet-portrait

How much GPU memory does BiRefNet-portrait need?

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

What is the cheapest GPU to run BiRefNet-portrait 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 BiRefNet-portrait commercially?

Yes. BiRefNet-portrait is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

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

Model · Image segmentation

BiRefNet_HR-matting

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

BiRefNet_dynamic

Peng Zheng

For performance of different epochs, check the evalresults-xxx folder for it on my google drive. 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: +…

Open weights mit 221M parameters birefnet

Model · Image segmentation

BiRefNet-matting

Peng Zheng

Check the main BiRefNet model repo for more info and how to use it: https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md Also check the GitHub repo of BiRefNet for all things you may want: https://github.com/ZhengPeng7/BiRefNet + Many thanks to @freepik for their generous support on GPU resources for training this model!

Open weights mit 221M parameters birefnet