class_docstr: Provide methods to access metadata for :class:`ILSVRC12` dataset.
class_docstr_tok: ["Provide","methods","to","access","metadata","for",":","class",":","`","ILSVRC12","`","dataset","."]
code: def __init__(self, dir=None):
      if dir is None:
          dir = get_dataset_path("ilsvrc_metadata")
      self.dir = os.path.expanduser(dir)
      mkdir_p(self.dir)
      f = os.path.join(self.dir, "synsets.txt")
      if not os.path.isfile(f):
          self._download_caffe_meta()
      self.caffepb = None
  
imports: import numpy
  import os
  import tarfile
  import tqdm
  from pathlib import Path
  from ...utils import logger
  from ...utils.fs import download, get_dataset_path, mkdir_p
  from ...utils.loadcaffe import get_caffe_pb
  from ...utils.timer import timed_operation
  from ..base import RNGDataFlow
label_desc: Use image node_id 1 to create a new ILSVRCMeta object from inherited base classes: object with example: obj = ILSVRCMeta(dir)