ValidCOCO#
- class ethology.validators.annotations.ValidCOCO(path)[source]#
Bases:
objectClass for valid COCO JSON annotation files.
It checks the input file is a valid JSON file, matches the COCO schema and contains the required keys.
- Raises:
ValueError – If the JSON file cannot be decoded.
jsonschema.exceptions.ValidationError – If the type of any of the keys in the JSON file does not match the type specified in the schema.
jsonschema.exceptions.SchemaError – If the schema is invalid.
ValueError – If the COCO JSON file is missing any of the required keys.