Evaluating image segmentation models for background removal for Images
Aug 28, 2025Deanna Lam, Diretnan Domnan

Summary
This post details the evaluation and selection process for image segmentation models to implement a background removal feature within Cloudflare Images. It introduces image segmentation concepts, explains accuracy metrics (Intersection over Union, Dice coefficient, pixel accuracy), and compares the performance of U2-Net, IS-Net, BiRefNet, and SAM models based on these metrics. The technical contribution lies in the methodology for evaluating and selecting AI models for a specific product capability, highlighting the trade-offs between different model architectures and their suitability for real-world applications.
More from the Artificial Intelligence Integration & Impact trail
- Introducing Clef-omni with full multimodality, plus a faster Clef and a cheaper Clef-flash
- Introducing Web Search API via AI Gateway
- Introducing Clef: our open-source decision models, and new RL fine-tuning platform
- One year later: Sovereign AI and the fight for choice
- AI Search is now generally available