kwcoco.cli.coco_validate module¶
- class kwcoco.cli.coco_validate.CocoValidateCLI(*args, **kwargs)[source]¶
Bases:
DataConfigValidates that a coco file satisfies expected properties.
Checks that a coco file conforms to the json schema, that assets exist, and that other expected properties are satisfied.
This also has the ability to fix corrupted assets by removing them, but that functionality may be moved to a new command in the future.
Valid options: []
- Parameters:
*args – positional arguments for this data config
**kwargs – keyword arguments for this data config
- classmethod main(cmdline=True, **kw)[source]¶
Example
>>> from kwcoco.cli.coco_validate import * # NOQA >>> kw = {'src': 'special:shapes8'} >>> cmdline = False >>> cls = CocoValidateCLI >>> cls.main(cmdline, **kw)
- default = {'channels': <Value(True)>, 'corrupted': <Value(False)>, 'dst': <Value(None)>, 'fastfail': <Value(False)>, 'fix': <Value(None)>, 'img_attrs': <Value('warn')>, 'missing': <Value(True)>, 'require_relative': <Value(False)>, 'schema': <Value(True)>, 'src': <Value(None)>, 'unique': <Value(True)>, 'verbose': <Value(1)>, 'workers': <Value(0)>}¶