Skip to content

Commit

Permalink
update coco cli
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max committed Jun 23, 2020
1 parent 529872a commit f929b4b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions datumaro/datumaro/plugins/coco_format/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,22 +562,23 @@ def _split_tasks_string(s):

@classmethod
def build_cmdline_parser(cls, **kwargs):
kwargs['description'] = """
Segmentation save modes:|n
- '{sm.guess.name}': guess the mode for each instance,|n
|s|suse 'is_crowd' attribute as a hint|n
- '{sm.polygons.name}': save polygons,|n
|s|smerge and convert masks, prefer polygons|n
- '{sm.mask.name}': save masks,|n
|s|smerge and convert polygons, prefer masks
""".format(sm=SegmentationMode)
parser = super().build_cmdline_parser(**kwargs)

parser.add_argument('--save-images', action='store_true',
help="Save images (default: %(default)s)")
parser.add_argument('--segmentation-mode',
choices=[m.name for m in SegmentationMode],
default=SegmentationMode.guess.name,
help="""
Save mode for instance segmentation:|n
- '{sm.guess.name}': guess the mode for each instance,|n
|s|suse 'is_crowd' attribute as hint|n
- '{sm.polygons.name}': save polygons,|n
|s|smerge and convert masks, prefer polygons|n
- '{sm.mask.name}': save masks,|n
|s|smerge and convert polygons, prefer masks|n
Default: %(default)s.
""".format(sm=SegmentationMode))
help="Save mode for instance segmentation (default: %(default)s)")
parser.add_argument('--crop-covered', action='store_true',
help="Crop covered segments so that background objects' "
"segmentation was more accurate (default: %(default)s)")
Expand Down

0 comments on commit f929b4b

Please sign in to comment.