Unverified Commit 80f29a25 authored by amyeroberts's avatar amyeroberts Committed by GitHub
Browse files

MaskFormer post_process_instance_segmentation bug fix convert out side of loop (#25497)

Bug fix - convert out side of loop
parent ee7d6694
......@@ -1026,6 +1026,7 @@ class Mask2FormerImageProcessor(BaseImageProcessor):
)
current_segment_id += 1
instance_maps.append(pred_masks[j])
# Return segmentation map in run-length encoding (RLE) format
if return_coco_annotation:
segmentation = convert_segmentation_to_rle(segmentation)
......
......@@ -1081,6 +1081,7 @@ class MaskFormerImageProcessor(BaseImageProcessor):
)
current_segment_id += 1
instance_maps.append(pred_masks[j])
# Return segmentation map in run-length encoding (RLE) format
if return_coco_annotation:
segmentation = convert_segmentation_to_rle(segmentation)
......
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