indexing#
Module dedicated to Dataset indexers, to be able to index Dataset with pandas style loc and iloc methods
Classes
|
Locator class dedicated to index a dataset by its annotations as if we used pandas indexing methods on |
|
Locator class dedicated to index a dataset by its images as if we used pandas indexing methods on |
- class DatasetAnnotLocator(dataset: D, mode: Literal['loc', 'iloc'] = 'loc', remove_emptied_images: bool = False)[source]#
Locator class dedicated to index a dataset by its annotations as if we used pandas indexing methods on
dataset.annotationsand potentially filtered empty images accordingly.Usually used in the context of
Dataset.loc_annot()andDataset.iloc_annot()Constructor
- Parameters:
dataset – Dataset object to index
mode – whether to use
dataset.annotations.locordataset.annotations.iloc. Defaults to “loc”remove_emptied_images – If se to True, will remove images that no longer have annotations, but will keep images that were already empty before. Defaults to False
- class DatasetImLocator(dataset: D, mode: Literal['loc', 'iloc'] = 'loc')[source]#
Locator class dedicated to index a dataset by its images as if we used pandas indexing methods on
dataset.imagesand filtered annotations accordingly.Usually used in the context of
Dataset.loc()andDataset.iloc()Constructor
- Parameters:
dataset – Dataset object to index
mode – whether to use
dataset.images.locordataset.images.iloc. Defaults to “loc”