docstr: Convert AttrRCNN object detection output and image sizes
  to make image features and image info expected by MMF.
  
  Args:
      output (List[BoxList]):
          A list of OD outputs, with BoxList containing image_info and feats
          BoxList fields contain labels, scores, box_features,
          attr_labels, attr_scores based on config options.
          bbox attribute contains bounding boxes.
  
      im_infos (List[Dict[str,int]]):
          A list of Dicts containing image width, height values.
  
  Returns:
      Tuple[List[np.Array], List[Dict[str, Union[torch.Tensor, int]]]]:
          Returns a list of image features, and list of image info dicts
docstr_tok: ["Convert","AttrRCNN","object","detection","output","and","image","sizes","to","make","image","features","and","image","info","expected","by","MMF",".","Args",":","output","(","List","[","BoxList","]",")",":","A","list","of","OD","outputs",",","with","BoxList","containing","image_info","and","feats","BoxList","fields","contain","labels",",","scores",",","box_features",",","attr_labels",",","attr_scores","based","on","config","options",".","bbox","attribute","contains","bounding","boxes",".","im_infos","(","List","[","Dict","[","str",",","int","]","]",")",":","A","list","of","Dicts","containing","image","width",",","height","values",".","Returns",":","Tuple","[","List","[","np.Array","]",",","List","[","Dict","[","str",",","Union","[","torch.Tensor",",","int","]","]","]","]",":","Returns","a","list","of","image","features",",","and","list","of","image","info","dicts"]
code: def _process_feature_extraction(self, output, im_infos):
      """Convert AttrRCNN object detection output and image sizes
      to make image features and image info expected by MMF.
  
      Args:
          output (List[BoxList]):
              A list of OD outputs, with BoxList containing image_info and feats
              BoxList fields contain labels, scores, box_features,
              attr_labels, attr_scores based on config options.
              bbox attribute contains bounding boxes.
  
          im_infos (List[Dict[str,int]]):
              A list of Dicts containing image width, height values.
  
      Returns:
          Tuple[List[np.Array], List[Dict[str, Union[torch.Tensor, int]]]]:
              Returns a list of image features, and list of image info dicts
      """
      feat_list = []
      info_list = []
  
      for i, box_list in enumerate(output):
          w = im_infos[i]["width"]
          h = im_infos[i]["height"]
          box_list = box_list.to("cpu").resize((w, h))
          det_dict = {
              key: box_list.get_field(key) for key in box_list.fields()
          }
          bbox = box_list.bbox
          bbox_aug = self._norm_box(bbox, w, h)
          det_dict["bbox"] = bbox_aug
          det_dict["image_width"] = w
          det_dict["image_height"] = h
          features = torch.cat(
              [det_dict["box_features"], det_dict["bbox"]], dim=1
          )
  
          det_dict = {
              key: val.numpy() if isinstance(val, torch.Tensor) else val
              for key, val in det_dict.items()
          }
          features = features.numpy()
          feat_list += [features]
          info_list += [det_dict]
  
      return feat_list, info_list
  
imports: import argparse
  import os
  import cv2
  import numpy
  import torch
  from maskrcnn_benchmark.config import cfg
  from maskrcnn_benchmark.data.transforms import build_transforms
  from maskrcnn_benchmark.structures.image_list import to_image_list
  from maskrcnn_benchmark.utils.checkpoint import DetectronCheckpointer
  from mmf.utils.download import download
  from PIL import Image
  from scene_graph_benchmark.AttrRCNN import AttrRCNN
  from scene_graph_benchmark.config import sg_cfg
  from tools.scripts.features.extraction_utils import chunks, get_image_files
label_desc: Use image node_id 7 for calling the FeatureExtractor obj's underlying member method code with example usage: obj._process_feature_extraction(output, im_infos) and returns: feat_list,  info_list