class_docstr: Superclass for monocular dataloaders
  Parameters
  ----------
  data_path : string
      Path to dataset folder.
  filenames : string
      Path to split file.
      For example: '$(HOME)/.mxnet/datasets/kitti/splits/eigen_full/train_files.txt'
  height : int
      The height for input images.
  width : int
      The height for input images.
  frame_idxs : list
      The frames to load.
      an integer (e.g. 0, -1, or 1) representing the temporal step relative to 'index',
      or "s" for the opposite image in the stereo pair.
  num_scales : int
      The number of scales of the image relative to the full-size image.
  is_train : bool
      Whether use Data Augmentation. Default is: False
  img_ext : string
      The extension name of input image. Default is '.jpg'
class_docstr_tok: ["Superclass","for","monocular","dataloaders","Parameters","--","--","--","--","--","data_path",":","string","Path","to","dataset","folder",".","filenames",":","string","Path","to","split","file",".","For","example",":","'","$","(","HOME",")","\/.mxnet\/datasets\/kitti\/splits\/eigen_full\/train_files.txt'","height",":","int","The","height","for","input","images",".","width",":","int","The","height","for","input","images",".","frame_idxs",":","list","The","frames","to","load",".","an","integer","(","e.g",".","0",",","-1",",","or","1",")","representing","the","temporal","step","relative","to","'index","'",",","or","``","s","''","for","the","opposite","image","in","the","stereo","pair",".","num_scales",":","int","The","number","of","scales","of","the","image","relative","to","the","full-size","image",".","is_train",":","bool","Whether","use","Data","Augmentation",".","Default","is",":","False","img_ext",":","string","The","extension","name","of","input","image",".","Default","is","'.jpg","'"]
docstr: Resize colour images to the required scales and augment if required
  
  We create the color_aug object in advance and apply the same augmentation to all
  images in this item. This ensures that all images input to the pose network receive the
  same augmentation.
docstr_tok: ["Resize","colour","images","to","the","required","scales","and","augment","if","required","We","create","the","color_aug","object","in","advance","and","apply","the","same","augmentation","to","all","images","in","this","item",".","This","ensures","that","all","images","input","to","the","pose","network","receive","the","same","augmentation","."]
code: def preprocess(self, inputs, color_aug):
      """Resize colour images to the required scales and augment if required
  
      We create the color_aug object in advance and apply the same augmentation to all
      images in this item. This ensures that all images input to the pose network receive the
      same augmentation.
      """
      for k in list(inputs):
          if "color" in k:
              n, im, i = k
              for i in range(self.num_scales):
                  s = 2**i
                  size = (self.height // s, self.width // s)
                  inputs[(n, im, i)] = copy.deepcopy(
                      inputs[(n, im, i - 1)].resize(
                          size[::-1], self.interp
                      )
                  )
  
      for k in list(inputs):
          f = mx.nd.array(inputs[k])
          if "color" in k:
              n, im, i = k
              inputs[(n, im, i)] = self.to_tensor(f)
              inputs[(n + "_aug", im, i)] = self.to_tensor(color_aug(f))
  
file_path: gluon-cv/gluoncv/data/kitti/mono_dataset.py
imports: import random
  import copy
  import numpy
  from PIL import Image
  import mxnet
  from mxnet.gluon.data import dataset
  from mxnet.gluon.data.vision import transforms
label_desc: Use image node_id 2 for calling the MonoDataset obj's underlying member method code with example usage: obj.preprocess(inputs, color_aug) without return types