madoo.image-instances/v1
Madoo image instances — The people, animals and objects a model found in an image (80 COCO classes): class, score, box, mask area and edges reached of each instance, and which ones form the output mask (Instance Segment). A prediction, not a measurement.
| Reference | madoo.image-instances/v1 |
| Schema id | urn:madoo:schema:image-instances:v1 |
| Version | 1.0.0 |
| Served at | GET /api/v1/json-schemas/madoo.image-instances/v1 · MCP get_json_schema |
Where it appears
Section titled “Where it appears”- Produced by:
image/instance_segment→instances
Fields
Section titled “Fields”| Field | Type | Required | Rules | Description |
|---|---|---|---|---|
schema |
"madoo.image-instances/v1" |
yes | ||
algorithm_version |
string | yes | ||
image |
object | yes | ||
image.width |
integer | yes | ≥ 1 | After EXIF orientation. |
image.height |
integer | yes | ≥ 1 | |
image.orientation_applied |
boolean | yes | True when the EXIF orientation rotated or mirrored the image. | |
color |
object | yes | ||
color.working_space |
"srgb-8" |
yes | ||
color.profile_policy |
one of "srgb", "converted", "assumed_srgb" |
yes | srgb: the file is sRGB; converted: its ICC profile was converted to sRGB; assumed_srgb: an RGB image without a profile, read as sRGB. | |
color.source_depth |
integer or null | yes | Bits per channel of the file. | |
color.analysis_depth |
8 |
yes | ||
warnings |
array of string | yes | Facts that limit how the numbers may be read: a JPEG source (compression can contaminate detail measurements), several frames or pages (the first was measured), a source deeper than 8 bits (measured at 8 bits). | |
model |
object | yes | ||
model.name |
string | yes | ||
model.version |
string | yes | ||
model.sha256 |
string | yes | pattern “^[0-9a-f]{64}$” | |
model.label_set |
string | yes | coco-80 in v1. | |
model.input_size |
integer | yes | Side of the square the image is resized to for the model, in pixels. | |
model.runtime |
string | yes | For example onnxruntime 1.30.0 cpu. | |
settings |
object | yes | ||
settings.score_threshold |
number | yes | ||
settings.max_instances |
integer | yes | ||
settings.mask_threshold |
number | yes | ||
settings.min_area_px |
integer | yes | ||
settings.select |
one of "all", "largest", "highest_score" |
yes | ||
settings.class_filter |
array or null | yes | The class names kept, or null for every class. | |
settings.region |
object or null | yes | ||
instances |
array of objects | yes | Sorted by score (descending), then area, then y, x, then class_id. | |
instances[].id |
integer | yes | ≥ 1 | Stable within this run only. |
instances[].class_id |
integer | yes | ≥ 1; ≤ 90 | COCO category id. |
instances[].class_name |
string | yes | ||
instances[].score |
number | yes | ≥ 0; ≤ 1 | |
instances[].bbox |
object | yes | Pixels of the oriented image, origin top left; covers columns x..x+width-1 and rows y..y+height-1. | |
instances[].bbox.x |
integer | yes | ≥ 0 | |
instances[].bbox.y |
integer | yes | ≥ 0 | |
instances[].bbox.width |
integer | yes | ≥ 1 | |
instances[].bbox.height |
integer | yes | ≥ 1 | |
instances[].area_px |
integer | yes | ≥ 0 | Pixels of the binarized mask. |
instances[].touches_border |
object | yes | Edges of the segmented area (the image, or the region) the mask reaches. | |
instances[].touches_border.top |
boolean | yes | ||
instances[].touches_border.right |
boolean | yes | ||
instances[].touches_border.bottom |
boolean | yes | ||
instances[].touches_border.left |
boolean | yes | ||
instances[].selected |
boolean | yes | True for the instances the mask output is made of. | |
unassigned_share |
number or null | yes | ≥ 0; ≤ 1 | Share of the segmented area (the image, or the region) covered by no instance; null when the area is empty. |
The complete schema
Section titled “The complete schema”madoo.image-instances/v1 (JSON Schema)
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:madoo:schema:image-instances:v1", "title": "Madoo image instances", "description": "What Instance Segment (image/instance_segment) found: the instances a model recognized above the score threshold, each with class, score, box and mask area in pixels of the oriented image. A prediction, not a measurement; scores are not calibrated probabilities. Pixels of no instance are unassigned, not background.", "type": "object", "required": [ "schema", "algorithm_version", "image", "color", "warnings", "model", "settings", "instances", "unassigned_share" ], "properties": { "schema": { "const": "madoo.image-instances/v1" }, "algorithm_version": { "type": "string" }, "image": { "$ref": "#/$defs/image" }, "color": { "$ref": "#/$defs/color" }, "warnings": { "$ref": "#/$defs/warnings" }, "model": { "type": "object", "required": [ "name", "version", "sha256", "label_set", "input_size", "runtime" ], "properties": { "name": { "type": "string" }, "version": { "type": "string" }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "label_set": { "type": "string", "description": "coco-80 in v1." }, "input_size": { "type": "integer", "description": "Side of the square the image is resized to for the model, in pixels." }, "runtime": { "type": "string", "description": "For example onnxruntime 1.30.0 cpu." } } }, "settings": { "type": "object", "required": [ "score_threshold", "max_instances", "mask_threshold", "min_area_px", "select", "class_filter", "region" ], "properties": { "score_threshold": { "type": "number" }, "max_instances": { "type": "integer" }, "mask_threshold": { "type": "number" }, "min_area_px": { "type": "integer" }, "select": { "enum": [ "all", "largest", "highest_score" ] }, "class_filter": { "type": [ "array", "null" ], "items": { "type": "string" }, "description": "The class names kept, or null for every class." }, "region": { "oneOf": [ { "$ref": "#/$defs/rect" }, { "type": "null" } ] } } }, "instances": { "type": "array", "description": "Sorted by score (descending), then area, then y, x, then class_id.", "items": { "type": "object", "required": [ "id", "class_id", "class_name", "score", "bbox", "area_px", "touches_border", "selected" ], "properties": { "id": { "type": "integer", "minimum": 1, "description": "Stable within this run only." }, "class_id": { "type": "integer", "minimum": 1, "maximum": 90, "description": "COCO category id." }, "class_name": { "type": "string" }, "score": { "type": "number", "minimum": 0, "maximum": 1 }, "bbox": { "$ref": "#/$defs/rect" }, "area_px": { "type": "integer", "minimum": 0, "description": "Pixels of the binarized mask." }, "touches_border": { "type": "object", "description": "Edges of the segmented area (the image, or the region) the mask reaches.", "required": [ "top", "right", "bottom", "left" ], "properties": { "top": { "type": "boolean" }, "right": { "type": "boolean" }, "bottom": { "type": "boolean" }, "left": { "type": "boolean" } } }, "selected": { "type": "boolean", "description": "True for the instances the mask output is made of." } } } }, "unassigned_share": { "type": [ "number", "null" ], "minimum": 0, "maximum": 1, "description": "Share of the segmented area (the image, or the region) covered by no instance; null when the area is empty." } }, "$defs": { "rect": { "type": "object", "required": [ "x", "y", "width", "height" ], "properties": { "x": { "type": "integer", "minimum": 0 }, "y": { "type": "integer", "minimum": 0 }, "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 } }, "description": "Pixels of the oriented image, origin top left; covers columns x..x+width-1 and rows y..y+height-1." }, "image": { "type": "object", "required": [ "width", "height", "orientation_applied" ], "properties": { "width": { "type": "integer", "minimum": 1, "description": "After EXIF orientation." }, "height": { "type": "integer", "minimum": 1 }, "orientation_applied": { "type": "boolean", "description": "True when the EXIF orientation rotated or mirrored the image." } } }, "color": { "type": "object", "required": [ "working_space", "profile_policy", "source_depth", "analysis_depth" ], "properties": { "working_space": { "const": "srgb-8" }, "profile_policy": { "enum": [ "srgb", "converted", "assumed_srgb" ], "description": "srgb: the file is sRGB; converted: its ICC profile was converted to sRGB; assumed_srgb: an RGB image without a profile, read as sRGB." }, "source_depth": { "type": [ "integer", "null" ], "description": "Bits per channel of the file." }, "analysis_depth": { "const": 8 } } }, "sampling": { "type": "object", "required": [ "method", "step", "eligible_pixels", "sampled_pixels" ], "properties": { "method": { "enum": [ "grid", "full" ] }, "step": { "type": "integer", "minimum": 1 }, "eligible_pixels": { "type": "integer", "minimum": 0, "description": "Pixels of the region that may be measured: opaque enough and inside the mask." }, "sampled_pixels": { "type": "integer", "minimum": 0 } } }, "warnings": { "type": "array", "items": { "type": "string" }, "description": "Facts that limit how the numbers may be read: a JPEG source (compression can contaminate detail measurements), several frames or pages (the first was measured), a source deeper than 8 bits (measured at 8 bits)." }, "status": { "enum": [ "ok", "not_observable" ], "description": "not_observable: the measurement is undefined here (see reason); its numbers are null. Zero is a valid measurement, never a stand-in for null." }, "reason": { "type": [ "string", "null" ], "enum": [ null, "no_eligible_pixels", "too_few_samples", "zero_variance", "no_eligible_patches", "mask_empty_in_region" ] } }}