class ImageNet2012Dataset(TFDSDataset): (source)
Constructor: ImageNet2012Dataset(source_dir)
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
Parameters | |
source | the directory containing the manually downloaded ImageNet files |
Method | __init__ |
Undocumented |
Instance Variable | source |
Undocumented |
Property | name |
The name of the dataset. |
Property | requires |
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded. |
Property | supported |
A tuple of supported splits for the dataset, or None if the dataset does not have splits. |
Property | tags |
A tuple of tags for the dataset. |
Method | _download |
Internal implementation of downloading the dataset and preparing it for use in the given directory. |
Inherited from ZooDataset
(via TFDSDataset
):
Static Method | get |
Returns the path to the ZooDatasetInfo for the dataset. |
Static Method | has |
Determines whether the directory contains ZooDatasetInfo . |
Static Method | load |
Loads the ZooDatasetInfo from the given dataset directory. |
Method | download |
Downloads the dataset and prepares it for use. |
Method | get |
Returns the directory for the given split of the dataset. |
Method | has |
Whether the dataset has the given split. |
Method | has |
Whether the dataset has the given tag. |
Property | has |
Whether the dataset has patches that may need to be applied to already downloaded files. |
Property | has |
Whether the dataset has splits. |
Property | has |
Whether the dataset has tags. |
Property | importer |
A dict of default kwargs to pass to this dataset's fiftyone.utils.data.importers.DatasetImporter . |
Property | is |
Whether the dataset is remotely-sourced. |
Property | parameters |
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded. |
Property | supports |
Whether the dataset supports downloading partial subsets of its splits. |
Method | _get |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _patch |
Internal method called when an already downloaded dataset may need to be patched. |
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Internal implementation of downloading the dataset and preparing it for use in the given directory.
Parameters | |
dataset | the directory in which to construct the dataset. If a split is provided, this is the directory for the split |
scratch | a scratch directory to use to download and prepare any required intermediate files |
split | the split to download, or None if the dataset does not have splits |
Returns | |
tuple of |
|