Skip to navigation

Evaluate interactive instance segmentation

Overview

Measures what a click-to-segment model actually costs on your data. A simulated annotator clicks out every labeled object in a dataset, and the report says how many clicks the model needs to produce an acceptable mask, how many objects it never finishes, how good the very first click is, and what that adds up to in annotator-hours.

This is the number to know before switching the Smart Tool on for a team. A model that tops a public leaderboard can still need twice as many clicks on your imagery, and the only way to find out is to measure it on your own objects.

The node measures one model. To find out which of several is cheapest, run it once per deployment and feed the evaluations into Compare interactive instance segmentation.

Prerequisites

RequirementWhat you need
A running deploymentServe SAM2, Serve ClickSEG or any deployment answering the same routes. Start it first - the node does not start it, and it stays busy for the whole run.
A labeled datasetMask annotations: bitmap, polygon or alpha mask. Boxes and points are skipped. A few dozen hand-labeled images are enough.
A model version (optional)The registry version the deployment serves. Without it the report is still produced, but the run is not recorded and cannot be compared.

How it works

1

Connects to the deployment and reads which weights it is holding, failing early if it is not running.

2

Reads every mask annotation in the dataset, samples down to the object cap, and downloads the images. The same dataset, seed and caps always select the same objects.

3

Clicks each object out. The first click goes at the point farthest from the object’s boundary, and each later click at the centre of the largest region the model got wrong - positive where the mask is missing, negative where it is spurious.

4

Repeats the run with perturbed clicks, where each one is displaced by a bounded random offset, averaged over several seeds.

5

Aggregates into clicks-to-target, unfinished objects, IoU after k clicks, boundary IoU and the encoder/decoder latency split, with bootstrap intervals over objects.

6

Publishes the report and records the run against the model version, so a comparison can rank it later.

FAQ

NoC is the average number of clicks to reach the target mask quality, the headline number in the interactive segmentation literature, where lower is better. NoF counts the objects that never got there inside the click budget, which an annotator ends up drawing by hand. They are always reported together: a model can post a flattering average by giving up on hard objects rather than working through them.

Oracle puts every click at the exact centre of the largest error. It is what published papers measure, so it is what makes these numbers comparable with them - but nobody clicks that precisely. Perturbed displaces each click by a bounded random offset and repeats over several seeds, which shows whether the result survives the way people actually click. Where the two disagree, the perturbed column is the one that predicts what your team will experience.

Roughly objects × click budget × (1 + perturbation seeds) model calls. At the defaults - 100 objects, 20 clicks, 3 seeds - that is around 8,000 calls. On a GPU deployment answering in 50 ms that is a few minutes, and on a CPU deployment it can be an hour. Lower Maximum objects for a quick look.

It doesn’t, by default. Clicks only is the standard protocol and the only mode comparable with published numbers. Box + clicks reproduces the labeling-tool workflow where the annotator drags a box first, but that box is taken from the ground-truth bounds, which is more precise than a hand-drawn one and makes every model look better than it will be in practice.

Because that is what makes the run comparable. The Compare node takes evaluations, not reports, so it can check that two runs measured the same objects the same way before ranking them. Leave Model empty and you still get the report - you just cannot feed it into a comparison.

completion90 - the share of objects that reached 90% IoU inside the budget. The model registry sorts evaluations by descending value, and NoC is better when it is lower, so ranking on NoC would surface the model that costs the most clicks. Every NoC value is still recorded alongside it.

One of four reasons, and the message says which: the dataset has no images, none of them carry mask annotations (boxes and points are skipped on purpose), the class filter matched nothing, or every mask is below Minimum object area.

Real objects from your dataset with the ground truth and the model’s mask side by side, and the simulated clicks drawn on top. Each object appears twice: after one click, and at the click where it reached the target. They are chosen to span the shape-complexity range rather than sampled at random, so the gallery shows the easy and the hard end.

