class_docstr: The ImageNet 2012 dataset.
  
  ImageNet, as known as ILSVRC 2012, is an image dataset organized according
  to the WordNet hierarchy. Each meaningful concept in WordNet, possibly
  described by multiple words or word phrases, is called a "synonym set" or
  "synset". There are more than 100,000 synsets in WordNet, majority of them
  are nouns (80,000+). ImageNet provides on average 1,000 images to
  illustrate each synset. Images of each concept are quality-controlled and
  human-annotated. In its completion, we hope ImageNet will offer tens of
  millions of cleanly sorted images for most of the concepts in the WordNet
  hierarchy.
  
  Note that labels were never publicly released for the test set, so only the
  training and validation sets are provided.
  
  In order to load the ImageNet dataset, you must download the source data
  manually. The directory should be organized in the following format::
  
      source_dir/
          ILSVRC2012_devkit_t12.tar.gz    # both splits
          ILSVRC2012_img_train.tar        # train split
          ILSVRC2012_img_val.tar          # validation split
  
  You can register at http://www.image-net.org/download-images in order to
  get links to download the data.
  
  Example usage::
  
      import fiftyone as fo
      import fiftyone.zoo as foz
  
      # The path to the source files that you manually downloaded
      source_dir = "/path/to/dir-with-imagenet-files"
  
      dataset = foz.load_zoo_dataset(
          "imagenet-2012",
          split="validation",
          source_dir=source_dir,
      )
  
      session = fo.launch_app(dataset)
  
  Dataset size
      144.02 GB
  
  Source
      http://image-net.org
  
  Args:
      source_dir (None): the directory containing the manually downloaded
          ImageNet files
class_docstr_tok: ["The","ImageNet","2012","dataset",".","ImageNet",",","as","known","as","ILSVRC","2012",",","is","an","image","dataset","organized","according","to","the","WordNet","hierarchy",".","Each","meaningful","concept","in","WordNet",",","possibly","described","by","multiple","words","or","word","phrases",",","is","called","a","``","synonym","set","''","or","''","synset","''",".","There","are","more","than","100,000","synsets","in","WordNet",",","majority","of","them","are","nouns","(","80,000+",")",".","ImageNet","provides","on","average","1,000","images","to","illustrate","each","synset",".","Images","of","each","concept","are","quality-controlled","and","human-annotated",".","In","its","completion",",","we","hope","ImageNet","will","offer","tens","of","millions","of","cleanly","sorted","images","for","most","of","the","concepts","in","the","WordNet","hierarchy",".","Note","that","labels","were","never","publicly","released","for","the","test","set",",","so","only","the","training","and","validation","sets","are","provided",".","In","order","to","load","the","ImageNet","dataset",",","you","must","download","the","source","data","manually",".","The","directory","should","be","organized","in","the","following","format",":",":","source_dir\/","ILSVRC2012_devkit_t12.tar.gz","#","both","splits","ILSVRC2012_img_train.tar","#","train","split","ILSVRC2012_img_val.tar","#","validation","split","You","can","register","at","http",":","\/\/www.image-net.org\/download-images","in","order","to","get","links","to","download","the","data",".","Example","usage",":",":","import","fiftyone","as","fo","import","fiftyone.zoo","as","foz","#","The","path","to","the","source","files","that","you","manually","downloaded","source_dir","=","``","\/path\/to\/dir-with-imagenet-files","''","dataset","=","foz.load_zoo_dataset","(","``","imagenet-2012","''",",","split=","''","validation","''",",","source_dir=source_dir",",",")","session","=","fo.launch_app","(","dataset",")","Dataset","size","144.02","GB","Source","http",":","\/\/image-net.org","Args",":","source_dir","(","None",")",":","the","directory","containing","the","manually","downloaded","ImageNet","files"]
code: def _download_and_prepare(self, dataset_dir, scratch_dir, split):
      # Ensure that the source files have been manually downloaded
      foui.ensure_imagenet_manual_download(self.source_dir, split)
  
      if split == "validation":
          _split = "val"
      else:
          _split = split
  
      def download_fcn(_):
          return tfds.load(
              "imagenet2012",
              split=_split,
              data_dir=self.source_dir,
              with_info=True,
              download_and_prepare_kwargs={"download_dir": scratch_dir},
          )
  
      get_classes_fcn = lambda info: info.features["label"].names
      get_num_samples_fcn = lambda info: info.splits[
          _split
      ].num_examples
      sample_parser = _TFDSImageClassificationSampleParser()
      return _download_and_prepare(
          dataset_dir,
          None,
          download_fcn,
          get_classes_fcn,
          get_num_samples_fcn,
          sample_parser,
      )
  
imports: import fiftyone.core.labels
  import fiftyone.core.utils
  import fiftyone.types
  import fiftyone.utils.imagenet
  import fiftyone.utils.data
  import fiftyone.zoo.datasets
label_desc: Use image node_id 6 for calling the ImageNet2012Dataset obj's underlying member method code with example usage: obj._download_and_prepare(dataset_dir, scratch_dir, split) and returns: _download_and_prepare, tfds