class_docstr: Image iterator with a large number of augmentation choices for detection.
  
  Parameters
  ----------
  aug_list : list or None
      Augmenter list for generating distorted images
  batch_size : int
      Number of examples per batch.
  data_shape : tuple
      Data shape in (channels, height, width) format.
      For now, only RGB image with 3 channels is supported.
  path_imgrec : str
      Path to image record file (.rec).
      Created with tools/im2rec.py or bin/im2rec.
  path_imglist : str
      Path to image list (.lst).
      Created with tools/im2rec.py or with custom script.
      Format: Tab separated record of index, one or more labels and relative_path_from_root.
  imglist: list
      A list of images with the label(s).
      Each item is a list [imagelabel: float or list of float, imgpath].
  path_root : str
      Root folder of image files.
  path_imgidx : str
      Path to image index file. Needed for partition and shuffling when using .rec source.
  shuffle : bool
      Whether to shuffle all images at the start of each iteration or not.
      Can be slow for HDD.
  part_index : int
      Partition index.
  num_parts : int
      Total number of partitions.
  data_name : str
      Data name for provided symbols.
  label_name : str
      Name for detection labels
  last_batch_handle : str, optional
      How to handle the last batch.
      This parameter can be 'pad'(default), 'discard' or 'roll_over'.
      If 'pad', the last batch will be padded with data starting from the begining
      If 'discard', the last batch will be discarded
      If 'roll_over', the remaining elements will be rolled over to the next iteration
  kwargs : ...
      More arguments for creating augmenter. See mx.image.CreateDetAugmenter.
class_docstr_tok: ["Image","iterator","with","a","large","number","of","augmentation","choices","for","detection",".","Parameters","--","--","--","--","--","aug_list",":","list","or","None","Augmenter","list","for","generating","distorted","images","batch_size",":","int","Number","of","examples","per","batch",".","data_shape",":","tuple","Data","shape","in","(","channels",",","height",",","width",")","format",".","For","now",",","only","RGB","image","with","3","channels","is","supported",".","path_imgrec",":","str","Path","to","image","record","file","(",".rec",")",".","Created","with","tools\/im2rec.py","or","bin\/im2rec",".","path_imglist",":","str","Path","to","image","list","(",".lst",")",".","Created","with","tools\/im2rec.py","or","with","custom","script",".","Format",":","Tab","separated","record","of","index",",","one","or","more","labels","and","relative_path_from_root",".","imglist",":","list","A","list","of","images","with","the","label","(","s",")",".","Each","item","is","a","list","[","imagelabel",":","float","or","list","of","float",",","imgpath","]",".","path_root",":","str","Root","folder","of","image","files",".","path_imgidx",":","str","Path","to","image","index","file",".","Needed","for","partition","and","shuffling","when","using",".rec","source",".","shuffle",":","bool","Whether","to","shuffle","all","images","at","the","start","of","each","iteration","or","not",".","Can","be","slow","for","HDD",".","part_index",":","int","Partition","index",".","num_parts",":","int","Total","number","of","partitions",".","data_name",":","str","Data","name","for","provided","symbols",".","label_name",":","str","Name","for","detection","labels","last_batch_handle",":","str",",","optional","How","to","handle","the","last","batch",".","This","parameter","can","be","'pad","'","(","default",")",",","'discard","'","or","'roll_over","'",".","If","'pad","'",",","the","last","batch","will","be","padded","with","data","starting","from","the","begining","If","'discard","'",",","the","last","batch","will","be","discarded","If","'roll_over","'",",","the","remaining","elements","will","be","rolled","over","to","the","next","iteration","kwargs",":","...","More","arguments","for","creating","augmenter",".","See","mx.image.CreateDetAugmenter","."]
docstr: Synchronize label shape with the input iterator. This is useful when
  train/validation iterators have different label padding.
  
  Parameters
  ----------
  it : ImageDetIter
      The other iterator to synchronize
  verbose : bool
      Print verbose log if true
  
  Returns
  -------
  ImageDetIter
      The synchronized other iterator, the internal label shape is updated as well.
  
  Examples
  --------
  >>> train_iter = mx.image.ImageDetIter(32, (3, 300, 300), path_imgrec='train.rec')
  >>> val_iter = mx.image.ImageDetIter(32, (3, 300, 300), path.imgrec='val.rec')
  >>> train_iter.label_shape
  (30, 6)
  >>> val_iter.label_shape
  (25, 6)
  >>> val_iter = train_iter.sync_label_shape(val_iter, verbose=False)
  >>> train_iter.label_shape
  (30, 6)
  >>> val_iter.label_shape
  (30, 6)
