Detections Combine¶
Class: DetectionsCombineBlockV1
Source: inference.core.workflows.core_steps.transformations.detections_combine.v1.DetectionsCombineBlockV1
Combine two sets of detection predictions into a single unified set of detections by merging both detection sets together, preserving all detections from both inputs for multi-source detection aggregation, combining results from multiple models, and consolidating detection sets from different processing stages into one workflow output.
How This Block Works¶
This block combines two separate sets of detection predictions into a single unified detection set by merging all detections from both inputs. The block:
- Receives two separate detection prediction sets (prediction_one and prediction_two), each containing multiple detections from object detection or instance segmentation models
- Processes both detection sets independently (each set maintains its own detections, properties, masks, and metadata)
- Merges the two detection sets using supervision's Detections.merge() method:
- Combines all detections from prediction_one with all detections from prediction_two
- Preserves all detection properties from both sets (bounding boxes, masks, classes, confidence scores, metadata)
- Maintains detection order (typically prediction_one detections followed by prediction_two detections)
- Handles all detection attributes including masks (for instance segmentation), keypoints, class IDs, class names, confidence scores, and custom data fields
- Returns a single unified detection set containing all detections from both inputs
The block simply concatenates the two detection sets together, preserving all detections and their properties from both sources. Unlike the Detections Merge block (which creates a union bounding box from multiple detections), this block maintains all individual detections from both sets in the output. This is useful for combining detections from different models, different processing stages, or different detection sources into a single workflow stream for unified downstream processing.
Common Use Cases¶
- Multi-Model Detection Aggregation: Combine detections from multiple detection models into a single unified set (e.g., combine detections from different object detection models, merge results from specialized models, aggregate detections from multiple model outputs), enabling multi-model detection workflows
- Multi-Stage Detection Combination: Combine detections from different processing stages or workflow branches (e.g., merge detections from different workflow paths, combine initial detections with refined detections, aggregate detections from multiple processing stages), enabling multi-stage detection aggregation
- Detection Source Consolidation: Consolidate detections from different sources or inputs into one set (e.g., combine detections from multiple images or frames, merge detections from different regions, aggregate detections from various sources), enabling detection source unification
- Classification and Detection Combination: Combine object detection results with classification results or other detection types (e.g., merge object detections with classification outputs, combine different detection types, aggregate complementary detection sets), enabling multi-type detection workflows
- Filtered and Unfiltered Detection Combination: Combine filtered detections with unfiltered detections or combine different filtered subsets (e.g., merge filtered detections by different criteria, combine specific class detections with general detections, aggregate different filtered detection sets), enabling flexible detection combination workflows
- Workflow Branch Merging: Merge detection results from different workflow branches back into a single detection stream (e.g., combine parallel processing branch results, merge conditional workflow paths, aggregate branch detection outputs), enabling workflow branch consolidation
Connecting to Other Blocks¶
This block receives two detection prediction sets and produces a single combined detection set:
- After multiple detection blocks to combine detections from different models into one unified set (e.g., combine detections from multiple object detection models, merge results from different segmentation models, aggregate detections from various model outputs), enabling multi-model detection aggregation workflows
- After filtering blocks to combine filtered detection subsets (e.g., merge detections filtered by different criteria, combine class-specific filtered detections, aggregate various filtered detection sets), enabling filtered detection combination workflows
- At workflow merge points where different workflow branches need to be combined (e.g., merge parallel processing branch results, combine conditional path outputs, aggregate branch detection streams), enabling workflow branch merging workflows
- Before downstream processing blocks that need unified detection sets (e.g., process combined detections together, visualize unified detection sets, analyze aggregated detections), enabling unified detection processing workflows
- Before crop blocks to process combined detections together (e.g., crop regions from combined detection sets, extract areas from aggregated detections, process unified detection regions), enabling combined detection region extraction
- Before visualization blocks to display unified detection sets (e.g., visualize combined detections from multiple sources, display aggregated detection results, show merged detection outputs), enabling unified detection visualization workflows
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/detections_combine@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
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 Detections Combine in version v1.
- inputs:
PP-OCR,EasyOCR,Object Detection Model,Segment Anything 2 Model,SAM 3,Per-Class Confidence Filter,Dynamic Zone,Motion Detection,Velocity,BoT-SORT Tracker,Detections Stitch,Detections List Roll-Up,OCR Model,Instance Segmentation Model,Mask Edge Snap,Instance Segmentation Model,Detections Filter,Detections Classes Replacement,Detections Merge,PTZ Tracking (ONVIF),VLM As Detector,Dynamic Crop,SAM 3 Interactive,Google Vision OCR,Seg Preview,SAM 3,VLM As Detector,Byte Tracker,Detection Offset,Line Counter,Time in Zone,Overlap Filter,Path Deviation,Instance Segmentation Model,Time in Zone,Byte Tracker,Detection Event Log,Template Matching,SORT Tracker,Perspective Correction,SAM2 Video Tracker,Byte Tracker,Detections Consensus,Detections Stabilizer,Path Deviation,ByteTrack Tracker,Detections Combine,Mask Area Measurement,SAM 3,Object Detection Model,Track Class Lock,Moondream2,Detections Transformation,Bounding Rectangle,Object Detection Model,SAM3 Video Tracker,OC-SORT Tracker,YOLO-World Model,Time in Zone,Instance Segmentation Model - outputs:
Stitch OCR Detections,Blur Visualization,Segment Anything 2 Model,Color Visualization,Per-Class Confidence Filter,Dynamic Zone,Stitch OCR Detections,Distance Measurement,Velocity,Trace Visualization,Icon Visualization,Model Comparison Visualization,BoT-SORT Tracker,Detections Stitch,Detections List Roll-Up,Mask Visualization,Mask Edge Snap,Detections Classes Replacement,PTZ Tracking (ONVIF),Detections Merge,Detections Filter,Florence-2 Model,Dynamic Crop,SAM 3 Interactive,Halo Visualization,Ellipse Visualization,Pixelate Visualization,Florence-2 Model,Byte Tracker,Detection Offset,Line Counter,Time in Zone,Overlap Filter,Polygon Visualization,Path Deviation,Roboflow Dataset Upload,Event Writer,Time in Zone,Byte Tracker,Detection Event Log,Bounding Box Visualization,Halo Visualization,Heatmap Visualization,SORT Tracker,Circle Visualization,Roboflow Custom Metadata,Perspective Correction,SAM2 Video Tracker,Camera Focus,Byte Tracker,Detections Consensus,Crop Visualization,Polygon Visualization,Detections Stabilizer,Line Counter,ByteTrack Tracker,Path Deviation,Detections Combine,Mask Area Measurement,Background Color Visualization,Model Monitoring Inference Aggregator,Stability AI Inpainting,GeoTag Detection,Corner Visualization,Track Class Lock,Roboflow Vision Events,Detections Transformation,Bounding Rectangle,Size Measurement,Overlap Analysis,Triangle Visualization,Roboflow Dataset Upload,OC-SORT Tracker,Dot Visualization,Time in Zone,Label Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Detections Combine in version v1 has.
Bindings
-
input
prediction_one(Union[object_detection_prediction,instance_segmentation_prediction]): First set of detection predictions to combine. Supports object detection or instance segmentation predictions. All detections from this set will be included in the output. Detection properties (bounding boxes, masks, classes, confidence scores, metadata) are preserved as-is. This set is combined with prediction_two to create the unified output. Detections from this set typically appear first in the merged output..prediction_two(Union[object_detection_prediction,instance_segmentation_prediction]): Second set of detection predictions to combine. Supports object detection or instance segmentation predictions. All detections from this set will be included in the output. Detection properties (bounding boxes, masks, classes, confidence scores, metadata) are preserved as-is. This set is combined with prediction_one to create the unified output. Detections from this set are merged with detections from prediction_one to form a single combined detection set..
-
output
predictions(Union[object_detection_prediction,instance_segmentation_prediction]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_predictionor Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction.
Example JSON definition of step Detections Combine in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/detections_combine@v1",
"prediction_one": "$steps.my_object_detection_model.predictions",
"prediction_two": "$steps.my_object_detection_model.predictions"
}