code: def __init__(self, data_dir, split, **kwargs):
      super(ImageNetReader, self).__init__(**kwargs)
      self._split = split
      self._data_dir = data_dir
      self._imagesets_path = os.path.join(
          self._data_dir, "ImageSets", "DET"
      )
      self._images_path = os.path.join(
          self._data_dir,
          "Data",
          "DET",
      )
      self._annotations_path = os.path.join(
          self._data_dir, "Annotations", "DET"
      )
  
      self.yielded_records = 0
      self.errors = 0
  
      # Validate Imagenet structure in `data_dir`.
      self._validate_structure()
  
      # Load wnids from file.
      wnids_path = os.path.join(
          os.path.dirname(os.path.realpath(__file__)), WNIDS_FILE
      )
      with tf.gfile.GFile(wnids_path) as wnidsjson:
          self._wnids = json.load(wnidsjson)
  
file_path: luminoth/luminoth/tools/dataset/readers/object_detection/imagenet.py
imports: import json
  import os
  import six
  import tensorflow
  from PIL import Image
  from luminoth.tools.dataset.readers import InvalidDataDirectory
  from luminoth.tools.dataset.readers.object_detection import ObjectDetectionReader
  from luminoth.utils.dataset import read_xml, read_image
label_desc: Use image node_id 1 to create a new ImageNetReader object from inherited base classes: ObjectDetectionReader with example: obj = ImageNetReader(data_dir, split)