docstr_tok: ["Synchronize","label","shape","with","the","input","iterator",".","This","is","useful","when","train\/validation","iterators","have","different","label","padding",".","Parameters","--","--","--","--","--","it",":","ImageDetIter","The","other","iterator","to","synchronize","verbose",":","bool","Print","verbose","log","if","true","Returns","--","--","--","-","ImageDetIter","The","synchronized","other","iterator",",","the","internal","label","shape","is","updated","as","well",".","Examples","--","--","--","--",">",">",">","train_iter","=","mx.image.ImageDetIter","(","32",",","(","3",",","300",",","300",")",",","path_imgrec='train.rec","'",")",">",">",">","val_iter","=","mx.image.ImageDetIter","(","32",",","(","3",",","300",",","300",")",",","path.imgrec='val.rec","'",")",">",">",">","train_iter.label_shape","(","30",",","6",")",">",">",">","val_iter.label_shape","(","25",",","6",")",">",">",">","val_iter","=","train_iter.sync_label_shape","(","val_iter",",","verbose=False",")",">",">",">","train_iter.label_shape","(","30",",","6",")",">",">",">","val_iter.label_shape","(","30",",","6",")"]
code: def sync_label_shape(self, it, verbose=False):
      """Synchronize label shape with the input iterator. This is useful when
      train/validation iterators have different label padding.
  
      Parameters
      ----------
      it : ImageDetIter
          The other iterator to synchronize
      verbose : bool
          Print verbose log if true
  
      Returns
      -------
      ImageDetIter
          The synchronized other iterator, the internal label shape is updated as well.
  
      Examples
      --------
      >>> train_iter = mx.image.ImageDetIter(32, (3, 300, 300), path_imgrec='train.rec')
      >>> val_iter = mx.image.ImageDetIter(32, (3, 300, 300), path.imgrec='val.rec')
      >>> train_iter.label_shape
      (30, 6)
      >>> val_iter.label_shape
      (25, 6)
      >>> val_iter = train_iter.sync_label_shape(val_iter, verbose=False)
      >>> train_iter.label_shape
      (30, 6)
      >>> val_iter.label_shape
      (30, 6)
      """
      assert isinstance(
          it, ImageDetIter
      ), "Synchronize with invalid iterator."
      train_label_shape = self.label_shape
      val_label_shape = it.label_shape
      assert (
          train_label_shape[1] == val_label_shape[1]
      ), "object width mismatch."
      max_count = max(train_label_shape[0], val_label_shape[0])
      if max_count > train_label_shape[0]:
          self.reshape(None, (max_count, train_label_shape[1]))
      if max_count > val_label_shape[0]:
          it.reshape(None, (max_count, val_label_shape[1]))
      if verbose and max_count > min(
          train_label_shape[0], val_label_shape[0]
      ):
          logging.info(
              "Resized label_shape to (%d, %d).",
              max_count,
              train_label_shape[1],
          )
      return it
  
imports: import json
  import logging
  import random
  import warnings
  import numpy
  from ..base import numeric_types
  from ..None import ndarray
  from ..ndarray._internal import _cvcopyMakeBorder
  from ..None import io
  from .image import RandomOrderAug, ColorJitterAug, LightingAug, ColorNormalizeAug
  from .image import ResizeAug, ForceResizeAug, CastAug, HueJitterAug, RandomGrayAug
  from .image import fixed_crop, ImageIter, Augmenter
  from ..util import is_np_array
  from ..None import numpy
label_desc: Use image node_id 11 for calling the ImageDetIter obj's underlying member method code with example usage: obj.sync_label_shape(it, verbose) and returns: it