docstr: This Iter will provide roi data to Fast R-CNN network
  :param feat_sym: to infer shape of assign_output
  :param roidb: must be preprocessed
  :param batch_size: must divide BATCH_SIZE(128)
  :param shuffle: bool
  :param ctx: list of contexts
  :param work_load_list: list of work load
  :param aspect_grouping: group images with similar aspects
  :return: AnchorLoader
docstr_tok: ["This","Iter","will","provide","roi","data","to","Fast","R-CNN","network",":","param","feat_sym",":","to","infer","shape","of","assign_output",":","param","roidb",":","must","be","preprocessed",":","param","batch_size",":","must","divide","BATCH_SIZE","(","128",")",":","param","shuffle",":","bool",":","param","ctx",":","list","of","contexts",":","param","work_load_list",":","list","of","work","load",":","param","aspect_grouping",":","group","images","with","similar","aspects",":","return",":","AnchorLoader"]
code: def __init__(
      self,
      feat_sym,
      roidb,
      batch_size=1,
      shuffle=False,
      ctx=None,
      work_load_list=None,
      aspect_grouping=False,
  ):
      """
      This Iter will provide roi data to Fast R-CNN network
      :param feat_sym: to infer shape of assign_output
      :param roidb: must be preprocessed
      :param batch_size: must divide BATCH_SIZE(128)
      :param shuffle: bool
      :param ctx: list of contexts
      :param work_load_list: list of work load
      :param aspect_grouping: group images with similar aspects
      :return: AnchorLoader
      """
      super(CropLoader, self).__init__()
  
      # save parameters as properties
      self.feat_sym = feat_sym
      self.roidb = roidb
      self.batch_size = batch_size
      self.shuffle = shuffle
      self.ctx = ctx
      if self.ctx is None:
          self.ctx = [mx.cpu()]
      self.work_load_list = work_load_list
      # self.feat_stride = feat_stride
      # self.anchor_scales = anchor_scales
      # self.anchor_ratios = anchor_ratios
      # self.allowed_border = allowed_border
      self.aspect_grouping = aspect_grouping
      self.feat_stride = config.RPN_FEAT_STRIDE
  
      # infer properties from roidb
      self.size = len(roidb)
      self.index = np.arange(self.size)
  
      # decide data and label names
      # self.data_name = ['data']
      # self.label_name = []
      # self.label_name.append('label')
      # self.label_name.append('bbox_target')
      # self.label_name.append('bbox_weight')
  
      self.data_name = ["data"]
      # self.label_name = ['label', 'bbox_target', 'bbox_weight']
      self.label_name = []
      prefixes = ["face"]
      if config.HEAD_BOX:
          prefixes.append("head")
      names = []
      for prefix in prefixes:
          names += [
              prefix + "_label",
              prefix + "_bbox_target",
              prefix + "_bbox_weight",
          ]
          if prefix == "face" and config.FACE_LANDMARK:
              names += [
                  prefix + "_landmark_target",
                  prefix + "_landmark_weight",
              ]
      # names = ['label', 'bbox_weight']
      for stride in self.feat_stride:
          for n in names:
              k = "%s_stride%d" % (n, stride)
              self.label_name.append(k)
      if config.CASCADE > 0:
          self.label_name.append("gt_boxes")
  
      # status variable for synchronization between get_data and get_label
      self.cur = 0
      self.batch = None
      self.data = None
      self.label = None
      # infer shape
      feat_shape_list = []
      _data_shape = [
          (
              "data",
              (
                  1,
                  3,
                  max([v[1] for v in config.SCALES]),
                  max([v[1] for v in config.SCALES]),
              ),
          )
      ]
      _data_shape = dict(_data_shape)
      for i in range(len(self.feat_stride)):
          _, feat_shape, _ = self.feat_sym[i].infer_shape(**_data_shape)
          feat_shape = [int(i) for i in feat_shape[0]]
          feat_shape_list.append(feat_shape)
      self.aa = AA(feat_shape_list)
  
      self._debug = False
      self._debug_id = 0
      self._times = [0.0, 0.0, 0.0, 0.0]
  
      # get first batch to fill in provide_data and provide_label
      self.reset()
      self.get_batch()
  
imports: from __future__ import print_function
  import sys
  import mxnet
  import numpy
  import random
  import datetime
  import multiprocessing
  import cv2
  from mxnet.executor_manager import _split_input_slice
  from rcnn.config import config
  from rcnn.io.image import tensor_vstack
  from rcnn.io.rpn import get_rpn_testbatch, get_rpn_batch, assign_anchor_fpn, get_crop_batch, AA
label_desc: Use image node_id 1 to create a new CropLoader object from inherited base classes: mx.io with example: obj = CropLoader(feat_sym, roidb, batch_size, shuffle, ctx, work_load_list, aspect_grouping)