Segmentation Models, Simply Explained
What image segmentation is, the main types, such as subject, semantic and click-to-select, and how they power background removal and selection tools.
Image segmentation is the task of dividing an image into meaningful regions: this area is a person, that area is the sky, this is a cup. It's the foundation of background removal, smart selection and many editing tools.
Classification vs. segmentation
An image classifier says what's in a picture: "a dog". A segmentation model says where it is, pixel by pixel. That precise outline is what lets editors cut things out.
Main types
- Salient object or subject segmentation: finds the main subject of the photo. This is what most background removers use. It doesn't need to know what the subject is, just that it's the focus.
- Semantic segmentation: labels every pixel with a category, such as person, road, car, sky. Useful for sky replacement and scene editing.
- Instance segmentation: separates individual objects, like each person in a crowd.
- Promptable segmentation: you click a point or draw a box, and the model outlines the object there. This powers click-to-select tools. See selection tools.
- Matting: focuses on fine, soft edges like hair, producing smooth partial transparency rather than hard outlines.
How they're trained
Models learn from images with hand-made outlines. The quality and variety of this training data strongly affects how well a model handles hair, unusual objects and different skin tones. See mistakes AI makes in cutouts.
Size and speed
Larger models tend to give finer, more accurate edges but need more memory and time. Smaller models are fast enough for live video. See virtual meeting backgrounds.
Open models
Many segmentation models are published openly, with licences that let developers use them in their own tools, including in the browser. See open models in the browser.
In BGZone
BGZone uses a subject segmentation model for cutouts, and a promptable model, SlimSAM, for click-to-select in Smart Select and Smart remove.