robokudo.annotators.filter

Filter annotator for RoboKudo.

This module provides an annotator for filtering annotations based on custom conditions. It supports:

  • Dynamic filtering through callable functions

  • Custom filter arguments

  • In-place annotation list modification

  • Flexible condition evaluation

The module is used for:

  • Annotation filtering

  • Data preprocessing

  • Result refinement

  • Conditional processing

Classes

FilterAnnotator

Annotator for applying filter conditions to annotations.

Module Contents

class robokudo.annotators.filter.FilterAnnotator(name: str = 'FilterAnnotator', descriptor: FilterAnnotator = Descriptor())

Bases: robokudo.annotators.core.BaseAnnotator

Annotator for applying filter conditions to annotations.

This annotator applies a provided filter function to the current set of annotations, modifying the annotation list in-place based on the filter results.

class Descriptor

Bases: robokudo.annotators.core.BaseAnnotator.Descriptor

Configuration descriptor for filter annotator.

Variables:

parameters – Filter parameters

class Parameters

Parameter container for filter configuration.

func: typing_extensions.Optional[typing_extensions.Callable] = None

Filter function to apply

func_args: typing_extensions.Optional[typing_extensions.Tuple] = None

Positional arguments for filter function

func_kwargs: typing_extensions.Optional[typing_extensions.Dict] = None

Keyword arguments for filter function

parameters
update() py_trees.common.Status

Apply the filter function to current annotations.

The filter function is applied to each annotation with the configured arguments. Only annotations that pass the filter are kept.

Returns:

SUCCESS status