Only if they used the same protocol on the same dataset - the same budget, targets, policies, refinement setting and seed. The Compare node checks all of that and refuses runs that differ, because clicks spent on different objects under different rules are not comparable however similar the numbers look.

Inputs

Deployment
deploymentRequired

Running interactive segmentation deployment to measure, such as Serve SAM2 or Serve ClickSEG. It has to be running before this node starts, and it stays busy for the whole run. Key: DEPLOYMENT.

Dataset
datasetRequired

Labeled dataset to measure on. Every mask annotation (bitmap, polygon or alpha mask) becomes one object the simulated annotator has to click out. A few dozen hand-labeled images are enough for a usable measurement. Shows class information for the selected dataset. Key: DATASET.

Model
model

Model version this deployment serves. The run is recorded as an evaluation of that version, which is what lets Compare interactive instance segmentation rank it against another model. Leave empty to produce the report without registering it. Key: MODEL.

Target IoU
selectDefaults to 0.9Required

Mask quality counted as good enough to accept. The report always shows both 85% and 90%, and this picks which one the headline number uses. Key: TARGET_IOU.

Options:

  • 85% IoU (accept with light cleanup) (0.85)
  • 90% IoU (accept as-is) (0.9)
Click budget
integerDefaults to 20Required

Maximum clicks the simulated annotator spends on one object before giving up. 20 is the value used across the interactive segmentation literature, and changing it makes these numbers incomparable with published ones. Minimum: 1. Maximum: 100. Key: CLICK_BUDGET.

Maximum objects
integerDefaults to 100

Cap on how many objects are measured, sampled deterministically from the whole dataset. Runtime grows with this number multiplied by the click budget. Leave empty to use every object. Minimum: 1. Key: MAX_INSTANCES.

Classes
ontology

Classes to measure. Objects of every other class are ignored, and leaving this empty measures all of them. Values come from DATASET. Key: CLASSES.

Preview images
integerDefaults to 8Required

How many objects to show as pictures in the report - the ground truth next to the model’s mask, with the simulated clicks drawn on top. They are chosen to span the shape-complexity range of the dataset rather than sampled at random. Set to 0 to skip the gallery. Minimum: 0. Maximum: 24. Key: PREVIEW_IMAGES.

Objects per day
integerDefaults to 2000Required

How many objects your team labels in a day. Used only to translate clicks and latency into annotator-hours. Minimum: 1. Key: OBJECTS_PER_DAY.

Seconds per click
numberDefaults to 1.4Required

Human time per click - decide, move the pointer, click - used in the throughput model. The measured model wait is added on top. Minimum: 0.1. Step: 0.1. Key: SECONDS_PER_CLICK.

Perturbed clicks
booleanDefaults to trueRequired

Also run the sweep where each click misses its ideal spot by a bounded random offset. This is what shows whether the result survives imprecise clicking, which is how real annotators work. Key: PERTURBED_POLICY.

Perturbation seeds
integerDefaults to 3Required

Repeats of the perturbed run. Perturbed clicks are random, so a single run is not a measurement. Results are averaged over the seeds and their spread is reported. Minimum: 1. Maximum: 10. Visible when PERTURBED_POLICY is True. Key: PERTURB_SEEDS.

Perturbation radius
numberDefaults to 1.0Required

How far a perturbed click may land from the ideal spot, as a multiple of the error region’s inscribed radius. 1.0 keeps most clicks inside the region, above 1.0 they routinely miss it. Minimum: 0.1. Maximum: 3.0. Step: 0.1. Visible when PERTURBED_POLICY is True. Key: PERTURB_RADIUS.

Prompt mode
selectDefaults to clicks_onlyRequired

Clicks only is the standard protocol and the only mode comparable with published numbers. Box and clicks reproduces the labeling-tool workflow where the annotator first drags a box. That box comes from the ground-truth bounds, which makes every model look better than it would with a hand-drawn one. Key: PROMPT_MODE.

Options:

  • Clicks only (standard protocol) (clicks_only)
  • Box + clicks (labeling-tool workflow) (bbox_and_clicks)
