Table Of Contents
Table Of Contents

ImageDetRecordIter

mxnet.io.ImageDetRecordIter(*args, **kwargs)

b’Create iterator for image detection dataset packed in recordio.’

Parameters:
  • path_imglist (string, optional, default='') – Dataset Param: Path to image list.
  • path_imgrec (string, optional, default='./data/imgrec.rec') – Dataset Param: Path to image record file.
  • aug_seq (string, optional, default='det_aug_default') – Augmentation Param: the augmenter names to represent sequence of augmenters to be applied, seperated by comma. Additional keyword parameters will be seen by these augmenters. Make sure you don’t use normal augmenters for detection tasks.
  • label_width (int, optional, default='-1') – Dataset Param: How many labels for an image, -1 for variable label size.
  • data_shape (Shape(tuple), required) – Dataset Param: Shape of each instance generated by the DataIter.
  • preprocess_threads (int, optional, default='4') – Backend Param: Number of thread to do preprocessing.
  • verbose (boolean, optional, default=1) – Auxiliary Param: Whether to output parser information.
  • num_parts (int, optional, default='1') – partition the data into multiple parts
  • part_index (int, optional, default='0') – the index of the part will read
  • shuffle_chunk_size (long (non-negative), optional, default=0) – the size(MB) of the shuffle chunk, used with shuffle=True, it can enable global shuffling
  • shuffle_chunk_seed (int, optional, default='0') – the seed for chunk shuffling
  • label_pad_width (int, optional, default='0') – pad output label width if set larger than 0, -1 for auto estimate
  • label_pad_value (float, optional, default=-1) – label padding value if enabled
  • shuffle (boolean, optional, default=0) – Augmentation Param: Whether to shuffle data.
  • seed (int, optional, default='0') – Augmentation Param: Random Seed.
  • batch_size (int (non-negative), required) – Batch size.
  • round_batch (boolean, optional, default=1) – Whether to use round robin to handle overflow batch or not.
  • prefetch_buffer (long (non-negative), optional, default=4) – Maximum number of batches to prefetch.
  • dtype ({None, 'float16', 'float32', 'float64', 'int32', 'int64', 'uint8'},optional, default='None') – Output data type. None means no change.
  • resize (int, optional, default='-1') – Augmentation Param: scale shorter edge to size before applying other augmentations, -1 to disable.
  • rand_crop_prob (float, optional, default=0) – Augmentation Param: Probability of random cropping, <= 0 to disable
  • min_crop_scales (tuple of <float>, optional, default=[0]) – Augmentation Param: Min crop scales.
  • max_crop_scales (tuple of <float>, optional, default=[1]) – Augmentation Param: Max crop scales.
  • min_crop_aspect_ratios (tuple of <float>, optional, default=[1]) – Augmentation Param: Min crop aspect ratios.
  • max_crop_aspect_ratios (tuple of <float>, optional, default=[1]) – Augmentation Param: Max crop aspect ratios.
  • min_crop_overlaps (tuple of <float>, optional, default=[0]) – Augmentation Param: Minimum crop IOU between crop_box and ground-truths.
  • max_crop_overlaps (tuple of <float>, optional, default=[1]) – Augmentation Param: Maximum crop IOU between crop_box and ground-truth.
  • min_crop_sample_coverages (tuple of <float>, optional, default=[0]) – Augmentation Param: Minimum ratio of intersect/crop_area between crop box and ground-truths.
  • max_crop_sample_coverages (tuple of <float>, optional, default=[1]) – Augmentation Param: Maximum ratio of intersect/crop_area between crop box and ground-truths.
  • min_crop_object_coverages (tuple of <float>, optional, default=[0]) – Augmentation Param: Minimum ratio of intersect/gt_area between crop box and ground-truths.
  • max_crop_object_coverages (tuple of <float>, optional, default=[1]) – Augmentation Param: Maximum ratio of intersect/gt_area between crop box and ground-truths.
  • num_crop_sampler (int, optional, default='1') – Augmentation Param: Number of crop samplers.
  • crop_emit_mode ({'center', 'overlap'},optional, default='center') – Augmentation Param: Emition mode for invalid ground-truths after crop. center: emit if centroid of object is out of crop region; overlap: emit if overlap is less than emit_overlap_thresh.
  • emit_overlap_thresh (float, optional, default=0.3) – Augmentation Param: Emit overlap thresh for emit mode overlap only.
  • max_crop_trials (Shape(tuple), optional, default=[25]) – Augmentation Param: Skip cropping if fail crop trail count exceeds this number.
  • rand_pad_prob (float, optional, default=0) – Augmentation Param: Probability for random padding.
  • max_pad_scale (float, optional, default=1) – Augmentation Param: Maximum padding scale.
  • max_random_hue (int, optional, default='0') – Augmentation Param: Maximum random value of H channel in HSL color space.
  • random_hue_prob (float, optional, default=0) – Augmentation Param: Probability to apply random hue.
  • max_random_saturation (int, optional, default='0') – Augmentation Param: Maximum random value of S channel in HSL color space.
  • random_saturation_prob (float, optional, default=0) – Augmentation Param: Probability to apply random saturation.
  • max_random_illumination (int, optional, default='0') – Augmentation Param: Maximum random value of L channel in HSL color space.
  • random_illumination_prob (float, optional, default=0) – Augmentation Param: Probability to apply random illumination.
  • max_random_contrast (float, optional, default=0) – Augmentation Param: Maximum random value of delta contrast.
  • random_contrast_prob (float, optional, default=0) – Augmentation Param: Probability to apply random contrast.
  • rand_mirror_prob (float, optional, default=0) – Augmentation Param: Probability to apply horizontal flip aka. mirror.
  • fill_value (int, optional, default='127') – Augmentation Param: Filled color value while padding.
  • inter_method (int, optional, default='1') – Augmentation Param: 0-NN 1-bilinear 2-cubic 3-area 4-lanczos4 9-auto 10-rand.
  • resize_mode ({'fit', 'force', 'shrink'},optional, default='force') – Augmentation Param: How image data fit in data_shape. force: force reshape to data_shape regardless of aspect ratio; shrink: ensure each side fit in data_shape, preserve aspect ratio; fit: fit image to data_shape, preserve ratio, will upscale if applicable.
  • mean_img (string, optional, default='') – Augmentation Param: Mean Image to be subtracted.
  • mean_r (float, optional, default=0) – Augmentation Param: Mean value on R channel.
  • mean_g (float, optional, default=0) – Augmentation Param: Mean value on G channel.
  • mean_b (float, optional, default=0) – Augmentation Param: Mean value on B channel.
  • mean_a (float, optional, default=0) – Augmentation Param: Mean value on Alpha channel.
  • std_r (float, optional, default=0) – Augmentation Param: Standard deviation on R channel.
  • std_g (float, optional, default=0) – Augmentation Param: Standard deviation on G channel.
  • std_b (float, optional, default=0) – Augmentation Param: Standard deviation on B channel.
  • std_a (float, optional, default=0) – Augmentation Param: Standard deviation on Alpha channel.
  • scale (float, optional, default=1) – Augmentation Param: Scale in color space.
Returns:

The result iterator.

Return type:

MXDataIter