kwcoco.cli.coco_stats module¶
- class kwcoco.cli.coco_stats.CocoStatsCLI[source]¶
Bases:
object
- name = 'stats'¶
- class CLIConfig(data=None, default=None, cmdline=False)[source]¶
Bases:
Config
- Parameters
data (object) – filepath, dict, or None
default (dict | None) – overrides the class defaults
cmdline (bool | List[str] | str | dict) – If False, then no command line information is used. If True, then sys.argv is parsed and used. If a list of strings that used instead of sys.argv. If a string, then that is parsed using shlex and used instead
of sys.argv.
If a dictionary grants fine grained controls over the args passed to
Config._read_argv()
. Can contain:strict (bool): defaults to False
argv (List[str]): defaults to None
special_options (bool): defaults to True
autocomplete (bool): defaults to False
Defaults to False.
Note
Avoid setting
cmdline
parameter here. Instead prefer to use thecli
classmethod to create a command line aware config instance..- epilog = '\n Example Usage:\n kwcoco stats --src=special:shapes8\n kwcoco stats --src=special:shapes8 --boxes=True\n '¶
- default = {'annot_attrs': <Value(False)>, 'basic': <Value(True)>, 'boxes': <Value(False)>, 'catfreq': <Value(True)>, 'embed': <Value(False)>, 'extended': <Value(True)>, 'image_attrs': <Value(False)>, 'image_size': <Value(False)>, 'src': <Value(['special:shapes8'])>, 'video_attrs': <Value(False)>}¶
- kwcoco.cli.coco_stats._CLI¶
alias of
CocoStatsCLI
- kwcoco.cli.coco_stats.main(cmdline=True, **kw)¶
Example
>>> kw = {'src': 'special:shapes8'} >>> cmdline = False >>> cls = CocoStatsCLI >>> cls.main(cmdline, **kw)