Feed previous mask
booleanDefaults to trueRequired

Send the mask from the previous click back as a starting point, which is what an interactive session does. Turning this off makes every click a fresh prediction and inflates the click count. Key: FEED_PREVIOUS_MASK.

Minimum object area
integerDefaults to 256Required

Objects smaller than this many pixels are skipped. Very small masks are dominated by annotation noise and produce IoU values no model can act on. Minimum: 1. Key: MIN_INSTANCE_AREA.

Boundary band
selectDefaults to 0.02Required

Width of the contour band used for boundary IoU, as a share of the image diagonal. 2% is the value used in the Boundary IoU paper. Key: BOUNDARY_BAND.

Options:

  • 1% of image diagonal (strictest) (0.01)
  • 2% of image diagonal (default) (0.02)
  • 3% of image diagonal (0.03)
Request settings
yaml

Settings forwarded verbatim in every segmentation request, such as a confidence or probability threshold. Use it to override a deployment default for this run only. Key: MODEL_SETTINGS.

Seed
integerDefaults to 42Required

Seed for object sampling and for the perturbed click policy. Two runs that are to be compared must use the same one, because it decides which objects were measured. Key: SEED.

Outputs

Evaluation report
report

Interactive segmentation evaluation report - convergence curve, clicks to target, failures, latency split, breakdowns and the per-object table a comparison reads. Shown as an artifact. Key: REPORT_ID.

Evaluation
model_evaluation

The evaluation row this run recorded on the model version, ready to wire into Compare interactive instance segmentation. Empty when no model was selected. Key: EVALUATION_ID.

Clicks to target
string

Average clicks the model needs to reach the target IoU, shown as a badge. Shown on the node as a badge. Key: NOC.

Failed objects
string

Objects that never reached the target inside the click budget, shown as a badge. Shown on the node as a badge. Key: NOF.

Models and configuration

The model is whatever the selected deployment is serving - this node loads no weights of its own, which is what lets one node measure SAM2, ClickSEG and anything else answering the same routes.

Target IoU, Click budget and the click policy settings define the experiment. They are recorded in the report, and two runs may only be compared when they match, so change them deliberately rather than per run. The defaults - 90% IoU, 20 clicks, perturbed sweep over 3 seeds - are the values used across the interactive segmentation literature.

Maximum objects is the runtime dial. Cost grows with objects multiplied by the click budget multiplied by the seeds.

Request settings are forwarded verbatim to the deployment with every call, for overriding a confidence or probability threshold for this run only.

Report

The report leads with the clicks-to-target number, the unfinished-object count and the quality of the very first click, then works through the convergence curve, the breakdowns by object size, shape complexity and class, and the encoder/decoder latency split. It carries a preview gallery of real objects with the model’s mask and the simulated clicks drawn on top.

It also carries two machine-readable files: the aggregated numbers and a row per measured object. Those are what the Compare node reads, and they are why every figure on the page is re-derivable rather than asserted.

Runtime

