code: def __init__(
      self,
      image_set,
      year,
      classes,
      maxNrRois,
      cacheDir,
      devkit_path=None,
  ):
      imdb.__init__(self, "voc_" + year + "_" + image_set)
      self._year = year
      self._image_set = image_set
      self._maxNrRois = maxNrRois
      self._ROOT_DIR = os.path.join(os.path.dirname(__file__), "..")
      self._cacheDir = cacheDir
      self._devkit_path = (
          self._get_default_path()
          if devkit_path is None
          else os.path.join(devkit_path, "VOCdevkit")
      )
      self._data_path = os.path.join(
          self._devkit_path, "VOC" + self._year
      )
      self._classes = classes
      # ('__background__', # always index 0
      # 'aeroplane', 'bicycle', 'bird', 'boat',
      # 'bottle', 'bus', 'car', 'cat', 'chair',
      # 'cow', 'diningtable', 'dog', 'horse',
      # 'motorbike', 'person', 'pottedplant',
      # 'sheep', 'sofa', 'train', 'tvmonitor')
      self._class_to_ind = dict(
          zip(self.classes, range(self.num_classes))
      )
      self._image_ext = ".jpg"
      self._image_index = self._load_image_set_index()
      # Default to roidb handler
      self._roidb_handler = self.selective_search_roidb
  
      # PASCAL specific config options
      self.config = {"cleanup": True, "use_salt": True, "top_k": 2000}
  
      assert os.path.exists(
          self._devkit_path
      ), "VOCdevkit path does not exist: {}".format(self._devkit_path)
      assert os.path.exists(
          self._data_path
      ), "Path does not exist: {}".format(self._data_path)
  
imports: from __future__ import print_function
  import os, pdb
  import xml.dom.minidom
  import numpy
  import scipy.sparse
  import scipy.io
  import pickle
  import subprocess
  from .imdb import imdb
  from .voc_eval import voc_eval
label_desc: Use image node_id 1 to create a new pascal_voc object from inherited base classes: imdb with example: obj = pascal_voc(image_set, year, classes, maxNrRois, cacheDir, devkit_path)