docstr: Takes images of variable sizes, returns preprocessed
  version based on config sizing, etc.
docstr_tok: ["Takes","images","of","variable","sizes",",","returns","preprocessed","version","based","on","config","sizing",",","etc","."]
code: def __call__(self, images: torch.Tensor, single_image: bool = False):
      """
      Takes images of variable sizes, returns preprocessed
      version based on config sizing, etc.
      """
      with torch.no_grad():
          if not isinstance(images, list):
              images = [images]
          if single_image:
              assert len(images) == 1
          for i in range(len(images)):
              if isinstance(images[i], torch.Tensor):
                  images.insert(
                      i, images.pop(i).to(self.device).float()
                  )
              elif not isinstance(images[i], torch.Tensor):
                  images.insert(
                      i,
                      torch.as_tensor(img_tensorize(images.pop(i)))
                      .to(self.device)
                      .float(),
                  )
          # resize smallest edge
          raw_sizes = torch.tensor([im.shape[:2] for im in images])
          images = self.aug(images)
  
          # flip rgb to bgr
          for idx in range(len(images)):
              images[idx] = torch.flip(images[idx], [0])
          # transpose images and convert to torch tensors
          # images = [torch.as_tensor(i.astype("float32"))
          # .permute(2, 0, 1).to(self.device) for i in images]
          # now normalize before pad to avoid useless arithmetic
          images = [self.normalizer(x) for x in images]
          # now pad them to do the following operations
          images, sizes = self.pad(images)
          # Normalize
  
          if self.size_divisibility > 0:
              raise NotImplementedError()
          # pad
          scales_yx = torch.true_divide(raw_sizes, sizes)
          if single_image:
              return images[0], sizes[0], scales_yx[0]
          else:
              return images, sizes, scales_yx
  
imports: import os
  import sys
  from dataclasses import dataclass
  from typing import List
  import numpy
  import omegaconf
  import torch
  import torch.nn.functional
  from mmf.common.registry import registry
  from mmf.datasets.processors.processors import BaseProcessor
  from mmf.utils.download import get_image_from_url
  from PIL import Image
label_desc: Use image node_id 3 for calling the FRCNNPreprocess obj's underlying member method code with example usage: obj.__call__(images, single_image) and returns: images,  sizes,  scales_yx, images,  sizes,  scales_yx