Skip to content

Commit b15f64e

Browse files
stephenyan1231facebook-github-bot
authored andcommitted
MT model supports UpsamplerPixelShuffle 4x upsampling
Summary: MT supports efficient 4x upsampling using UpsamplerPixelShuffle, with main changes below - **UpsampleHeadMask**: support **subpixel_stride**. when it is 4, use HTP efficient **UpsamplerPixelShuffle**. - eval data loader mt_eval_vga.yaml: set num_max_samples = 20K to reduce running time of async eval op. Otherwise, it will be eliminated due to low gpu util - pixel_shuffle_use_conv_transpose: support to simulate F.pixel_shuffle using a 2D convtranspose op. But on G2, we find it is slower since it will run on HMX (vs HVX), which already has heavyweight workload from various 2d conv ops Reviewed By: hyxu2006 Differential Revision: D77117618 fbshipit-source-id: e0a39526e558e3ddb9ee75d953ed28ffde7ba722
1 parent 3a161f2 commit b15f64e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

detectron2/utils/visualizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ def _convert_masks(self, masks_or_polygons):
12421242
m = m.numpy()
12431243
ret = []
12441244
for x in m:
1245-
if isinstance(x, GenericMask):
1245+
if isinstance(x, GenericMask) or x.__class__.__name__ == "GenericMask":
12461246
ret.append(x)
12471247
else:
12481248
ret.append(GenericMask(x, self.output.height, self.output.width))

0 commit comments

Comments
 (0)