Skip to main content

Bounding Box Area Mismatch

Available

object_detection.bbox_area_mismatch

How closely the model's predicted box sizes match the true object sizes, per class.

Contract​

FieldValue
version1.1.0
metric_typepointwise
scorer_contractper_row
directionlower_is_better
entrypointaip_metrics_object_detection.answered.bbox_area_mismatch
target_kindNone

Required columns​

  • image_id
  • label
  • predictions

Accepted schemas​

[
{
"name": "gdi_image_v1",
"task_types": [
"detection"
]
}
]

Methodology​

  1. Deterministic - no LLM. Uses Resaro's cv-eval library (area-based, no IoU matching).
  2. Group predicted and ground-truth box areas by class.
  3. For each class present in both, compute the relative area error |mean predicted - mean truth| / mean truth.
  4. Average the per-class relative errors (0.0 when no class is shared).

Score semantics​

Scores capture the relative difference between predicted and true box areas. A low score means box sizes closely match the ground truth; a high score means large size errors. Lower is better.

Worked example​

One class with a 10x10 ground-truth box (area 100) and a 12x12 predicted box (area 144) -> relative area error = |144 - 100| / 100 = 0.44.

Configuration schema​

{
"properties": {
"inverted": {
"default": false,
"title": "Inverted",
"type": "boolean",
"x-aip-param-role": "scoring_metadata"
},
"label_map": {
"anyOf": [
{
"additionalProperties": {
"type": "integer"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Label Map"
},
"max": {
"default": 1.0,
"title": "Max",
"type": "number",
"x-aip-param-role": "scoring_metadata"
},
"metric_name": {
"default": "bbox_area_mismatch",
"title": "Metric Name",
"type": "string",
"x-aip-param-role": "scoring_metadata"
},
"min": {
"default": 0.0,
"title": "Min",
"type": "number",
"x-aip-param-role": "scoring_metadata"
},
"weight": {
"default": 1.0,
"title": "Weight",
"type": "number",
"x-aip-param-role": "scoring_metadata"
}
},
"title": "InitializationConfig",
"type": "object"
}

Execution​

{
"emits_metric_family": false,
"function_name": null,
"max_concurrency": null,
"processing_kind": "cpu",
"stream_batch_size": null,
"timeout_seconds": 60
}

Complete manifest​

accepts:
- name: gdi_image_v1
task_types:
- detection
config_schema:
properties:
inverted:
default: false
title: Inverted
type: boolean
x-aip-param-role: scoring_metadata
label_map:
anyOf:
- additionalProperties:
type: integer
type: object
- type: 'null'
default: null
title: Label Map
max:
default: 1.0
title: Max
type: number
x-aip-param-role: scoring_metadata
metric_name:
default: bbox_area_mismatch
title: Metric Name
type: string
x-aip-param-role: scoring_metadata
min:
default: 0.0
title: Min
type: number
x-aip-param-role: scoring_metadata
weight:
default: 1.0
title: Weight
type: number
x-aip-param-role: scoring_metadata
title: InitializationConfig
type: object
dependencies: []
description: How closely do the model's box sizes match the true objects?
direction: lower_is_better
display_name: Bounding Box Area Mismatch
entrypoint: aip_metrics_object_detection.answered.bbox_area_mismatch
execution:
emits_metric_family: false
function_name: null
max_concurrency: null
processing_kind: cpu
stream_batch_size: null
timeout_seconds: 60
kind: metric
manifest_version: '1'
max_prompt_slots: 0
metric_metadata:
class_attribution:
artifact_type: class_attribution
version: 1
methodology:
- Deterministic - no LLM. Uses Resaro's cv-eval library (area-based, no IoU matching).
- Group predicted and ground-truth box areas by class.
- For each class present in both, compute the relative area error |mean predicted
- mean truth| / mean truth.
- Average the per-class relative errors (0.0 when no class is shared).
score_semantics: Scores capture the relative difference between predicted and true
box areas. A low score means box sizes closely match the ground truth; a high
score means large size errors. Lower is better.
summary: How closely the model's predicted box sizes match the true object sizes,
per class.
worked_example: One class with a 10x10 ground-truth box (area 100) and a 12x12 predicted
box (area 144) -> relative area error = |144 - 100| / 100 = 0.44.
metric_type: pointwise
name: object_detection.bbox_area_mismatch
partition_types: []
required_columns:
- image_id
- label
- predictions
required_kinds: []
scorer_contract: per_row
target_kind: null
unsupported_trace_shapes: []
version: 1.1.0