RMBG v1.4 is our state-of-the-art background removal model, 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 v1.4 is available as a source-available model for non-commercial use.
Bria-RMBG model was trained with over 12,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
Architecture
RMBG v1.4 is developed on the
IS-Net
enhanced with our unique training scheme and proprietary dataset.
These modifications significantly improve the model’s accuracy and effectiveness in diverse image-processing scenarios.
Installation
git clone https://huggingface.co/briaai/RMBG-1.4
cd RMBG-1.4/
pip install -r requirements.txt
Usage
from skimage import io
import torch, os
from PIL import Image
from briarmbg import BriaRMBG
from utilities import preprocess_image, postprocess_image
from huggingface_hub import hf_hub_download
im_path = f"{os.path.dirname(os.path.abspath(__file__))}/example_input.jpg"
net = BriaRMBG()
device = torch.device("cuda"if torch.cuda.is_available() else"cpu")
net = BriaRMBG.from_pretrained("briaai/RMBG-1.4")
net.to(device)
net.eval()
# prepare input
model_input_size = [1024,1024]
orig_im = io.imread(im_path)
orig_im_size = orig_im.shape[0:2]
image = preprocess_image(orig_im, model_input_size).to(device)
# inference
result=net(image)
# post process
result_image = postprocess_image(result[0][0], orig_im_size)
# save result
pil_im = Image.fromarray(result_image)
no_bg_image = Image.new("RGBA", pil_im.size, (0,0,0,0))
orig_image = Image.open(im_path)
no_bg_image.paste(orig_image, mask=pil_im)
no_bg_image.save("example_image_no_bg.png")
Runs of JCTN RMBG-1.4 on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About RMBG-1.4 huggingface.co Model
RMBG-1.4 huggingface.co is an AI model on huggingface.co that provides RMBG-1.4's model effect (), which can be used instantly with this JCTN RMBG-1.4 model. huggingface.co supports a free trial of the RMBG-1.4 model, and also provides paid use of the RMBG-1.4. Support call RMBG-1.4 model through api, including Node.js, Python, http.
RMBG-1.4 huggingface.co is an online trial and call api platform, which integrates RMBG-1.4's modeling effects, including api services, and provides a free online trial of RMBG-1.4, you can try RMBG-1.4 online for free by clicking the link below.
RMBG-1.4 is an open source model from GitHub that offers a free installation service, and any user can find RMBG-1.4 on GitHub to install. At the same time, huggingface.co provides the effect of RMBG-1.4 install, users can directly use RMBG-1.4 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.