cats_filter

cocohelper.filters.cocofilters.cocofilters.cats_filter(ids=None, nms=None, super_nms=None, composition=<class 'cocohelper.filters.filter.AndFilter'>, strategy=<cocohelper.filters.strategies.strategies.HavingValueFilterStrategy object>)[source]

A Filter for the categories with the required characteristics.

Parameters:
  • ids (Optional[Union[Sequence[int], int]]) – a filter for the category id.

  • nms (Optional[Union[Sequence[str], str]]) – a filter for the names of the categories.

  • super_nms (Optional[Union[Sequence[str], str]]) – a filter for the names of the super-categories.

  • composition (Type[ComposeFilter]) – a composition type for the filter (defaults to an AND between all the given conditions).

  • strategy (ValueFilterStrategy) – a ValueFilterStrategy for the filter.

Returns:

A Filter for the categories with the required characteristics.

Return type:

Filter