Detections Classes Replacement¶
Class: DetectionsClassesReplacementBlockV1
Combine results of detection model with classification results performed separately for each and every bounding box.
Bounding boxes without top class predicted by classification model are discarded, for multi-label classification results, most confident label is taken as bounding box class.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/detections_classes_replacement@v1
to 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 Classes Replacement
in version v1
.
- inputs:
Object Detection Model
,VLM as Detector
,VLM as Classifier
,Keypoint Detection Model
,Detections Transformation
,Detections Stitch
,Path Deviation
,Detections Merge
,YOLO-World Model
,Detection Offset
,Single-Label Classification Model
,Line Counter
,Byte Tracker
,Perspective Correction
,Detections Consensus
,Path Deviation
,Gaze Detection
,Time in Zone
,Detections Filter
,Clip Comparison
,Time in Zone
,Dynamic Crop
,Template Matching
,Byte Tracker
,Detections Classes Replacement
,VLM as Classifier
,Instance Segmentation Model
,Keypoint Detection Model
,Dynamic Zone
,Instance Segmentation Model
,Object Detection Model
,Multi-Label Classification Model
,Bounding Rectangle
,Velocity
,Single-Label Classification Model
,Google Vision OCR
,VLM as Detector
,Multi-Label Classification Model
,Byte Tracker
,Segment Anything 2 Model
,Detections Stabilizer
- outputs:
Circle Visualization
,Background Color Visualization
,Corner Visualization
,Bounding Box Visualization
,Trace Visualization
,Label Visualization
,Detections Transformation
,Crop Visualization
,Detections Stitch
,Path Deviation
,Detections Merge
,Dot Visualization
,Detection Offset
,Roboflow Dataset Upload
,Model Comparison Visualization
,Stability AI Inpainting
,Pixelate Visualization
,Line Counter
,Stitch OCR Detections
,Perspective Correction
,Detections Consensus
,Byte Tracker
,Path Deviation
,Detections Stabilizer
,Distance Measurement
,Mask Visualization
,Time in Zone
,Detections Filter
,Color Visualization
,Time in Zone
,Dynamic Crop
,Halo Visualization
,Polygon Visualization
,Byte Tracker
,Detections Classes Replacement
,Florence-2 Model
,Dynamic Zone
,Florence-2 Model
,Triangle Visualization
,Model Monitoring Inference Aggregator
,Bounding Rectangle
,Velocity
,Roboflow Dataset Upload
,Keypoint Visualization
,Roboflow Custom Metadata
,Byte Tracker
,Line Counter
,Segment Anything 2 Model
,Ellipse Visualization
,Size Measurement
,Blur Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Detections Classes Replacement
in version v1
has.
Bindings
-
input
object_detection_predictions
(Union[keypoint_detection_prediction
,instance_segmentation_prediction
,object_detection_prediction
]): The output of a detection model describing the bounding boxes that will have classes replaced..classification_predictions
(classification_prediction
): The output of classification model for crops taken based on RoIs pointed as the other parameter.
-
output
predictions
(Union[object_detection_prediction
,instance_segmentation_prediction
,keypoint_detection_prediction
]): Prediction with detected bounding boxes in form of sv.Detections(...) object ifobject_detection_prediction
or Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object ifinstance_segmentation_prediction
or Prediction with detected bounding boxes and detected keypoints in form of sv.Detections(...) object ifkeypoint_detection_prediction
.
Example JSON definition of step Detections Classes Replacement
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/detections_classes_replacement@v1",
"object_detection_predictions": "$steps.my_object_detection_model.predictions",
"classification_predictions": "$steps.my_classification_model.predictions"
}