anns_filter
- cocohelper.filters.cocofilters.cocofilters.anns_filter(ids=None, area_rng=None, is_crowd=None, composition=<class 'cocohelper.filters.filter.AndFilter'>, strategy=<cocohelper.filters.strategies.strategies.HavingValueFilterStrategy object>, rng_strategy=<cocohelper.filters.strategies.strategies.InRangeFilterStrategy object>)[source]
A Filter for the annotations with the required characteristics.
- Parameters:
ids (Optional[Union[Sequence[int], int]]) – a filter for the annotation id.
area_rng (Optional[Tuple[float, float]]) – a filter for the area of the annotation.
is_crowd (Optional[bool]) – a boolean for the is_crowd argument in the COCO annotation
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.
rng_strategy (RangeFilterStrategy) – strategy for the range.
- Returns:
A Filter for the annotations with the required characteristics.
- Return type: