class_docstr: Pascal VOC detection Dataset.
  
  Parameters
  ----------
  root : str, default '~/mxnet/datasets/voc'
      Path to folder storing the dataset.
  splits : list of tuples, default ((2007, 'trainval'), (2012, 'trainval'))
      List of combinations of (year, name)
      For years, candidates can be: 2007, 2012.
      For names, candidates can be: 'train', 'val', 'trainval', 'test'.
  transform : callable, default None
      A function that takes data and label and transforms them. Refer to
      :doc:`./transforms` for examples.
  
      A transform function for object detection should take label into consideration,
      because any geometric modification will require label to be modified.
  index_map : dict, default None
      In default, the 20 classes are mapped into indices from 0 to 19. We can
      customize it by providing a str to int dict specifying how to map class
      names to indices. Use by advanced users only, when you want to swap the orders
      of class labels.
  preload_label : bool, default True
      If True, then parse and load all labels into memory during
      initialization. It often accelerate speed but require more memory
      usage. Typical preloaded labels took tens of MB. You only need to disable it
      when your dataset is extremely large.
class_docstr_tok: ["Pascal","VOC","detection","Dataset",".","Parameters","--","--","--","--","--","root",":","str",",","default","'~\/mxnet\/datasets\/voc'","Path","to","folder","storing","the","dataset",".","splits",":","list","of","tuples",",","default","(","(","2007",",","'trainval","'",")",",","(","2012",",","'trainval","'",")",")","List","of","combinations","of","(","year",",","name",")","For","years",",","candidates","can","be",":","2007",",","2012",".","For","names",",","candidates","can","be",":","'train","'",",","'val","'",",","'trainval","'",",","'test","'",".","transform",":","callable",",","default","None","A","function","that","takes","data","and","label","and","transforms","them",".","Refer","to",":","doc",":","`",".\/transforms","`","for","examples",".","A","transform","function","for","object","detection","should","take","label","into","consideration",",","because","any","geometric","modification","will","require","label","to","be","modified",".","index_map",":","dict",",","default","None","In","default",",","the","20","classes","are","mapped","into","indices","from","0","to","19",".","We","can","customize","it","by","providing","a","str","to","int","dict","specifying","how","to","map","class","names","to","indices",".","Use","by","advanced","users","only",",","when","you","want","to","swap","the","orders","of","class","labels",".","preload_label",":","bool",",","default","True","If","True",",","then","parse","and","load","all","labels","into","memory","during","initialization",".","It","often","accelerate","speed","but","require","more","memory","usage",".","Typical","preloaded","labels","took","tens","of","MB",".","You","only","need","to","disable","it","when","your","dataset","is","extremely","large","."]
code: def __init__(
      self,
      root=os.path.join("~", ".mxnet", "datasets", "voc"),
      splits=((2007, "trainval"), (2012, "trainval")),
      transform=None,
      index_map=None,
      preload_label=True,
  ):
      super(VOCDetection, self).__init__(root)
      self._im_shapes = {}
      self._root = os.path.expanduser(root)
      self._transform = transform
      self._splits = splits
      self._items = self._load_items(splits)
      self._anno_path = os.path.join("{}", "Annotations", "{}.xml")
      self._image_path = os.path.join("{}", "JPEGImages", "{}.jpg")
      self.index_map = index_map or dict(
          zip(self.classes, range(self.num_class))
      )
      self._label_cache = (
          self._preload_labels() if preload_label else None
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  import glob
  import logging
  import os
  import warnings
  import numpy
  import mxnet
  from ..base import VisionDataset
label_desc: Use image node_id 1 to create a new VOCDetection object from inherited base classes: VisionDataset with example: obj = VOCDetection(root, splits, transform, index_map, preload_label)