False Positive Spatial Heatmap
object_detection.false_positive_spatial_heatmap
Counts spatial locations of false-positive detections across an object-detection run and returns a 32x32 density grid plus per-class false-positive counts; does not produce a scalar score.
Contract
| Field | Value |
|---|---|
version | 1.0.0 |
metric_type | pointwise |
scorer_contract | full_dataset |
direction | higher_is_better |
entrypoint | aip_scorers_object_detection.object_detection.false_positive_spatial_heatmap |
target_kind | None |
Required columns
image_idlabelpredictionswidthheight
Accepted schemas
[
{
"name": "gdi_image_v1",
"task_types": [
"detection"
]
}
]
Methodology
- Deterministic - no LLM. Uses Resaro's cv-eval library (FalsePositiveSpatialHeatmap) with pairwise IoU from torchvision (ops.box_iou).
- Build a class map from the ground-truth and prediction vocabulary and convert every image's boxes; ids are assigned alphabetically and are local to this run, so the artifact reports false positives by class name rather than by id.
- For each predicted box, match it against ground truth at the configured IoU threshold; an unmatched prediction is a false positive.
- Accumulate every false positive's box centre into a fixed-size spatial grid (32x32 by default) covering the full frame, and tally false positives per class, running the count over the whole dataset in one pass.
Score semantics
direction is a required placeholder (higher is better) that this op cannot honor by design: it produces no scalar score, so nothing is ranked or graded A-E. Read the artifact only - the spatial density grid and per-class false-positive counts - never this field. The inherited min/max/weight/inverted normalisation fields are likewise inert for this op.
Worked example
Two false positives on a 1000x1000 image whose box centres are at x=100, y=880 and x=110, y=900, both of class "car": on a 32x32 grid each cell spans 31.25 px, so both centres fall in row 28, column 3 - that cell reads 2 and every other cell reads 0. false_positives_by_class is keyed by class name, so it reads {"car": 2}. A run with no false positives reports the same full 32x32 grid with every cell zero and an empty class map, rather than an empty artifact or an error. No aggregate score is produced in either case, by design.
Configuration schema
{
"properties": {
"grid_size": {
"default": [
32,
32
],
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"exclusiveMinimum": 0,
"maximum": 128,
"type": "integer"
},
{
"exclusiveMinimum": 0,
"maximum": 128,
"type": "integer"
}
],
"title": "Grid Size",
"type": "array"
},
"inverted": {
"default": false,
"title": "Inverted",
"type": "boolean",
"x-aip-param-role": "scoring_metadata"
},
"iou_threshold": {
"default": 0.5,
"title": "Iou Threshold",
"type": "number"
},
"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": "false_positive_spatial_heatmap",
"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": "object_detection.false_positive_spatial_heatmap",
"max_concurrency": null,
"processing_kind": "cpu",
"stream_batch_size": null,
"timeout_seconds": 600
}
Complete manifest
accepts:
- name: gdi_image_v1
task_types:
- detection
config_schema:
properties:
grid_size:
default:
- 32
- 32
maxItems: 2
minItems: 2
prefixItems:
- exclusiveMinimum: 0
maximum: 128
type: integer
- exclusiveMinimum: 0
maximum: 128
type: integer
title: Grid Size
type: array
inverted:
default: false
title: Inverted
type: boolean
x-aip-param-role: scoring_metadata
iou_threshold:
default: 0.5
title: Iou Threshold
type: number
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: false_positive_spatial_heatmap
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: Spatial heatmap of false-positive detections over the full object-detection
dataset. Artifact-only — produces no scalar score.
direction: higher_is_better
display_name: False Positive Spatial Heatmap
entrypoint: aip_scorers_object_detection.object_detection.false_positive_spatial_heatmap
execution:
emits_metric_family: false
function_name: object_detection.false_positive_spatial_heatmap
max_concurrency: null
processing_kind: cpu
stream_batch_size: null
timeout_seconds: 600
kind: metric
manifest_version: '1'
max_prompt_slots: 0
metric_metadata:
methodology:
- Deterministic - no LLM. Uses Resaro's cv-eval library (FalsePositiveSpatialHeatmap)
with pairwise IoU from torchvision (ops.box_iou).
- Build a class map from the ground-truth and prediction vocabulary and convert
every image's boxes; ids are assigned alphabetically and are local to this run,
so the artifact reports false positives by class name rather than by id.
- For each predicted box, match it against ground truth at the configured IoU threshold;
an unmatched prediction is a false positive.
- Accumulate every false positive's box centre into a fixed-size spatial grid (32x32
by default) covering the full frame, and tally false positives per class, running
the count over the whole dataset in one pass.
score_semantics: 'direction is a required placeholder (higher is better) that this
op cannot honor by design: it produces no scalar score, so nothing is ranked or
graded A-E. Read the artifact only - the spatial density grid and per-class false-positive
counts - never this field. The inherited min/max/weight/inverted normalisation
fields are likewise inert for this op.'
summary: Counts spatial locations of false-positive detections across an object-detection
run and returns a 32x32 density grid plus per-class false-positive counts; does
not produce a scalar score.
worked_example: 'Two false positives on a 1000x1000 image whose box centres are
at x=100, y=880 and x=110, y=900, both of class "car": on a 32x32 grid each cell
spans 31.25 px, so both centres fall in row 28, column 3 - that cell reads 2 and
every other cell reads 0. false_positives_by_class is keyed by class name, so
it reads {"car": 2}. A run with no false positives reports the same full 32x32
grid with every cell zero and an empty class map, rather than an empty artifact
or an error. No aggregate score is produced in either case, by design.'
metric_type: pointwise
name: object_detection.false_positive_spatial_heatmap
partition_types: []
required_columns:
- image_id
- label
- predictions
- width
- height
required_kinds: []
scorer_contract: full_dataset
target_kind: null
unsupported_trace_shapes: []
version: 1.0.0