Unverified Commit c4f4d2d2 authored by srihari-humbarwadi's avatar srihari-humbarwadi
Browse files

fix mask data type

parent 863f85e6
...@@ -98,10 +98,13 @@ def generate_coco_panoptics_masks(segments_info, mask_path, ...@@ -98,10 +98,13 @@ def generate_coco_panoptics_masks(segments_info, mask_path,
# refer https://cocodataset.org/#format-data # refer https://cocodataset.org/#format-data
segments_encoded_mask = (r + g * 256 + b * (256**2)).squeeze() segments_encoded_mask = (r + g * 256 + b * (256**2)).squeeze()
semantic_segmentation_mask = np.ones_like(segments_encoded_mask) * _VOID_LABEL semantic_segmentation_mask = np.ones_like(
segments_encoded_mask, dtype=np.uint8) * _VOID_LABEL
if include_panoptic_eval_masks: if include_panoptic_eval_masks:
category_mask = np.ones_like(segments_encoded_mask) * _VOID_LABEL category_mask = np.ones_like(
instance_mask = np.ones_like(segments_encoded_mask) * _VOID_INSTANCE_ID segments_encoded_mask, dtype=np.uint8) * _VOID_LABEL
instance_mask = np.ones_like(
segments_encoded_mask, dtype=np.uint8) * _VOID_INSTANCE_ID
for idx, segment in enumerate(segments_info): for idx, segment in enumerate(segments_info):
segment_id = segment['id'] segment_id = segment['id']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment