Background Removal Showdown: RMBG-2.0 vs SAM 2 vs Proprietary APIs
Systematic benchmark across 5,000 product images. Open source is now within 2% of closed-source quality, at a fraction of the compute cost.
Background removal is one of the most common image processing tasks in production. E-commerce platforms, headshot services, and creative tools all need it, and they need it to be fast, cheap, and accurate. We benchmarked the leading models and APIs to answer a simple question: is open source ready to replace paid APIs?
The short answer: yes. RMBG-2.0 scores within 2 points of the best proprietary API, at roughly 1/125th the cost per image.
Methodology
We curated a test set of 5,000 product images across three categories, each presenting different challenges for background removal:
- E-commerce products (2,000 images) — Clean studio shots, white/gray backgrounds, varied object shapes from fashion to electronics
- Headshots (1,500 images) — Professional portraits with complex hair edges, varied skin tones, and diverse backgrounds (offices, outdoors, gradients)
- Creative/complex (1,500 images) — Transparent objects, fine details (jewelry, lace), motion blur, low contrast foreground-background pairs
Every image was processed by all four models/APIs, and each output was scored on three metrics:
- IoU (Intersection over Union) — Measures mask accuracy against human-annotated ground truth
- Edge Quality — Custom metric evaluating the smoothness and precision of mask boundaries, weighted heavily around hair and fine details
- Transparency Handling — Accuracy on semi-transparent regions (glass, sheer fabric, smoke)
Models Tested
We evaluated four solutions, two open-source models self-hosted on our infrastructure, and two commercial APIs:
- RMBG-2.0 — BRIA AI’s latest open-source background removal model, running on A100 via Runflow
- SAM 2 — Meta’s Segment Anything Model 2, configured for automatic foreground segmentation, self-hosted
- Remove.bg API — Industry-standard commercial background removal API
- Proprietary C — A competing commercial API (anonymized per testing agreement)
Results: Composite Quality Score
The composite score weights IoU at 50%, edge quality at 30%, and transparency handling at 20%. All scores are on a 0–100 scale.
The gap between the best proprietary API (Remove.bg at 95) and the best open-source model (RMBG-2.0 at 93) is just 2 points. A year ago, that gap was closer to 8–10 points. Open source has closed the distance remarkably fast.
Results: Cost per Image
This is where the comparison gets dramatic. Self-hosting open-source models through Runflow costs a fraction of a cent per image, while API pricing runs between $0.02 and $0.05 per image at scale.
At 100,000 images per month, the cost difference is staggering: $40/mo with RMBG-2.0 on Runflow versus $5,000/mo with Remove.bg. That is a 125x cost difference for a 2-point quality gap.
Category Breakdown
The aggregate scores hide some interesting per-category dynamics:
- E-commerce products: RMBG-2.0 actually ties Remove.bg at 96. Clean backgrounds and well-defined objects play to RMBG’s strengths.
- Headshots: Remove.bg leads by 3 points (95 vs 92), primarily due to better hair edge handling on complex curly and fine hair.
- Creative/complex: Remove.bg leads by 4 points (93 vs 89). Transparent objects and low-contrast scenes remain the hardest challenge for open-source models.
Conclusion: Open Source Is Production-Ready
- For e-commerce, switch now. RMBG-2.0 matches proprietary quality on product images at 1/125th the cost. There is no reason to keep paying API prices.
- For headshots, it depends on your quality bar. The 3-point gap on hair edges matters for premium portrait services. For most use cases, RMBG-2.0 is more than sufficient.
- For complex creative work, APIs still have an edge. But the gap is closing fast, and the cost savings from open source fund a lot of post-processing cleanup.
- SAM 2 is versatile but not specialized. It is a general-purpose segmentation model, not purpose-built for background removal. RMBG-2.0 wins on this specific task.
We will re-run this benchmark quarterly as new model versions are released. All test images, scoring code, and raw results are available in our open benchmark repository.
Want custom benchmarks for your workload?
We'll run our evaluation pipeline against your production data, for free.
Talk to Founders