---
title: Image Segmentation
description: >-
  What image segmentation is, how it divides an image into pixel-precise
  regions, and its role in separating person, clothing, and background for
  virtual try-on.
shortDefinition: >-
  A computer vision technique that divides an image into pixel-precise regions,
  such as a person, their clothing, and the background.
relatedTerms:
  - pose-estimation
  - image-inpainting
  - garment-transfer
  - occlusion
heroImage: /glossary-images/image-segmentation-map.webp
keywords:
  - image segmentation
  - person parsing
  - masking
publishedAt: '2026-06-10'
updatedAt: '2026-06-10'
noindex: false
canonicalPath: /glossary/image-segmentation
---

## What is image segmentation?

**Image segmentation** is a computer vision process that divides a digital image into distinct regions at the pixel level. Where object detection only says "there is a person in this photo", segmentation traces the exact boundary of that person, separating them from the background, their hair from their face, and one garment from another.

The garment-level variant is often called **person parsing**: labeling every pixel as skin, hair, top, bottoms, shoes, or background.

![A photo and its segmentation map with color-coded regions](/glossary-images/image-segmentation-map.webp)

## Role in virtual try-on

Segmentation is one of the first steps in a try-on pipeline:

1. **Garment masking**: identifying the exact pixels of the clothing to be replaced, which becomes the mask for [image inpainting](/glossary/image-inpainting.md).
2. **Background isolation**: ensuring generation never alters the scene around the person.
3. **[Occlusion](/glossary/occlusion.md) handling**: detecting hair, hands, or accessories in front of the clothing so they are preserved on top of the new garment.

Segmentation tells the system *where* things are at the pixel level; [pose estimation](/glossary/pose-estimation.md) tells it *how the body is positioned*. [Garment transfer](/glossary/garment-transfer.md) needs both.

<Faq>
  <FaqItem question="What's the difference between segmentation and background removal?">
    Background removal is one application of segmentation: a two-region split (subject vs background). Try-on pipelines need finer-grained parsing that distinguishes individual garments, skin, and hair within the subject.
  </FaqItem>
</Faq>
