Semantic segmentation vs instance segmentation: how the labels differ

For experts4 min read

Semantic segmentation vs instance segmentation is a question of what the label records. Semantic labels say what every pixel is. Instance labels also say which individual object it belongs to. The choice changes how you work and what the model learns.

Semantic segmentation vs instance segmentation: the core difference

Picture a street photo with three parked cars. In semantic segmentation, every pixel is given a class: road, sky, building, car. All three cars share the label car, and you cannot tell where one ends and the next begins. In instance segmentation, each car gets its own mask and an identity: car 1, car 2, car 3.

A third type, panoptic segmentation, combines both. Countable things such as cars and people get separate instances, while uncountable regions such as sky and road get a single class label. The COCO dataset lists panoptic and stuff tasks next to object detection and keypoints.

Source: COCO dataset(opens in a new tab)

Three columns comparing what each label records for the same street: class per pixel, class plus identity per object, and both combined.
The same scene, labelled three ways.

A comparison table

SemanticInstancePanoptic
Label per pixelClassClass and object numberClass, and object number for countable things
Separates two touching carsNoYesYes
Counts objectsNoYesYes
Typical useLand cover, road area, medical regionsCounting people or cars, picking itemsDriving scenes, full scene understanding
Annotator effortMediumHighHighest

How annotators work on each

For semantic work, you paint or outline regions and assign a class. Tools offer a brush, polygons and often an assist feature that snaps to edges. Speed comes from working region by region, large areas first.

For instance work, each object needs its own shape and the shapes must not overlap in confusing ways. You start a new object for every car, person or leaf. When two objects touch, you place the boundary between them where it belongs, even if the edge is hard to see.

Handling difficult cases

  • Overlap: when one object is in front of another, the front object keeps the pixels. Follow the guideline on whether the hidden part is drawn.
  • Thin parts such as poles, wires and hair: the guideline will say whether to include them or leave them to the background.
  • Reflections and shadows: usually excluded unless the class says otherwise.
  • Crowds: when objects cannot be separated, some projects have a crowd label for the group.
  • Unclear pixels: use an unknown or ignore class if one exists.

Choosing a labelling plan

  1. Ask what the model must output: area, count, or both.
  2. Pick the cheapest label that serves that need. Do not annotate instances if you only need area.
  3. List the classes and which are countable.
  4. Write the edge rules before the first image.
  5. Label ten images, review them together, and adjust the rules.

Cost grows quickly. A semantic mask of a street scene may take a few minutes, while instance masks for fifty pedestrians in a crowd can take far longer. If you are asked for estimates, include that.

Quality checks

  • No gaps: every pixel has a class, or an explicit unknown.
  • No sliver overlaps between neighbouring shapes.
  • Each instance has exactly one identity.
  • Class names match the list exactly.

Quality is often measured by how much your mask overlaps with a reference mask. Small boundary differences add up, so keep your edges consistent and follow the guideline about pixels on the border.

Skills that carry over

If you can do semantic work well, you can move to instance work by adding one habit: stop and ask whether this is a new object. People from fields that read images, such as radiology, geography and agriculture, often pick it up fast, since they already know where one structure ends and another begins.

An example you can try at home

Take a photo of a bookshelf. For a semantic version, paint three classes: book, shelf, wall. Every book pixel gets the same colour. Now do an instance version. Each book gets its own outline and its own number. You will notice at once that touching spines are hard to separate, and that you have to decide where one ends. That decision, repeated on thousands of images, is the skill reviewers look for.

Try a panoptic version last. Books are countable and keep their numbers. The wall and the shelf are single regions without numbers. You have now seen all three label types on one image, and why each costs a different amount of effort.

Time yourself on each. The numbers give you a realistic sense of what a task rate means for your own working speed.

Curatrain tests experts by skill and level, and matches those who pass to paid projects. Visual data work is one of the things its experts do.