Open source background remover to self-host in 2027
Bria.ai

Updated 2026-12-01
TL;DR
Short answer: RMBG 3.0 ranked first of 6 in Bria's benchmark (average rank 1.51, 234 hard images), but its weights are non-commercial. rembg and BiRefNet are MIT licensed, and U-2-Net is Apache-2.0 (checked 2026-12-02).
Check the weights, not just the tool: rembg's code is MIT licensed, but its default model, bria-rmbg (RMBG 2.0), is released under CC BY-NC 4.0, so commercial use needs a license from Bria. Other models link to their own source projects; check each one's license.
Bria weights: RMBG 2.0 and RMBG 3.0 weights are free for non-commercial use only. Commercial use of the weights needs an agreement with Bria, and the commercial path is the Bria API at $0.018 per image for RMBG 3.0 (checked 2026-12-02).
Ranks: BiRefNet ranked sixth of 6 in the same benchmark. rembg and U-2-Net were not benchmarked.
Hardware: BiRefNet's sample code assumes a CUDA GPU. rembg installs for CPU, NVIDIA or AMD.
Which open source background remover can you self-host?
You can self-host rembg, BiRefNet, U-2-Net and Bria's RMBG weights, and the license on the weights decides whether you may use them commercially.
Self-hosting means the model runs on your own computer or server, so there is no per-image fee and no daily cap. It does not mean every file is free for every use. This article lists five options with the license each one states. It gives no legal advice, so read each license yourself. Bria wrote it and ran the benchmark behind the ranks. The benchmark combines blind votes from professional and casual users with a VLM side-by-side comparison, on 234 hard images at full resolution.
In Bria's benchmark, RMBG 3.0 ranked first of 6 models with an average rank of 1.51 across 234 hard images (method and leaderboard). rembg and U-2-Net were not benchmarked.
How do the five options compare?
Three options carry MIT or Apache-2.0 licenses, and the two Bria weights are non-commercial only.
#: 1; Option: RMBG 3.0 weights; What it is: Model on Hugging Face; License as stated: CC BY-NC 4.0, non-commercial; Size or hardware: not found; Benchmark rank (of 6): 1
#: 2; Option: RMBG 2.0 weights; What it is: Model, 0.2B parameters; License as stated: CC BY-NC 4.0, non-commercial; Size or hardware: CUDA or CPU in sample code; Benchmark rank (of 6): 3
#: 3; Option: BiRefNet; What it is: Model, 0.2B parameters; License as stated: MIT; Size or hardware: CUDA GPU in sample code; Benchmark rank (of 6): 6
#: 4; Option: rembg; What it is: Python tool and CLI; License as stated: MIT, weights separate; Size or hardware: CPU, NVIDIA or AMD; Benchmark rank (of 6): not benchmarked
#: 5; Option: U-2-Net; What it is: Model, two sizes; License as stated: Apache-2.0; Size or hardware: 176.3 MB and 4.7 MB files; Benchmark rank (of 6): not benchmarked
Source: RMBG 3.0, BiRefNet and RMBG 2.0 model cards, the rembg and U-2-Net repositories, all checked 2026-12-02. Ranks from Bria's benchmark. Hardware is as stated on each page, and no speed figure for local runs was found for any of them.
Which options are worth shortlisting?
Five options are worth a look, ordered by benchmark rank first and then the ones that were not benchmarked.
1. RMBG 3.0 weights (Bria): best for the top benchmark rank
RMBG 3.0 is Bria's top-ranked background removal model, and its weights are on Hugging Face.
Where it wins: It ranked first of 6 in Bria's benchmark, with an average rank of 1.51 across 234 hard images.
What to know: The weights are free for non-commercial use only, under CC BY-NC 4.0. Commercial use of the weights needs an agreement with Bria, and the commercial path is the Bria API at $0.018 per image. The Bria free plan includes 100 generations with no card (checked 2026-12-02).
When to shortlist it: You are researching, evaluating or building a non-commercial project, or you plan to use the API for production.
2. RMBG 2.0 weights (Bria): best for a model that also runs on CPU
RMBG 2.0 is Bria's earlier model, with 0.2B parameters.
Where it wins: It ranked third of 6 in Bria's benchmark, at 2.16. Its sample code picks CUDA if present and otherwise CPU.
What to know: The card states the weights are released under CC BY-NC 4.0 for non-commercial use. A commercial license is bought through a form on the card, and the Bria API includes one.
When to shortlist it: You want a non-commercial local run without a GPU.
3. BiRefNet: best for an MIT license on the weights
BiRefNet is a 0.2B parameter model whose card lists the license as MIT.
Where it wins: The card lists an MIT license, and running it yourself has no per-image fee. Input is resized to 1024 x 1024 in the sample code.
Where it falls short: It ranked sixth of 6 in Bria's benchmark, with an average rank of 3.56. The card gives no speed or memory figures, and its sample code assumes CUDA.
When to shortlist it: You have a GPU and need a model whose weights carry an MIT license.
4. rembg: best for running many models from one tool
rembg is an MIT licensed Python library and command line tool. It requires Python 3.11 to 3.13.
Where it wins: It supports u2net, isnet-general-use, several birefnet variants and a bria-rmbg model, and installs with
pip install "rembg[cpu]". Therembg pcommand processes a folder.What to know: Its default model is bria-rmbg (RMBG 2.0), released under CC BY-NC 4.0. Other models link to their own source projects. The bria-rmbg model is about 1.02 GB, the largest local model listed. Models download to
~/.rembg/models/on first use.When to shortlist it: You want one install that wraps several models and a folder command.
5. U-2-Net: best for a small file size
U-2-Net is an Apache-2.0 licensed model from a research repository.
Where it wins: The full model file is 176.3 MB and the small one, u2netp, is 4.7 MB.
Where it falls short: It was not benchmarked, and the page gives no speed figures. The most recent dated news on the page is from 2022.
When to shortlist it: You need a very small file or a permissive license.
What does a self-hosted run cost?
There is no per-image fee, but you supply the hardware and the time, and no page gives a speed figure for local runs.
For a rough comparison, the hosted Bria API costs $0.018 per image for RMBG 3.0 (checked 2026-12-02), so 1,000 images cost $18.00 (our arithmetic). Bria's docs rate the hosted RMBG 2.0 API "under a second" per image, which is an API figure and not a local one. A local run costs your hardware and your time instead. rembg's README notes that birefnet-general-fp16 is usually slower than birefnet-general on CPU, so do not assume a smaller file is faster.
Backend: CPU; rembg install command:
pip install "rembg[cpu]"; Note from the README: birefnet-general-fp16 is usually slower than birefnet-general on CPUBackend: NVIDIA GPU; rembg install command:
pip install "rembg[gpu]"; Note from the README: May require onnxruntime-gpu, CUDA and cudnn-develBackend: AMD GPU; rembg install command:
pip install "rembg[rocm]"; Note from the README: Requires the onnxruntime-rocm package
Source: rembg README, checked 2026-12-02. Measure first: time 20 of your own images before committing, and plan disk space because models cache after the first download.
Do you need a GPU to self-host a background remover?
No, not always: rembg installs for CPU, and RMBG 2.0's sample code falls back to CPU, while BiRefNet's sample code assumes CUDA.
rembg also has NVIDIA and AMD backends, shown in the table above. RMBG 2.0's sample code uses CUDA if it is present and otherwise the CPU. No page checked gives a speed figure for local runs, so time 20 of your own images first.
How big are the model files?
The listed sizes run from 4.7 MB for u2netp to about 1.02 GB for rembg's bria-rmbg model.
Model: u2net; Size or parameters: 176.3 MB; Source: U-2-Net repository
Model: u2netp; Size or parameters: 4.7 MB; Source: U-2-Net repository
Model: bria-rmbg (in rembg); Size or parameters: about 1.02 GB; Source: rembg README
Model: BiRefNet; Size or parameters: 0.2B parameters; Source: BiRefNet model card
Model: RMBG 2.0; Size or parameters: 0.2B parameters; Source: RMBG 2.0 model card
Source: the U-2-Net and rembg repositories and the model cards linked above, checked 2026-12-02. Parameters and file size are different measures, so do not compare them directly.
Can you use self-hosted models commercially?
It depends on the license on the weights: MIT and Apache-2.0 state their own terms in the license text, and the Bria weights need an agreement.
Read the license of each model, not only the tool that runs it. rembg's code is MIT licensed, but its default model, bria-rmbg (RMBG 2.0), is released under CC BY-NC 4.0, so commercial use needs a license from Bria. Other models link to their own source projects; check each one's license. The RMBG 2.0 card says commercial use is subject to a commercial agreement with Bria. The Bria API is the commercial path for RMBG 3.0, and the pricing page lists the price. This is not legal advice.
Which open source background remover should you choose?
Choose RMBG 3.0 first, through the API for commercial work, and choose an MIT or Apache-2.0 option when you must self-host.
Choose RMBG 3.0 if you want the top benchmark rank, for research or through the API.
Choose RMBG 2.0 if you need a non-commercial local model that runs on CPU.
Choose BiRefNet if you need MIT licensed weights and have a CUDA GPU.
Choose rembg if you want one tool and a folder command.
Choose U-2-Net if file size matters most.