The node runs on the default worker and needs no GPU of its own: the model stays in the deployment, and this node only sends clicks and measures what comes back. The deployment holds its GPU for the whole run.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Evaluate interactive instance segmentation",
"description": "Measure how much clicking a running interactive segmentation deployment costs on your own data. A simulated annotator clicks out every labeled object, and the report says how many clicks the model needs to reach an acceptable mask (NoC), how many objects it never finishes (NoF), how good the very first click is, and what it all costs in annotator-hours.",
"category": "Evaluate",
"namespace": "ovalbee",
"templateKey": "evaluate/evaluate_interactive_instance_segmentation",
"version": "v1",
"inputs": [
{
"key": "DEPLOYMENT",
"label": "Deployment",
"type": "deployment",
"description": "Running interactive segmentation deployment to measure, such as Serve SAM2 or Serve ClickSEG. It has to be running before this node starts, and it stays busy for the whole run.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"task_type": "instance_segmentation",
"smart_annotation": "true"
}
},
{
"key": "DATASET",
"label": "Dataset",
"type": "dataset",
"description": "Labeled dataset to measure on. Every mask annotation (bitmap, polygon or alpha mask) becomes one object the simulated annotator has to click out. A few dozen hand-labeled images are enough for a usable measurement.",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"creatable": false,
"show_classes_info": true
}
},
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "Model version this deployment serves. The run is recorded as an evaluation of that version, which is what lets Compare interactive instance segmentation rank it against another model. Leave empty to produce the report without registering it.",
"required": false,
"default": null,
"visibleWhen": null,
"options": {
"scope": "my",
"task_type": "instance_segmentation"
}
},
{
"key": "TARGET_IOU",
"label": "Target IoU",
"type": "select",
"description": "Mask quality counted as good enough to accept. The report always shows both 85% and 90%, and this picks which one the headline number uses.",
"required": true,
"default": "0.9",
"visibleWhen": null,
"options": {
"options": [
{
"label": "85% IoU (accept with light cleanup)",
"value": "0.85"
},
{
"label": "90% IoU (accept as-is)",
"value": "0.9"
}
]
}
},
{
"key": "CLICK_BUDGET",
"label": "Click budget",
"type": "number",
"description": "Maximum clicks the simulated annotator spends on one object before giving up. 20 is the value used across the interactive segmentation literature, and changing it makes these numbers incomparable with published ones.",
"required": true,
"default": 20,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1,
"max": 100
}
},
{
"key": "MAX_INSTANCES",
"label": "Maximum objects",
"type": "number",
"description": "Cap on how many objects are measured, sampled deterministically from the whole dataset. Runtime grows with this number multiplied by the click budget. Leave empty to use every object.",
"required": false,
"default": 100,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1
}
},
{
"key": "CLASSES",
"label": "Classes",
"type": "ontology",
"description": "Classes to measure. Objects of every other class are ignored, and leaving this empty measures all of them.",
"required": false,
"default": null,
"visibleWhen": null,
"options": {
"ref": "DATASET",
"selectable": true
}
},
{
"key": "PREVIEW_IMAGES",
"label": "Preview images",
"type": "number",
"description": "How many objects to show as pictures in the report - the ground truth next to the model's mask, with the simulated clicks drawn on top. They are chosen to span the shape-complexity range of the dataset rather than sampled at random. Set to 0 to skip the gallery.",
"required": true,
"default": 8,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 0,
"max": 24
}
},
{
"key": "OBJECTS_PER_DAY",
"label": "Objects per day",
"type": "number",
"description": "How many objects your team labels in a day. Used only to translate clicks and latency into annotator-hours.",
"required": true,
"default": 2000,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1
}
},
{
"key": "SECONDS_PER_CLICK",
"label": "Seconds per click",
"type": "number",
"description": "Human time per click - decide, move the pointer, click - used in the throughput model. The measured model wait is added on top.",
"required": true,
"default": 1.4,
"visibleWhen": null,
"options": {
"type": "float",
"min": 0.1,
"step": 0.1
}
},
{
"key": "PERTURBED_POLICY",
"label": "Perturbed clicks",
"type": "boolean",
"description": "Also run the sweep where each click misses its ideal spot by a bounded random offset. This is what shows whether the result survives imprecise clicking, which is how real annotators work.",
"required": true,
"default": true,
"visibleWhen": null
},
{
"key": "PERTURB_SEEDS",
"label": "Perturbation seeds",
"type": "number",
"description": "Repeats of the perturbed run. Perturbed clicks are random, so a single run is not a measurement. Results are averaged over the seeds and their spread is reported.",
"required": true,
"default": 3,
"visibleWhen": {
"key": "PERTURBED_POLICY",
"operator": "equals",
"value": true
},
"options": {
"type": "integer",
"min": 1,
"max": 10
}
},
{
"key": "PERTURB_RADIUS",
"label": "Perturbation radius",
"type": "number",
"description": "How far a perturbed click may land from the ideal spot, as a multiple of the error region's inscribed radius. 1.0 keeps most clicks inside the region, above 1.0 they routinely miss it.",
"required": true,
"default": 1.0,
"visibleWhen": {
"key": "PERTURBED_POLICY",
"operator": "equals",
"value": true
},
"options": {
"type": "float",
"min": 0.1,
"max": 3.0,
"step": 0.1
}
},
{
"key": "PROMPT_MODE",
"label": "Prompt mode",
"type": "select",
"description": "Clicks only is the standard protocol and the only mode comparable with published numbers. Box and clicks reproduces the labeling-tool workflow where the annotator first drags a box. That box comes from the ground-truth bounds, which makes every model look better than it would with a hand-drawn one.",
"required": true,
"default": "clicks_only",
"visibleWhen": null,
"options": {
"options": [
{
"label": "Clicks only (standard protocol)",
"value": "clicks_only"
},
{
"label": "Box + clicks (labeling-tool workflow)",
"value": "bbox_and_clicks"
}
]
}
},
{
"key": "FEED_PREVIOUS_MASK",
"label": "Feed previous mask",
"type": "boolean",
"description": "Send the mask from the previous click back as a starting point, which is what an interactive session does. Turning this off makes every click a fresh prediction and inflates the click count.",
"required": true,
"default": true,
"visibleWhen": null
},
{
"key": "MIN_INSTANCE_AREA",
"label": "Minimum object area",
"type": "number",
"description": "Objects smaller than this many pixels are skipped. Very small masks are dominated by annotation noise and produce IoU values no model can act on.",
"required": true,
"default": 256,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 1
}
},
{
"key": "BOUNDARY_BAND",
"label": "Boundary band",
"type": "select",
"description": "Width of the contour band used for boundary IoU, as a share of the image diagonal. 2% is the value used in the Boundary IoU paper.",
"required": true,
"default": "0.02",
"visibleWhen": null,
"options": {
"options": [
{
"label": "1% of image diagonal (strictest)",
"value": "0.01"
},
{
"label": "2% of image diagonal (default)",
"value": "0.02"
},
{
"label": "3% of image diagonal",
"value": "0.03"
}
]
}
},
{
"key": "MODEL_SETTINGS",
"label": "Request settings",
"type": "yaml",
"description": "Settings forwarded verbatim in every segmentation request, such as a confidence or probability threshold. Use it to override a deployment default for this run only.",
"required": false,
"default": null,
"visibleWhen": null
},
{
"key": "SEED",
"label": "Seed",
"type": "number",
"description": "Seed for object sampling and for the perturbed click policy. Two runs that are to be compared must use the same one, because it decides which objects were measured.",
"required": true,
"default": 42,
"visibleWhen": null,
"options": {
"type": "integer"
}
}
],
"outputs": [
{
"key": "REPORT_ID",
"label": "Evaluation report",
"type": "report",
"kind": "interactive_segmentation_evaluation_report_v1",
"description": "Interactive segmentation evaluation report - convergence curve, clicks to target, failures, latency split, breakdowns and the per-object table a comparison reads.",
"artifact": true,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "EVALUATION_ID",
"label": "Evaluation",
"type": "model_evaluation",
"description": "The evaluation row this run recorded on the model version, ready to wire into Compare interactive instance segmentation. Empty when no model was selected.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": false
},
{
"key": "NOC",
"label": "Clicks to target",
"type": "string",
"description": "Average clicks the model needs to reach the target IoU, shown as a badge.",
"artifact": false,
"badge": true,
"badgeOpens": null,
"hidden": false
},
{
"key": "NOF",
"label": "Failed objects",
"type": "string",
"description": "Objects that never reached the target inside the click budget, shown as a badge.",
"artifact": false,
"badge": true,
"badgeOpens": null,
"hidden": false
}
],
"widgets": {
"widget": {
"id": "report-preview",
"settings": {
"reportAsset": {
"type": "variable",
"value": "self.outputs.REPORT_ID"
}
}
}
}
}

References