kwcoco.cli.coco_show module

class kwcoco.cli.coco_show.CocoShowCLI[source]

Bases: object

name = 'show'
class CLIConfig(data=None, default=None, cmdline=False)[source]

Bases: Config

Visualize a COCO image using matplotlib or opencv, optionally writing it to disk

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 the cli classmethod to create a command line aware config instance..

default = {'aid': <Value(None)>, 'channels': <Value(None)>, 'dst': <Value(None)>, 'gid': <Value(None)>, 'mode': <Value('matplotlib')>, 'show_annots': <Value(True)>, 'show_labels': <Value(False)>, 'src': <Value(None)>}
classmethod main(cmdline=True, **kw)[source]

Todo

  • [ ] Visualize auxiliary data

Example

>>> # xdoctest: +SKIP
>>> kw = {'src': 'special:shapes8'}
>>> cmdline = False
>>> cls = CocoShowCLI
>>> cls.main(cmdline, **kw)
kwcoco.cli.coco_show._CLI

alias of CocoShowCLI