Detections Filter¶
Version v1
¶
Conditionally filter out model predictions.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/detections_filter@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
The unique name of this step.. | ❌ |
operations |
List[Union[ClassificationPropertyExtract, DetectionsFilter, DetectionsOffset, DetectionsPropertyExtract, DetectionsSelection, DetectionsShift, Divide, ExtractDetectionProperty, ExtractImageProperty, LookupTable, Multiply, NumberRound, NumericSequenceAggregate, RandomNumber, SequenceAggregate, SequenceApply, SequenceLength, SequenceMap, SortDetections, StringMatches, StringSubSequence, StringToLowerCase, StringToUpperCase, ToBoolean, ToNumber, ToString]] |
Definition of filtering operations. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Check what blocks you can connect to Detections Filter
in version v1
.
- inputs:
Template Matching
,Segment Anything 2 Model
,Blur Visualization
,Image Convert Grayscale
,VLM as Detector
,Circle Visualization
,CogVLM
,Absolute Static Crop
,LMM For Classification
,Background Color Visualization
,YOLO-World Model
,Detections Transformation
,Polygon Visualization
,Image Threshold
,OCR Model
,Detections Classes Replacement
,Image Contours
,Bounding Box Visualization
,Object Detection Model
,Roboflow Custom Metadata
,Dimension Collapse
,Clip Comparison
,First Non Empty Or Default
,Detections Filter
,Instance Segmentation Model
,Halo Visualization
,SIFT
,Roboflow Dataset Upload
,Google Gemini
,Dynamic Crop
,Image Slicer
,Detection Offset
,Detections Stitch
,Multi-Label Classification Model
,Roboflow Dataset Upload
,Barcode Detection
,Camera Focus
,Dot Visualization
,Corner Visualization
,OpenAI
,Triangle Visualization
,Relative Static Crop
,Pixel Color Count
,Pixelate Visualization
,JSON Parser
,Dynamic Zone
,Detections Consensus
,Label Visualization
,Crop Visualization
,Mask Visualization
,LMM
,Property Definition
,QR Code Detection
,Color Visualization
,VLM as Classifier
,Perspective Correction
,OpenAI
,Keypoint Detection Model
,Clip Comparison
,Anthropic Claude
,Dominant Color
,Continue If
,Expression
,SIFT Comparison
,Image Blur
,Ellipse Visualization
,Single-Label Classification Model
- outputs:
Detection Offset
,Dynamic Zone
,Detections Consensus
,Label Visualization
,Crop Visualization
,Roboflow Dataset Upload
,Detections Stitch
,Segment Anything 2 Model
,Blur Visualization
,Mask Visualization
,Detections Classes Replacement
,Property Definition
,Bounding Box Visualization
,Dot Visualization
,Color Visualization
,Circle Visualization
,Corner Visualization
,Roboflow Custom Metadata
,Perspective Correction
,Triangle Visualization
,Detections Filter
,Halo Visualization
,Background Color Visualization
,Roboflow Dataset Upload
,Detections Transformation
,Pixelate Visualization
,Polygon Visualization
,Dynamic Crop
,Ellipse Visualization
The available connections depend on its binding kinds. Check what binding kinds
Detections Filter
in version v1
has.
Bindings
-
input
predictions
(Union[keypoint_detection_prediction
,object_detection_prediction
,instance_segmentation_prediction
]): Reference to detection-like predictions.operations_parameters
(Union[image
,*
]): References to additional parameters that may be provided in runtime to parametrise operations.
-
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 Filter
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/detections_filter@v1",
"predictions": "$steps.object_detection_model.predictions",
"operations": [
{
"filter_operation": {
"statements": [
{
"comparator": {
"type": "in (Sequence)"
},
"left_operand": {
"operations": [
{
"property_name": "class_name",
"type": "ExtractDetectionProperty"
}
],
"type": "DynamicOperand"
},
"right_operand": {
"operand_name": "classes",
"type": "DynamicOperand"
},
"type": "BinaryStatement"
}
],
"type": "StatementGroup"
},
"type": "DetectionsFilter"
}
],
"operations_parameters": {
"classes": "$inputs.classes"
}
}