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

fix error when running with --show-mask-heatmaps #274

Merged
merged 1 commit into from
Dec 14, 2018
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
3 changes: 2 additions & 1 deletion demo/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from maskrcnn_benchmark.utils.checkpoint import DetectronCheckpointer
from maskrcnn_benchmark.structures.image_list import to_image_list
from maskrcnn_benchmark.modeling.roi_heads.mask_head.inference import Masker
from maskrcnn_benchmark import layers as L


class COCODemo(object):
Expand Down Expand Up @@ -307,7 +308,7 @@ def create_mask_montage(self, image, predictions):
"""
masks = predictions.get_field("mask")
masks_per_dim = self.masks_per_dim
masks = torch.nn.functional.interpolate(
masks = L.interpolate(
masks.float(), scale_factor=1 / masks_per_dim
).byte()
height, width = masks.shape[-2:]
Expand Down