Two synthetic pixel maps compare reference components with a fragmented and missing predicted object.
Original conceptual diagram using synthetic examples. It illustrates the article’s question, not experimental results.

A pixel score does not answer an object question

A small tree, vehicle or panel can disappear from a land-cover map while overall accuracy changes very little. Pixel metrics weight support in pixels; an object question asks whether a particular entity was recovered. Both are useful, but they answer different questions. Adding an object score requires an explicit definition of what counts as an object and a defensible reference for it.

Semantic segmentation assigns classes to pixels. Instance segmentation additionally distinguishes individual objects of the same class; panoptic segmentation provides a framework bringing these tasks together. A semantic annotation does not automatically contain instance identities. Two touching trees labelled as vegetation may be inseparable without additional reference information. [1]

This guide describes an evaluation protocol for resolved small objects with reference masks or locations. It does not infer physical instances from a class map when the annotation cannot support them. All counts and geometric examples below are illustrative. For the basic pixel metrics, use the fine-grained metrics guide.

Sources: [1]

Define connected components without changing the question

When instance labels are unavailable, connected components can describe contiguous predicted regions of a class. In a two-dimensional grid, four-connectivity joins pixels through shared edges; eight-connectivity also joins diagonal neighbours. These rules can turn the same binary mask into different component counts. SciPy exposes connectivity through its structuring element, with a cross-shaped default in two dimensions. [2]

Label each class mask separately. Applying a foreground-component algorithm directly to a multiclass map can join neighbouring nonzero classes into the same region. Record handling of ignored pixels, scene borders and holes. If tiled inference is used, stitch labels across tile boundaries before counting objects, otherwise the tiling layout becomes part of the apparent object fragmentation.

Call these regions connected components when that is what they are. A component may contain several physical trees or fragments of one object. An evaluation of component recovery is still informative about map structure, provided it is not renamed individual-tree detection without suitable instance reference data.

Sources: [2]

Use a declared one-to-one matching rule

Construct a bipartite graph whose left nodes are reference objects and right nodes are predicted objects. An edge is allowed only when the pair satisfies a prespecified criterion, such as matching class and intersection-over-union above a threshold. A one-to-one assignment prevents one broad prediction from receiving credit for several distinct references and prevents several fragments from all counting as full detections of one object.

For a custom evaluation, one defensible rule is maximum-cardinality matching over eligible edges, followed by maximum total overlap to break ties. Other benchmarks use score-ordered greedy matching. These are different protocols and can produce different outcomes. Follow the benchmark exactly when comparing with its results; document the custom rule when introducing a diagnostic.

SciPy provides a linear-sum assignment solver, but a raw overlap matrix does not itself encode eligibility or the preference for match count. A full assignment can include invalid pairs. Enforce constraints, allow unmatched objects and inspect the selected pairs. The optimisation routine solves the objective supplied to it; it does not choose the scientific meaning of a detection. [3]

Sources: [3]

A one-pixel shift is a large error for a tiny object

Consider a 2 × 2 square reference and an equal-sized prediction shifted one column. Their intersection contains two pixels and their union six, giving IoU = 2/6, approximately 0.333. A 10 × 10 square shifted one column overlaps in 90 pixels with a union of 110, giving IoU approximately 0.818. Identical absolute displacement has very different effects across object sizes.

This does not make IoU wrong. It means the task needs to state whether accurate extent or approximate localisation is the priority. If a two-pixel object only supports a rough position at the sensor resolution, a centre-distance criterion in metres may be more interpretable. If the application requires the object boundary, overlap remains relevant despite its sensitivity.

Choose localisation tolerance from the measurement and reference process, not from the threshold that produces the largest score. Report sensitivity at a small prespecified set of tolerances if uncertainty warrants it. A permissive distance threshold can merge the identities of nearby objects, so maintain the one-to-one constraint and inspect crowded cases.

Synthetic masks translated by one column.
Reference footprintIntersectionUnionIoU
2 × 2 pixels2 pixels6 pixels0.333
10 × 10 pixels90 pixels110 pixels0.818

Count misses, splits, merges and false objects

After matching, matched pairs are true-positive objects, unmatched references are missed objects and unmatched predictions are false-positive objects. Object recall is matched references divided by all eligible references. Object precision is matched predictions divided by all eligible predictions. State the policy when the denominator is zero instead of silently inserting a favourable score.

