class_docstr: Mask RCNN network.
  
  Parameters
  ----------
  features : gluon.HybridBlock
      Base feature extractor before feature pooling layer.
  top_features : gluon.HybridBlock
      Tail feature extractor after feature pooling layer.
  classes : iterable of str
      Names of categories, its length is ``num_class``.
  mask_channels : int, default is 256
      Number of channels in mask prediction
  rcnn_max_dets : int, default is 1000
      Number of rois to retain in RCNN.
      Upper bounded by min of rpn_test_pre_nms and rpn_test_post_nms.
  rpn_test_pre_nms : int, default is 6000
      Filter top proposals before NMS in testing of RPN.
  rpn_test_post_nms : int, default is 1000
      Return top proposal results after NMS in testing of RPN.
      Will be set to rpn_test_pre_nms if it is larger than rpn_test_pre_nms.
  target_roi_scale : int, default 1
      Ratio of mask output roi / input roi. For model with FPN, this is typically 2.
  num_fcn_convs : int, default 0
      number of convolution blocks before deconv layer. For FPN network this is typically 4.
class_docstr_tok: ["Mask","RCNN","network",".","Parameters","--","--","--","--","--","features",":","gluon.HybridBlock","Base","feature","extractor","before","feature","pooling","layer",".","top_features",":","gluon.HybridBlock","Tail","feature","extractor","after","feature","pooling","layer",".","classes",":","iterable","of","str","Names","of","categories",",","its","length","is","``","num_class","``",".","mask_channels",":","int",",","default","is","256","Number","of","channels","in","mask","prediction","rcnn_max_dets",":","int",",","default","is","1000","Number","of","rois","to","retain","in","RCNN",".","Upper","bounded","by","min","of","rpn_test_pre_nms","and","rpn_test_post_nms",".","rpn_test_pre_nms",":","int",",","default","is","6000","Filter","top","proposals","before","NMS","in","testing","of","RPN",".","rpn_test_post_nms",":","int",",","default","is","1000","Return","top","proposal","results","after","NMS","in","testing","of","RPN",".","Will","be","set","to","rpn_test_pre_nms","if","it","is","larger","than","rpn_test_pre_nms",".","target_roi_scale",":","int",",","default","1","Ratio","of","mask","output","roi","\/","input","roi",".","For","model","with","FPN",",","this","is","typically","2.","num_fcn_convs",":","int",",","default","0","number","of","convolution","blocks","before","deconv","layer",".","For","FPN","network","this","is","typically","4","."]
code: def __init__(
      self,
      features,
      top_features,
      classes,
      mask_channels=256,
      rcnn_max_dets=1000,
      rpn_test_pre_nms=6000,
      rpn_test_post_nms=1000,
      target_roi_scale=1,
      num_fcn_convs=0,
      norm_layer=None,
      norm_kwargs=None,
      **kwargs,
  ):
      super(MaskRCNN, self).__init__(
          features,
          top_features,
          classes,
          rpn_test_pre_nms=rpn_test_pre_nms,
          rpn_test_post_nms=rpn_test_post_nms,
          additional_output=True,
          **kwargs,
      )
      if min(rpn_test_pre_nms, rpn_test_post_nms) < rcnn_max_dets:
          rcnn_max_dets = min(rpn_test_pre_nms, rpn_test_post_nms)
      self._rcnn_max_dets = rcnn_max_dets
      with self.name_scope():
          self.mask = Mask(
              self._batch_size,
              classes,
              mask_channels,
              num_fcn_convs=num_fcn_convs,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
          roi_size = (
              self._roi_size[0] * target_roi_scale,
              self._roi_size[1] * target_roi_scale,
          )
          self._target_roi_size = roi_size
          self.mask_target = MaskTargetGenerator(
              self._batch_size,
              self._num_sample,
              self.num_class,
              self._target_roi_size,
          )
  
imports: from __future__ import absolute_import
  import os
  import warnings
  import mxnet
  from mxnet import autograd
  from mxnet.gluon import nn
  from mxnet.gluon.contrib.nn import SyncBatchNorm
  from .rcnn_target import MaskTargetGenerator
  from ..faster_rcnn import FasterRCNN
  from ..rcnn import custom_rcnn_fpn
label_desc: Use image node_id 1 to create a new MaskRCNN object from inherited base classes: FasterRCNN with example: obj = MaskRCNN(features, top_features, classes, mask_channels, rcnn_max_dets, rpn_test_pre_nms, rpn_test_post_nms, target_roi_scale, num_fcn_convs, norm_layer, norm_kwargs)