ValidBboxDetectionsDataset#
- class ethology.validators.detections.ValidBboxDetectionsDataset(dataset)[source]#
Bases:
ValidDatasetClass for valid
ethologybounding box detections datasets.This class validates that the input dataset:
is an xarray Dataset,
has
image_id,space,idas dimensions,has
position,shapeandconfidenceas data variables,positionandshapespan at least the dimensionsimage_id,spaceandid,confidencespans at least the dimensionsimage_idandid.
- 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,confidencemaps toimage_idandid.
- 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.