ValidCOCO#

class ethology.validators.annotations.ValidCOCO(path)[source]#

Bases: object

Class 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.

path#

Path to the COCO JSON file, passed as an input.

Type:

Path | str

schema#

The JSON schema is set to the default COCO schema.

Type:

dict

required_keys#

The required keys for the COCO JSON file.

Type:

dict

Raises: