back
Back to Glossary

What is Image Segmentation?

Image segmentation is the process of dividing an image into pixel-accurate regions so a model can reason about objects and surfaces, not just whole images. Unlike image classification or bounding-box detection, segmentation assigns a label to each pixel, producing a mask that delineates shapes and boundaries.

Teams typically use three task families: semantic, instance, and panoptic segmentation, sometimes called pixel-wise labeling or image partitioning.

  1. Semantic segmentation classifies every pixel by category without separating duplicates of the same class.
  2. Instance segmentation predicts a distinct mask for each object instance of a class.
  3. Panoptic segmentation combines both to cover “things” (countable objects) and “stuff” (amorphous regions) in one map.

How segmentation is created and used in practice?

Ground-truth labels come from polygon traces or raster masks drawn on images. These masks train models that output a per-pixel class map at inference time.

Classical approaches include thresholding, region growing, watershed, and graph cuts for well-structured scenes.
Modern systems rely on deep learning: FCN and U-Net for semantic maps, DeepLab for multi-scale context, Mask R-CNN for instance masks, and transformer backbones such as SegFormer for strong generalization.

Where image segmentation is applied?

Segmentation is used wherever boundaries matter: medical imaging for tumors or organs, autonomous driving for drivable area and lane markings, retail catalog operations for background removal and SKU isolation, manufacturing for defect localization, agriculture for canopy and field plots, and geospatial tasks for building footprints or roads.

Formats and annotation details that matter

Masks can be stored as run-length encodings, bitmap PNGs, or polygons. COCO supports instance and panoptic annotations, while PASCAL VOC uses class maps; recent YOLO variants store polygon masks. Conversions can introduce topology issues such as self-intersecting polygons or off-by-one rasterization, so verify round-trips between your label format, the training dataloader, and the evaluator. When migrating, keep a stable class-ID map and document void or ignore labels for ambiguous pixels.

Example

Consider e-commerce shelf monitoring. Instance segmentation isolates each product, even when boxes overlap, so an audit pipeline can count facings and detect gaps accurately.

A naive semantic label might merge overlapping items and miss out-of-stocks; a correct instance mask preserves each SKU boundary so the stock count stays reliable.

In healthcare, semantic segmentation of a liver CT scan can delineate organ boundaries for volumetry, while an instance model separates multiple lesions within that organ.

Operational best practices

Plan a lean ontology and expand only when new classes change decisions. Calibrate a gold set with pixel-accurate QA before scaling. Sample across scenes, lighting, and devices to limit domain shift. Track drift with class frequency and mean IoU by slice. Use model-assisted labeling so annotators paint masks with clicks and scribbles rather than tracing every edge. Close the loop with review queues and targeted re-labeling where boundary errors cluster.