Skip to content

Commit

Permalink
Add fused Mask Traget generator op to Mask-RCNN
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Panev <[email protected]>
  • Loading branch information
Kh4L committed Oct 17, 2019
1 parent 31f91d2 commit 7af2157
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gluoncv/model_zoo/mask_rcnn/rcnn_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def hybrid_forward(self, F, rois, gt_masks, matches, cls_targets):
"""

if hasattr(F.contrib, 'mrcnn_mask_target'):
return F.contrib.mrcnn_mask_target(rois, gt_masks, matches, cls_targets,
num_rois=self._num_rois,
num_classes=self._num_classes,
mask_size=self._mask_size)

# cannot know M (num_gt) to have accurate batch id B * M, must split batch dim
def _split(x, axis, num_outputs, squeeze_axis):
x = F.split(x, axis=axis, num_outputs=num_outputs, squeeze_axis=squeeze_axis)
Expand Down

0 comments on commit 7af2157

Please sign in to comment.