mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 18:22:34 +06:00
MaskFormer post_process_instance_segmentation bug fix convert out side of loop (#25497)
Bug fix - convert out side of loop
This commit is contained in:
parent
ee7d6694ed
commit
80f29a25a7
@ -1026,6 +1026,7 @@ class Mask2FormerImageProcessor(BaseImageProcessor):
|
|||||||
)
|
)
|
||||||
current_segment_id += 1
|
current_segment_id += 1
|
||||||
instance_maps.append(pred_masks[j])
|
instance_maps.append(pred_masks[j])
|
||||||
|
|
||||||
# Return segmentation map in run-length encoding (RLE) format
|
# Return segmentation map in run-length encoding (RLE) format
|
||||||
if return_coco_annotation:
|
if return_coco_annotation:
|
||||||
segmentation = convert_segmentation_to_rle(segmentation)
|
segmentation = convert_segmentation_to_rle(segmentation)
|
||||||
|
@ -1081,6 +1081,7 @@ class MaskFormerImageProcessor(BaseImageProcessor):
|
|||||||
)
|
)
|
||||||
current_segment_id += 1
|
current_segment_id += 1
|
||||||
instance_maps.append(pred_masks[j])
|
instance_maps.append(pred_masks[j])
|
||||||
|
|
||||||
# Return segmentation map in run-length encoding (RLE) format
|
# Return segmentation map in run-length encoding (RLE) format
|
||||||
if return_coco_annotation:
|
if return_coco_annotation:
|
||||||
segmentation = convert_segmentation_to_rle(segmentation)
|
segmentation = convert_segmentation_to_rle(segmentation)
|
||||||
|
Loading…
Reference in New Issue
Block a user