Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Update segmentation_mask.py #881

Merged
merged 1 commit into from
Sep 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion maskrcnn_benchmark/structures/segmentation_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, masks, size):
if len(masks) == 0:
masks = torch.empty([0, size[1], size[0]]) # num_instances = 0!
elif isinstance(masks[0], torch.Tensor):
masks = torch.stack(masks, dim=2).clone()
masks = torch.stack(masks, dim=0).clone()
elif isinstance(masks[0], dict) and "counts" in masks[0]:
# RLE interpretation
rle_sizes = [tuple(inst["size"]) for inst in masks]
Expand Down