What is image segmentation?
Image segmentation divides a photo into regions and assigns each pixel a label, such as person, car or background. The output is a mask that shows exactly where an object sits. This tool runs the MediaPipe Image Segmenter in your browser, so you can select a subject, export a mask and edit the background without installing software.
Semantic, instance and panoptic segmentation
| Type | What it returns | Example |
|---|---|---|
| Semantic | One label per pixel, per class | All people share one “person” region (this tool) |
| Instance | A separate mask for each object | Each person gets their own mask |
| Panoptic | Semantic plus instance in one result | Stuff like sky plus individual cars |
How to segment an image and edit the background
- Add a photo. A clear subject with good contrast gives the cleanest mask.
- Choose Objects for everyday items or Person parts for portraits, then click Segment Image.
- Click the region chips to keep or drop each class. Use Invert to select everything else.
- Open the Cutout tab. Pick a transparent, solid or blurred background and tune the edge feather.
- Download the PNG cutout, or download the black-and-white mask for use in your editor.
Real-world uses for segmentation masks
- Product and listing photos: place the subject on a clean background, but keep the product true to life.
- Portrait editing: blur the background or recolor hair and clothes with the part masks.
- Design and compositing: export a transparent PNG for banners, thumbnails and social posts.
- Dataset preparation: create quick masks to inspect or label training images.
Know the limits before you publish
The Objects model recognizes 20 Pascal VOC classes and returns a mask at limited resolution, so hair, fur and transparent objects can look soft. A tool like this suits quick selections and drafts, and it does not replace careful retouching for studio-grade work. Always review the edge quality at full size.
Edited images, honesty and Google guidance
Background edits are fine, but do not mislead people. Show products as they really look, and avoid edits that change what a buyer receives. Google’s helpful content guidance rewards accurate, people-first pages, and its image SEO documentation explains file names, alt text and placement. Add descriptive alt text to every cutout you publish.
Optimize your cutouts after editing
- Identify what is in a photo first with the AI Image Classifier.
- Shrink the PNG with the Image Compressor, or convert it to WebP with the All-in-One Image Converter.
- Resize it with the Image Resizer, then create markup with the Responsive Image HTML Generator.
- Add a loading placeholder with the BlurHash & LQIP Generator.
Frequently asked questions
What is image segmentation?
Image segmentation divides a picture into regions and labels each pixel, for example person, car or background. The result is a mask that shows exactly where each object sits.
What is the difference between semantic and instance segmentation?
Semantic segmentation labels every pixel by class, so two people share one "person" region. Instance segmentation also separates each individual, giving each person their own mask. This tool performs semantic segmentation.
Which objects can the tool detect?
The Objects model recognizes 20 everyday classes from the Pascal VOC set, such as person, cat, dog, car, bicycle, bottle and chair. The Person parts model splits a portrait into hair, face skin, body skin and clothes.
Can I remove the background from a photo?
Yes. Segment the image, keep the regions you want, then export a transparent PNG cutout or fill the background with a color or a blurred copy. Edges are soft, so complex hair and fine details may need manual touch-up.
Are my images uploaded to a server?
No. The tool analyzes your image in your browser. Your browser downloads the model and the WebAssembly runtime once from public hosts, then caches them.
Why is part of my subject missing from the mask?
The model only knows its trained classes, and its output resolution is limited. Try the other model, adjust the feather slider, use a photo with clearer contrast or add the missing region in the class list.