class_docstr: Performs input / target transformation before feeding the data to a GeneralizedRCNN
  model.
  
  The transformations it performs are:
      - input normalization (mean subtraction and std division)
      - input / target resizing to match min_size / max_size
  
  It returns a ImageList for the inputs, and a List[Dict[Tensor]] for the targets
class_docstr_tok: ["Performs","input","\/","target","transformation","before","feeding","the","data","to","a","GeneralizedRCNN","model",".","The","transformations","it","performs","are",":","-","input","normalization","(","mean","subtraction","and","std","division",")","-","input","\/","target","resizing","to","match","min_size","\/","max_size","It","returns","a","ImageList","for","the","inputs",",","and","a","List","[","Dict","[","Tensor","]","]","for","the","targets"]
code: def postprocess(
      self,
      result: List[Dict[str, Tensor]],
      image_shapes: List[Tuple[int, int]],
      original_image_sizes: List[Tuple[int, int]],
  ) -> List[Dict[str, Tensor]]:
      if self.training:
          return result
      for i, (pred, im_s, o_im_s) in enumerate(
          zip(result, image_shapes, original_image_sizes)
      ):
          boxes = pred["boxes"]
          boxes = resize_boxes(boxes, im_s, o_im_s)
          result[i]["boxes"] = boxes
          if "masks" in pred:
              masks = pred["masks"]
              masks = paste_masks_in_image(masks, boxes, o_im_s)
              result[i]["masks"] = masks
          if "keypoints" in pred:
              keypoints = pred["keypoints"]
              keypoints = resize_keypoints(keypoints, im_s, o_im_s)
              result[i]["keypoints"] = keypoints
      return result
  
imports: import math
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  import torchvision
  from torch import nn, Tensor
  from .image_list import ImageList
  from .roi_heads import paste_masks_in_image
label_desc: Use image node_id 9 for calling the GeneralizedRCNNTransform obj's underlying member method code with example usage: obj.postprocess(result, image_shapes, original_image_sizes) and returns: result, result