code: def __init__(
      self,
      instances,
      anchors,
      labels,
      downsample=32,  # ratio between network input's size and network output's size, 32 for YOLOv3
      max_box_per_image=30,
      batch_size=1,
      min_net_size=320,
      max_net_size=608,
      shuffle=True,
      jitter=True,
      norm=None,
  ):
      self.instances = instances
      self.batch_size = batch_size
      self.labels = labels
      self.downsample = downsample
      self.max_box_per_image = max_box_per_image
      self.min_net_size = (
          min_net_size // self.downsample
      ) * self.downsample
      self.max_net_size = (
          max_net_size // self.downsample
      ) * self.downsample
      self.shuffle = shuffle
      self.jitter = jitter
      self.norm = norm
      self.anchors = [
          BoundBox(0, 0, anchors[2 * i], anchors[2 * i + 1])
          for i in range(len(anchors) // 2)
      ]
      self.net_h = 416
      self.net_w = 416
  
      if shuffle:
          np.random.shuffle(self.instances)
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/generator.py
imports: import cv2
  import copy
  import numpy
  from tensorflow.keras.utils import Sequence
  from imageai.Detection.Custom.utils.bbox import BoundBox, bbox_iou
  from imageai.Detection.Custom.utils.image import apply_random_scale_and_crop, random_distort_image, random_flip, correct_bounding_boxes
label_desc: Use image node_id 1 to create a new BatchGenerator object from inherited base classes: Sequence with example: obj = BatchGenerator(instances, anchors, labels, downsample, max_box_per_image, batch_size, min_net_size, max_net_size, shuffle, jitter, norm)