Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Recognising when you need individual object outlines, not class maps or bounding boxes

1. Motivation

Instance segmentation is more expensive to label, train, and run than detection or semantic segmentation alone. Reaching for it by default, rather than because your project genuinely needs object-level shapes, costs you time and data you may not have. Getting this decision right early avoids discovering the mismatch after a training run.


2. Core idea

You now have three related tools, and each answers a different question:

Instance segmentation is worth its added cost when your project genuinely needs to count individual objects, measure each one’s shape or area separately, or track a specific object over time, and when those objects have meaningful, non-trivial boundaries worth tracing precisely.


3. Points to consider

A. Decision Matrix Table

Analytical GoalRecommended MethodWhy Choose This Method?
Counting distinct entitiesInstance SegmentationAssigns unique IDs to contiguous or overlapping features (e.g., tree crowns, buildings).
Object geometry & metricsInstance SegmentationCalculates individual area, perimeter, shape, or orientation directly from polygons.
Boundary separationInstance SegmentationKeeps adjacent entities separate (e.g., neighboring farm fields) rather than merging them.
Exact boundary shapeInstance SegmentationProvides true visible geometry rather than loose bounding boxes (e.g., building footprints).
Continuous land coverSemantic SegmentationSimplies processing when individual entity boundaries do not matter (e.g., total surface water or forest cover).
Presence & locationObject DetectionFast and sufficient when bounding boxes deliver the required count (e.g., solar panel arrays).
Scene classificationImage RecognitionEvaluates whole-tile categories without needing spatial boundaries (e.g., urban vs. forest chips).
When instance segmentation fits
  • Counting individual objects: Necessary when you need discrete object totals (e.g., tree crowns, agricultural parcels). Semantic segmentation estimates total area, but cannot split connected pixels into counts.

  • Object-specific metrics: Converts masks into distinct vector polygons to extract individual area, perimeter, shape, or orientation.

  • Preserving adjacent boundaries: Assigns unique identities to touching features (e.g., neighboring farm fields) to prevent them from merging into a single blob.

  • Exact geometry vs. bounding boxes: Captures true visible shape (e.g., building footprints) where a Bounding Box introduces unnecessary background noise.

When other methods are enough
  • Semantic Segmentation for continuous cover: Best for area-based queries (“Which pixels are forest or water?”) where individual patch identity is irrelevant.

  • Object Detection for location & count: Best when approximate location and counts suffice (“How many solar installations exist?”). Avoid detailed masks unless geometry adds analytical value.

  • Image Recognition for scene classification: Best for tile-level categorization (“Is this image chip urban or agricultural?”). Object-level boundaries are unnecessary here.


B. “Things” and “stuff”

A useful conceptual distinction from computer vision is between things and stuff.

Things are objects that can usually be counted:

Stuff describes regions without a meaningful individual identity:

Instance segmentation mainly focuses on things.


C. Resolution still matters

Accurate masks require enough spatial information to locate object boundaries.

Suppose a field boundary, narrow rooftop feature or tree crown is represented by only a few pixels. Even if the model identifies the object correctly, the exact geometry may remain uncertain.

The chain is:

real-world object
        ↓
image spatial resolution
        ↓
visible boundary information
        ↓
possible mask precision

Spatial Resolution therefore affects not only whether an object can be detected, but also whether its shape can be delineated meaningfully.


D. Annotation effort matters

Instance segmentation requires detailed Training Data.

Compared with scene labels or bounding boxes, pixel-level object masks generally require substantially more annotation effort.

Before choosing the method for your project, ask:

A technically suitable method may still be a poor project choice if the necessary labels cannot be produced within the available time.


4. Common pitfalls


5. Mini task

Your project involves mapping individual tree crowns in an orchard to estimate per-tree canopy area for irrigation planning. Would detection, semantic segmentation, or instance segmentation fit best? Justify your answer in two sentences.

Sample solution

Instance segmentation fits best. The project needs per-tree canopy area, which rules out detection’s bounding boxes as too coarse a proxy for irregular crown shapes, and it needs per-tree measurements, which rules out a shared semantic segmentation mask that would not separate adjacent, touching crowns.


6. Key takeaways

Further reading