提交 9b3810e0 编写于 作者: A Abdullah Rashwan 提交者: A. Unique TensorFlower

Internal change

PiperOrigin-RevId: 486497693
上级 153591c0
......@@ -66,6 +66,9 @@ flags.DEFINE_boolean(
'include_panoptic_masks', False, 'Whether to include category and '
'instance masks in the result. These are required to run the PQ evaluator '
'default: False.')
flags.DEFINE_boolean(
'panoptic_skip_crowd', False, 'Whether to skip crowd or not for panoptic '
'annotations. default: False.')
flags.DEFINE_string('output_file_prefix', '/tmp/train', 'Path to output file')
flags.DEFINE_integer('num_shards', 32, 'Number of shards for output file.')
_NUM_PROCESSES = flags.DEFINE_integer(
......@@ -134,7 +137,9 @@ def generate_coco_panoptics_masks(segments_info, mask_path,
for idx, segment in enumerate(segments_info):
segment_id = segment['id']
category_id = segment['category_id']
is_crowd = segment['iscrowd']
if FLAGS.panoptic_skip_crowd and is_crowd:
continue
if is_category_thing[category_id]:
encoded_category_id = _THING_CLASS_ID
instance_id = idx + 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册