Splits and merges are valuable additional diagnostics. A split occurs when several predicted components overlap one reference; a merge occurs when one prediction overlaps several references. These overlap relations should be computed separately from the one-to-one assignment, otherwise the assignment hides the structure by retaining only one edge. Specify a minimum overlap criterion so a single accidental pixel does not dominate the diagnostic.

A toy case with ten reference objects and twelve predictions might produce eight accepted matches: object recall is 80%, precision is 66.7%, two references are missed and four predictions remain unmatched. The confusion counts do not reveal whether the four are isolated false detections or fragments of matched objects. An overlap audit supplies that missing explanation.

Stratify by reference size, class and context

Calculate size strata from the reference objects rather than the predicted objects. Otherwise an oversized prediction can move a difficult tiny reference into a more favourable bin. State whether size means mask area, bounding-box extent or physical area. Keep the bins fixed across methods and show the number of reference objects in every bin.

Tiny-object recall should be accompanied by false detections. A model can recover more small objects by creating many small positive regions. Include precision or false objects per unit search area, then examine trade-offs across a fixed score threshold or score curve. The target-detection guide develops this distinction in detail.

Context strata can expose failure modes hidden by size alone: isolated versus touching objects, sunlit versus shadowed regions, or objects near a class boundary. Use reference-defined strata that can be reproduced. Avoid selecting only visually impressive crops after seeing predictions, and report when a category has too few objects for a stable comparison.

Keep extent and boundary quality visible

Detection success does not mean a good segmentation. Among matched pairs, report overlap or extent error separately. A distance-based matcher may accept a prediction centred correctly but much too large. A single summary that counts the object as found would miss that behaviour.

Boundary IoU was introduced to assess segmentation boundary quality more directly, particularly where mask overlap can overlook boundary changes on large objects. It is complementary to a match-count diagnostic. Boundary width, scale conventions and treatment of image edges still matter; use the published definition rather than inventing a similarly named erosion score. [4]

For very small masks, a boundary band may cover nearly the entire object. Do not claim that it cleanly isolates boundary behaviour at every scale. Report the fraction of each size group included in the boundary region and retain ordinary mask metrics. The boundary-annotation guide explains why uncertain reference alignment also limits interpretation.

Sources: [4]

Save a match ledger, not just a headline score

An object-level release should include reference and prediction IDs, class, reference size, score, eligibility statistic, accepted match and error category. Preserve connected-component settings, matching algorithm, threshold, tie-breaking rule and ignored-region policy. The ledger lets a reader verify that an apparent gain comes from recovered targets rather than a changed definition.

Inspect representative unmatched references and predictions from every size stratum. Keep those examples linked to the full ledger so the illustrations remain auditable. Retain the original pixel confusion matrix alongside object results; a method that preserves instances may still misclassify substantial surface area.

The strongest conclusion is usually narrow and useful: under this reference definition and matching tolerance, the method recovers more of these small objects at this false-object rate. That statement can be tested. A general claim that the model understands tiny objects needs evidence across scenes, annotation regimes and sensor resolutions.

Frequently asked questions

Can connected components replace instance annotations?

They provide a reproducible region definition, but touching physical objects may form one component. Name the evaluation according to the reference it actually uses.

Should tiny objects use a lower IoU threshold?

Only when the task and measurement uncertainty justify that protocol. Choose it before inspecting comparative test results and report sensitivity transparently.

Does higher object recall mean a better map?

Not by itself. Include false-object counts, extent quality and pixel metrics, because recall can rise through aggressive overprediction.

References and further reading

  1. Kirillov et al.: Panoptic Segmentation
  2. SciPy: scipy.ndimage.label
  3. SciPy: linear_sum_assignment
  4. Cheng et al.: Boundary IoU, CVPR 2021

Reader feedback

— reads— comments

Reads since 1 October 2026: at least 15 seconds with the article visible, counted once per browser per day. Reactions are anonymous and can be changed.

Discuss this article

Ask a technical question, challenge an assumption or share evidence from your own work.

Your name and comment will be public after approval. New comments wait for approval. No email required. Keep it respectful and relevant; no personal information or spam. Plain text, up to 2,000 characters.

Owner: manage comments