camenduru / RMBG-2.0

huggingface.co
Total runs: 2.7K
24-hour runs: 0
7-day runs: 249
30-day runs: 249
Model's Last Updated: December 17 2025
image-segmentation

Introduction of RMBG-2.0

Model Details of RMBG-2.0

BRIA Background Removal v2.0 Model Card

BRIA Logo

Hugging Face ✨ Discover FIBO on Hugging Face

💜 Bria AI |   🤗 Hugging Face |    📑 Blog
🖥️ Demo | Github

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 scale. The accuracy, efficiency, and versatility currently rival leading source-available models. It is ideal where content safety, legally licensed datasets, and bias mitigation are paramount.

Developed by BRIA AI, RMBG v2.0 is available as a source-available model for non-commercial use.

Get Access

Bria RMBG2.0 is availabe everywhere you build, either as source-code and weights, ComfyUI nodes or API endpoints.

For more information, please visit our website .

Join our Discord community for more information, tutorials, tools, and to connect with other users!

CLICK HERE FOR A DEMO

examples

Model Details
Model Description
  • Developed by: BRIA AI

  • Model type: Background Removal

  • License: Creative Commons Attribution–Non-Commercial (CC BY-NC 4.0)

    • The model is released under a CC BY-NC 4.0 license for non-commercial use.
    • Commercial use is subject to a commercial agreement with BRIA. Available here
  • Model Description: BRIA RMBG-2.0 is a dichotomous image segmentation model trained exclusively on a professional-grade dataset. The model output includes a single-channel 8-bit grayscale alpha matte, where each pixel value indicates the opacity level of the corresponding pixel in the original image. This non-binary output approach offers developers the flexibility to define custom thresholds for foreground-background separation, catering to varied use cases requirements and enhancing integration into complex pipelines.

  • BRIA: Resources for more information: BRIA AI

Training data

Bria-RMBG model was trained with over 15,000 high-quality, high-resolution, manually labeled (pixel-wise accuracy), fully licensed images. Our benchmark included balanced gender, balanced ethnicity, and people with different types of disabilities. For clarity, we provide our data distribution according to different categories, demonstrating our model’s versatility.

Distribution of images:
Category Distribution
Objects only 45.11%
People with objects/animals 25.24%
People only 17.35%
people/objects/animals with text 8.52%
Text only 2.52%
Animals only 1.89%
Category Distribution
Photorealistic 87.70%
Non-Photorealistic 12.30%
Category Distribution
Non Solid Background 52.05%
Solid Background 47.95%
Category Distribution
Single main foreground object 51.42%
Multiple objects in the foreground 48.58%
Qualitative Evaluation

Open source models comparison diagram examples

Architecture

RMBG-2.0 is developed on the BiRefNet architecture enhanced with our proprietary dataset and training scheme. This training data significantly improves the model’s accuracy and effectiveness for background-removal task.
If you use this model in your research, please cite:

@article{BiRefNet,
  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},
  year={2024}
}
Requirements
torch
torchvision
pillow
kornia
transformers
Usage
from PIL import Image
import torch
from torchvision import transforms
from transformers import AutoModelForImageSegmentation

device = 'cuda' if torch.cuda.is_available() else 'cpu'
model = AutoModelForImageSegmentation.from_pretrained('briaai/RMBG-2.0', trust_remote_code=True).eval().to(device)

# Data settings
image_size = (1024, 1024)
transform_image = transforms.Compose([
    transforms.Resize(image_size),
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])

image = Image.open(input_image_path)
input_images = transform_image(image).unsqueeze(0).to(device)

# Prediction
with torch.no_grad():
    preds = model(input_images)[-1].sigmoid().cpu()
pred = preds[0].squeeze()
pred_pil = transforms.ToPILImage()(pred)
mask = pred_pil.resize(image.size)
image.putalpha(mask)

image.save("no_bg_image.png")

Runs of camenduru RMBG-2.0 on huggingface.co

2.7K
Total runs
0
24-hour runs
25
3-day runs
249
7-day runs
249
30-day runs

More Information About RMBG-2.0 huggingface.co Model

RMBG-2.0 huggingface.co

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

camenduru RMBG-2.0 online free

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

camenduru RMBG-2.0 online free url in huggingface.co:

https://huggingface.co/camenduru/RMBG-2.0

RMBG-2.0 install

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

RMBG-2.0 install url in huggingface.co:

https://huggingface.co/camenduru/RMBG-2.0

Url of RMBG-2.0

Provider of RMBG-2.0 huggingface.co

camenduru
ORGANIZATIONS

Other API from camenduru

huggingface.co

Total runs: 17.3K
Run Growth: -4.2K
Growth Rate: -23.04%
Updated:September 27 2023
huggingface.co

Total runs: 130
Run Growth: 28
Growth Rate: 22.40%
Updated:December 26 2023
huggingface.co

Total runs: 71
Run Growth: 36
Growth Rate: 50.70%
Updated:June 04 2024
huggingface.co

Total runs: 59
Run Growth: 41
Growth Rate: 70.69%
Updated:June 16 2023
huggingface.co

Total runs: 41
Run Growth: -12
Growth Rate: -28.57%
Updated:October 24 2024
huggingface.co

Total runs: 31
Run Growth: -64
Growth Rate: -206.45%
Updated:October 26 2023
huggingface.co

Total runs: 21
Run Growth: 6
Growth Rate: 30.00%
Updated:April 20 2023
huggingface.co

Total runs: 12
Run Growth: -4
Growth Rate: -30.77%
Updated:May 25 2024
huggingface.co

Total runs: 11
Run Growth: -12
Growth Rate: -133.33%
Updated:January 22 2024
huggingface.co

Total runs: 10
Run Growth: 5
Growth Rate: 50.00%
Updated:October 08 2024
huggingface.co

Total runs: 9
Run Growth: -8
Growth Rate: -80.00%
Updated:December 24 2022
huggingface.co

Total runs: 8
Run Growth: -1
Growth Rate: -14.29%
Updated:September 27 2024
huggingface.co

Total runs: 8
Run Growth: 2
Growth Rate: 28.57%
Updated:September 15 2023
huggingface.co

Total runs: 8
Run Growth: -4
Growth Rate: -33.33%
Updated:March 05 2024
huggingface.co

Total runs: 7
Run Growth: -9
Growth Rate: -128.57%
Updated:May 03 2023
huggingface.co

Total runs: 5
Run Growth: -2
Growth Rate: -40.00%
Updated:September 17 2024
huggingface.co

Total runs: 5
Run Growth: -2
Growth Rate: -40.00%
Updated:September 02 2024
huggingface.co

Total runs: 4
Run Growth: -3
Growth Rate: -75.00%
Updated:October 29 2024
huggingface.co

Total runs: 4
Run Growth: -12
Growth Rate: -300.00%
Updated:November 25 2023
huggingface.co

Total runs: 3
Run Growth: -6
Growth Rate: -300.00%
Updated:April 08 2024
huggingface.co

Total runs: 1
Run Growth: -6
Growth Rate: -600.00%
Updated:December 07 2023
huggingface.co

Total runs: 1
Run Growth: -3
Growth Rate: -300.00%
Updated:August 07 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 10 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:July 13 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 02 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 02 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 23 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 29 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 13 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 03 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 23 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:January 04 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 13 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 09 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 23 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 08 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 25 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 31 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 24 2024