class_docstr: RCNN: Region-based Convolutional Neural Network.
  
  Given region proposals (bounding boxes on an image) and a feature map of
  that image, RCNN adjusts the bounding boxes and classifies each region as
  either background or a specific object class.
  
  Steps:
      1. Region of Interest Pooling. Extract features from the feature map
         (based on the proposals) and convert into fixed size tensors
         (applying extrapolation).
      2. Two fully connected layers generate a smaller tensor for each
         region.
      3. A fully conected layer outputs the probability distribution over the
         classes (plus a background class), and another fully connected layer
         outputs the bounding box regressions (one 4-d regression for each of
         the possible classes).
  
  Using the class probability, filter regions classified as background. For
  the remaining regions, use the class probability together with the
  corresponding bounding box regression offsets to generate the final object
  bounding boxes, with classes and probabilities assigned.
class_docstr_tok: ["RCNN",":","Region-based","Convolutional","Neural","Network",".","Given","region","proposals","(","bounding","boxes","on","an","image",")","and","a","feature","map","of","that","image",",","RCNN","adjusts","the","bounding","boxes","and","classifies","each","region","as","either","background","or","a","specific","object","class",".","Steps",":","1",".","Region","of","Interest","Pooling",".","Extract","features","from","the","feature","map","(","based","on","the","proposals",")","and","convert","into","fixed","size","tensors","(","applying","extrapolation",")",".","2",".","Two","fully","connected","layers","generate","a","smaller","tensor","for","each","region",".","3",".","A","fully","conected","layer","outputs","the","probability","distribution","over","the","classes","(","plus","a","background","class",")",",","and","another","fully","connected","layer","outputs","the","bounding","box","regressions","(","one","4-d","regression","for","each","of","the","possible","classes",")",".","Using","the","class","probability",",","filter","regions","classified","as","background",".","For","the","remaining","regions",",","use","the","class","probability","together","with","the","corresponding","bounding","box","regression","offsets","to","generate","the","final","object","bounding","boxes",",","with","classes","and","probabilities","assigned","."]
code: def __init__(
      self, num_classes, config, debug=False, seed=None, name="rcnn"
  ):
      super(RCNN, self).__init__(name=name)
      self._num_classes = num_classes
      # List of the fully connected layer sizes used before classifying and
      # adjusting the bounding box.
      self._layer_sizes = config.layer_sizes
      self._activation = get_activation_function(
          config.activation_function
      )
      self._dropout_keep_prob = config.dropout_keep_prob
      self._use_mean = config.use_mean
      self._variances = config.target_normalization_variances
  
      self._rcnn_initializer = get_initializer(
          config.rcnn_initializer, seed=seed
      )
      self._cls_initializer = get_initializer(
          config.cls_initializer, seed=seed
      )
      self._bbox_initializer = get_initializer(
          config.bbox_initializer, seed=seed
      )
      self.regularizer = tf.contrib.layers.l2_regularizer(
          scale=config.l2_regularization_scale
      )
  
      self._l1_sigma = config.l1_sigma
  
      # Debug mode makes the module return more detailed Tensors which can be
      # useful for debugging.
      self._debug = debug
      self._config = config
      self._seed = seed
  
file_path: luminoth/luminoth/models/fasterrcnn/rcnn.py
imports: import sonnet
  import tensorflow
  from luminoth.models.fasterrcnn.rcnn_proposal import RCNNProposal
  from luminoth.models.fasterrcnn.rcnn_target import RCNNTarget
  from luminoth.models.fasterrcnn.roi_pool import ROIPoolingLayer
  from luminoth.utils.losses import smooth_l1_loss
  from luminoth.utils.vars import get_initializer, layer_summaries, variable_summaries, get_activation_function
label_desc: Use image node_id 1 to create a new RCNN object from inherited base classes: snt with example: obj = RCNN(num_classes, config, debug, seed, name)