:py:mod:`kwcoco.cli.coco_reroot` ================================ .. py:module:: kwcoco.cli.coco_reroot Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: kwcoco.cli.coco_reroot.CocoRerootCLI Attributes ~~~~~~~~~~ .. autoapisummary:: kwcoco.cli.coco_reroot._CLI .. py:class:: CocoRerootCLI .. py:class:: CLIConfig(data=None, default=None, cmdline=False) Bases: :py:obj:`scriptconfig.Config` Reroot image paths onto a new image root. Modify the root of a coco dataset such to either make paths relative to a new root or make paths absolute. .. todo:: - [ ] Evaluate that all tests cases work .. py:attribute:: epilog :annotation: = Multiline-String .. raw:: html
Show Value .. code-block:: text :linenos: Example Usage: kwcoco reroot --help kwcoco reroot --src=special:shapes8 --dst rerooted.json kwcoco reroot --src=special:shapes8 --new_prefix=foo --check=True --dst rerooted.json .. raw:: html
.. py:attribute:: default .. py:attribute:: name :annotation: = reroot .. py:method:: main(cls, cmdline=True, **kw) :classmethod: .. rubric:: Example >>> # xdoctest: +SKIP >>> kw = {'src': 'special:shapes8'} >>> cmdline = False >>> cls = CocoRerootCLI >>> cls.main(cmdline, **kw) Ignore: python ~/code/kwcoco/kwcoco/cli/coco_reroot.py --src=$HOME/code/bioharn/fast_test/deep_training/training_truth.json --dst=$HOME/code/bioharn/fast_test/deep_training/training_truth2.json --new_prefix=/home/joncrall/code/bioharn/fast_test/training_data --old_prefix=/run/media/matt/Storage/TEST/training_data python ~/code/kwcoco/kwcoco/cli/coco_reroot.py --src=$HOME/code/bioharn/fast_test/deep_training/validation_truth.json --dst=$HOME/code/bioharn/fast_test/deep_training/validation_truth2.json --new_prefix=/home/joncrall/code/bioharn/fast_test/training_data --old_prefix=/run/media/matt/Storage/TEST/training_data cmdline = ''' --src=$HOME/code/bioharn/fast_test/deep_training/training_truth.json --dst=$HOME/code/bioharn/fast_test/deep_training/training_truth2.json --new_prefix=/home/joncrall/code/bioharn/fast_test/training_data --old_prefix=/run/media/matt/Storage/TEST/training_data ''' /run/media/matt/Storage/TEST/training_data --check=True --dst rerooted.json .. py:data:: _CLI