docstr: See modeling.detector.CollectAndDistributeFpnRpnProposals for
  inputs/outputs documentation.
docstr_tok: ["See","modeling.detector.CollectAndDistributeFpnRpnProposals","for","inputs\/outputs","documentation","."]
code: def forward(self, inputs, outputs):
      """See modeling.detector.CollectAndDistributeFpnRpnProposals for
      inputs/outputs documentation.
      """
      # inputs is
      # [rpn_rois_fpn2, ..., rpn_rois_fpn6,
      #  rpn_roi_probs_fpn2, ..., rpn_roi_probs_fpn6]
      # If training with Faster R-CNN, then inputs will additionally include
      #  + [roidb, im_info]
      rois = collect(inputs, self._train)
      if self._train:
          # During training we reuse the data loader code. We populate roidb
          # entries on the fly using the rois generated by RPN.
          # im_info: [[im_height, im_width, im_scale], ...]
          im_info = inputs[-1].data
          im_scales = im_info[:, 2]
          roidb = blob_utils.deserialize(inputs[-2].data)
          # For historical consistency with the original Faster R-CNN
          # implementation we are *not* filtering crowd proposals.
          # This choice should be investigated in the future (it likely does
          # not matter).
          json_dataset.add_proposals(
              roidb, rois, im_scales, crowd_thresh=0
          )
          roidb_utils.add_bbox_regression_targets(roidb)
          # Compute training labels for the RPN proposals; also handles
          # distributing the proposals over FPN levels
          output_blob_names = (
              fast_rcnn_roi_data.get_fast_rcnn_blob_names()
          )
          blobs = {k: [] for k in output_blob_names}
          fast_rcnn_roi_data.add_fast_rcnn_blobs(
              blobs, im_scales, roidb
          )
          for i, k in enumerate(output_blob_names):
              blob_utils.py_op_copy_blob(blobs[k], outputs[i])
      else:
          # For inference we have a special code path that avoids some data
          # loader overhead
          distribute(rois, None, outputs, self._train)
  
file_path: dense-pose/detectron/ops/collect_and_distribute_fpn_rpn_proposals.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  from detectron.core.config import cfg
  from detectron.datasets import json_dataset
  from detectron.datasets import roidb
  import detectron.modeling.FPN
  import detectron.roi_data.fast_rcnn
  import detectron.utils.blob
label_desc: Use image node_id 2 for calling the CollectAndDistributeFpnRpnProposalsOp obj's underlying member method code with example usage: obj.forward(inputs, outputs) without return types