Skip to content

Detections Filter

Version v1

Conditionally filter out model predictions.

Type identifier

Use the following identifier in step "type" field: roboflow_core/detections_filter@v1to 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.

The available connections depend on its binding kinds. Check what binding kinds Detections Filter in version v1 has.

Bindings
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"
    }
}