Overlap Analysis¶
Class: OverlapAnalysisBlockV1
Source: inference.core.workflows.core_steps.fusion.overlap_analysis.v1.OverlapAnalysisBlockV1
Compute pairwise geometric overlap between two sets of detections.
For each pair (reference, candidate) drawn from reference_predictions x
candidate_predictions, the block computes
intersection_area / reference_polygon.area and emits one record per
pair whose ratio reaches min_overlap.
When a detection carries a mask, the precise polygon is the longest
contour of that mask (validated via shapely); otherwise the bounding
box polygon is used. A vectorised bbox-IoU prefilter
(supervision.box_iou_batch) eliminates non-touching pairs before any
shapely intersection is computed.
The relation is intentionally not symmetric across the two inputs: the denominator is always the reference detection's area. Swap the two selectors if you want overlap reported relative to the other set.
The output is a flat list of dicts (one per accepted pair) attached to
the same dimensionality as the inputs — the block does not increase
dimensionality. See the detections_overlaps kind docs for the
per-record schema.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/overlap_analysis@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
min_overlap |
float |
Minimum (intersection / reference_area) ratio for a pair to be included in the output.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Overlap Analysis in version v1.
- inputs:
SAM 3,SAM 3 Interactive,Time in Zone,Dynamic Crop,Detections Filter,Mask Area Measurement,Object Detection Model,BoT-SORT Tracker,Object Detection Model,Velocity,Mask Edge Snap,Path Deviation,Template Matching,Instance Segmentation Model,EasyOCR,OC-SORT Tracker,Track Class Lock,Dynamic Zone,YOLO-World Model,Detections Combine,Byte Tracker,Detections Transformation,Time in Zone,PTZ Tracking (ONVIF),OCR Model,Detections Classes Replacement,Byte Tracker,SAM2 Video Tracker,Clip Comparison,ByteTrack Tracker,Per-Class Confidence Filter,VLM As Detector,SORT Tracker,PP-OCR,Detections List Roll-Up,Motion Detection,Instance Segmentation Model,Detections Consensus,Instance Segmentation Model,Time in Zone,Detection Event Log,Detections Stitch,Detections Stabilizer,Segment Anything 2 Model,Object Detection Model,SAM3 Video Tracker,SAM 3,SAM 3,Detections Merge,Path Deviation,Google Vision OCR,Perspective Correction,Moondream2,Detection Offset,VLM As Detector,Instance Segmentation Model,Line Counter,Identify Outliers,Identify Changes,Bounding Rectangle,Overlap Filter,Seg Preview,Byte Tracker - outputs: None
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Overlap Analysis in version v1 has.
Bindings
-
input
reference_predictions(Union[instance_segmentation_prediction,object_detection_prediction]): Detections whose area is the denominator of the overlap ratio. For each reference detection, overlap with every candidate is computed; pairs abovemin_overlapappear in the output..candidate_predictions(Union[instance_segmentation_prediction,object_detection_prediction]): Detections checked against each reference..min_overlap(float_zero_to_one): Minimum (intersection / reference_area) ratio for a pair to be included in the output..
-
output
overlaps(detections_overlaps): List of per-pair detection overlap records.
Example JSON definition of step Overlap Analysis in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/overlap_analysis@v1",
"reference_predictions": "$steps.model_a.predictions",
"candidate_predictions": "$steps.model_b.predictions",
"min_overlap": 0.1
}