code: def inference(
      self,
      images: torch.Tensor,
      image_shapes: torch.Tensor,
      gt_boxes: torch.Tensor = None,
      proposals: torch.Tensor = None,
      scales_yx: torch.Tensor = None,
      **kwargs,
  ):
      # run images through backbone
      features = self.backbone(images)
  
      image_list = ImageList(images, image_shapes)
  
      # generate proposals if none are available
      if proposals is None:
          proposal_boxes, _ = self.proposal_generator(
              image_list, features, gt_boxes
          )
      else:
          assert proposals is not None
  
      proposal_boxes = [
          proposal_boxes[0].get_fields()["proposal_boxes"]
      ]
  
      feature_pooled = self.forward_for_roi_head(
          [features["res4"]], proposal_boxes
      )
  
      preds_per_image = [p.size(0) for p in [proposal_boxes[0].tensor]]
  
      roi_features = feature_pooled.split(preds_per_image, dim=0)
  
      return roi_features
  
file_path: mmf/mmf/models/frcnn.py
imports: from typing import List
  import omegaconf
  import torch
  from torch import nn
  from torch.nn import functional
label_desc: Use image node_id 6 for calling the GeneralizedRCNN obj's underlying member method code with example usage: obj.inference(images, image_shapes, gt_boxes, proposals, scales_yx) and returns: roi_features