class_docstr: 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``.
  box_features : gluon.HybridBlock
      feature head for transforming roi output for box prediction.
  short : int
      Input image short side size.
  max_size : int
      Maximum size of input image long side.
  train_patterns : str
      Matching pattern for trainable parameters.
  nms_thresh : float
      Non-maximum suppression threshold. You can specify < 0 or > 1 to disable NMS.
  nms_topk : int
      Apply NMS to top k detection results, use -1 to disable so that every Detection
       result is used in NMS.
  roi_mode : str
      ROI pooling mode. Currently support 'pool' and 'align'.
  roi_size : tuple of int, length 2
      (height, width) of the ROI region.
  strides : int/tuple of ints
      Stride(s) of network features. Tuple for FPN.
  clip: float
      Clip bounding box target to this value.
  
  Attributes
  ----------
  classes : iterable of str
      Names of categories, its length is ``num_class``.
  num_class : int
      Number of positive categories.
  short : int
      Input image short side size.
  max_size : int
      Maximum size of input image long side.
  train_patterns : str
      Matching pattern for trainable parameters.
  nms_thresh : float
      Non-maximum suppression threshold. You can specify < 0 or > 1 to disable NMS.
  nms_topk : int
      Apply NMS to top k detection results, use -1 to disable so that every Detection
       result is used in NMS.
  minimal_opset : bool
      We sometimes add special operators to accelerate training/inference, however, for exporting
      to third party compilers we want to utilize most widely used operators.
      If `minimal_opset` is `True`, the network will use a minimal set of operators good
      for e.g., `TVM`.
code: def __init__(
      self,
      features,
      top_features,
      classes,
      box_features,
      short,
      max_size,
      train_patterns,
      nms_thresh,
      nms_topk,
      post_nms,
      roi_mode,
      roi_size,
      strides,
      clip,
      force_nms=False,
      minimal_opset=False,
      **kwargs,
  ):
      super(RCNN, self).__init__(**kwargs)
      self.classes = classes
      self.num_class = len(classes)
      self.short = short
      self.max_size = max_size
      self.train_patterns = train_patterns
      self.nms_thresh = nms_thresh
      self.nms_topk = nms_topk
      self.post_nms = post_nms
      self.force_nms = force_nms
  
      assert self.num_class > 0, "Invalid number of class : {}".format(
          self.num_class
      )
      assert roi_mode.lower() in [
          "align",
          "pool",
      ], "Invalid roi_mode: {}".format(roi_mode)
      self._roi_mode = roi_mode.lower()
      assert (
          len(roi_size) == 2
      ), "Require (h, w) as roi_size, given {}".format(roi_size)
      self._roi_size = roi_size
      self._strides = strides
  
      with self.name_scope():
          self.features = features
          self.top_features = top_features
          self.box_features = box_features
          self.class_predictor = nn.Dense(
              self.num_class + 1,
              weight_initializer=mx.init.Normal(0.01),
          )
          self.box_predictor = nn.Dense(
              self.num_class * 4,
              weight_initializer=mx.init.Normal(0.001),
          )
          self.cls_decoder = MultiPerClassDecoder(
              num_class=self.num_class + 1
          )
          self.box_decoder = NormalizedBoxCenterDecoder(
              clip=clip,
              convert_anchor=True,
              minimal_opset=minimal_opset,
          )
  
file_path: gluon-cv/gluoncv/model_zoo/rcnn/rcnn.py
imports: from __future__ import absolute_import
  import warnings
  import mxnet
  from mxnet import gluon
  from mxnet.gluon import nn
  from ...nn.coder import NormalizedBoxCenterDecoder, MultiPerClassDecoder
  from ...nn.feature import FPNFeatureExpander
label_desc: Use image node_id 1 to create a new RCNN object from inherited base classes: gluon with example: obj = RCNN(features, top_features, classes, box_features, short, max_size, train_patterns, nms_thresh, nms_topk, post_nms, roi_mode, roi_size, strides, clip, force_nms, minimal_opset)