ValidBboxAnnotationsDataset#
- class ethology.validators.annotations.ValidBboxAnnotationsDataset(dataset)[source]#
Bases:
ValidDatasetClass for valid
ethologybounding box annotations datasets.This class validates that the input dataset:
is an xarray Dataset,
has
image_id,space,idas dimensions,has
positionandshapeas data variables,both data variables span at least the dimensions
image_id,spaceandid.
- dataset#
The xarray dataset to validate.
- Type:
- required_data_vars#
A dictionary mapping data variable names to their required minimum dimensions:
positionmaps toimage_id,spaceandid,shapemaps toimage_id,spaceandid.
- Raises:
TypeError – If the input is not an xarray Dataset.
ValueError – If the dataset is missing required data variables or dimensions, or if any required dimensions are missing for any data variable.
Notes
The dataset can have other data variables and dimensions, but only the required ones are checked.