fiftyone.zoo.datasets.tf¶
FiftyOne Zoo Datasets provided by tensorflow_datasets
.
Classes:
Base class for zoo datasets that are provided via the |
|
The MNIST database of handwritten digits. |
|
The Fashion-MNIST database of Zalando’s fashion article images. |
|
The CIFAR-10 dataset of images. |
|
The CIFAR-100 dataset of images. |
|
|
The ImageNet 2012 dataset. |
The dataset for the PASCAL Visual Object Classes Challenge 2007 (VOC2007) for the detection competition. |
|
The dataset for the PASCAL Visual Object Classes Challenge 2012 (VOC2012) for the detection competition. |
-
class
fiftyone.zoo.datasets.tf.
TFDSDataset
¶ Bases:
fiftyone.zoo.datasets.ZooDataset
Base class for zoo datasets that are provided via the
tensorflow_datasets
package.Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.Attributes:
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
The name of the dataset.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset supports downloading partial subsets of its splits.
A tuple of tags for the dataset.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
name
¶ The name of the dataset.
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
A tuple of tags for the dataset.
-
-
class
fiftyone.zoo.datasets.tf.
MNISTDataset
¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
The MNIST database of handwritten digits.
The dataset consists of 70,000 28 x 28 grayscale images in 10 classes. There are 60,000 training images and 10,000 test images.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("mnist", split="test") session = fo.launch_app(dataset)
- Dataset size
21.00 MB
- Source
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
-
class
fiftyone.zoo.datasets.tf.
FashionMNISTDataset
¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
The Fashion-MNIST database of Zalando’s fashion article images.
The dataset consists of 70,000 28 x 28 grayscale images in 10 classes. There are 60,000 training images and 10,000 test images.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("fashion-mnist", split="test") session = fo.launch_app(dataset)
- Dataset size
36.42 MB
- Source
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
-
class
fiftyone.zoo.datasets.tf.
CIFAR10Dataset
¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
The CIFAR-10 dataset of images.
The dataset consists of 60,000 32 x 32 color images in 10 classes, with 6,000 images per class. There are 50,000 training images and 10,000 test images.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("cifar10", split="test") session = fo.launch_app(dataset)
- Dataset size
132.40 MB
- Source
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
-
class
fiftyone.zoo.datasets.tf.
CIFAR100Dataset
¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
The CIFAR-100 dataset of images.
The dataset consists of 60,000 32 x 32 color images in 100 classes, with 600 images per class. There are 50,000 training images and 10,000 test images.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("cifar100", split="test") session = fo.launch_app(dataset)
- Dataset size
132.03 MB
- Source
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
-
class
fiftyone.zoo.datasets.tf.
ImageNet2012Dataset
(source_dir=None)¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
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
- Parameters
source_dir (None) – the directory containing the manually downloaded ImageNet files
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
-
class
fiftyone.zoo.datasets.tf.
VOC2007Dataset
¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
The dataset for the PASCAL Visual Object Classes Challenge 2007 (VOC2007) for the detection competition.
A total of 9,963 images are included in this dataset, where each image contains a set of objects, out of 20 different classes, making a total of 24,640 annotated objects.
Note that, as per the official dataset, the test set of VOC2007 does not contain annotations.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("voc-2007", split="validation") session = fo.launch_app(dataset)
- Dataset size
868.85 MB
- Source
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.
-
class
fiftyone.zoo.datasets.tf.
VOC2012Dataset
¶ Bases:
fiftyone.zoo.datasets.tf.TFDSDataset
The dataset for the PASCAL Visual Object Classes Challenge 2012 (VOC2012) for the detection competition.
A total of 11,540 images are included in this dataset, where each image contains a set of objects, out of 20 different classes, making a total of 27,450 annotated objects.
Note that, as per the official dataset, the test set of VOC2012 does not contain annotations.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz dataset = foz.load_zoo_dataset("voc-2012", split="validation") session = fo.launch_app(dataset)
- Dataset size
3.59 GB
- Source
Attributes:
The name of the dataset.
A tuple of tags for the dataset.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset has splits.
Whether the dataset has tags.
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.Whether the dataset is remotely-sourced.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
Whether the dataset supports downloading partial subsets of its splits.
Methods:
download_and_prepare
(dataset_dir[, split, …])Downloads the dataset and prepares it for use.
get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.get_split_dir
(dataset_dir, split)Returns the directory for the given split of the dataset.
has_info
(dataset_dir)Determines whether the directory contains
ZooDatasetInfo
.has_split
(split)Whether the dataset has the given split.
has_tag
(tag)Whether the dataset has the given tag.
load_info
(dataset_dir[, upgrade, …])Loads the
ZooDatasetInfo
from the given dataset directory.-
property
name
¶ The name of the dataset.
A tuple of tags for the dataset.
-
property
supported_splits
¶ A tuple of supported splits for the dataset, or None if the dataset does not have splits.
-
download_and_prepare
(dataset_dir, split=None, splits=None, cleanup=True)¶ Downloads the dataset and prepares it for use.
If the requested splits have already been downloaded, they are not re-downloaded.
- Parameters
dataset_dir – the directory in which to construct the dataset
split (None) –
split
norsplits
are provided, the full dataset is downloadedsplits (None) – a list of splits to download, if applicable. If neither
split
norsplits
are provided, the full dataset is downloadedcleanup (True) – whether to cleanup any temporary files generated during download
- Returns
the
ZooDatasetInfo
for the dataset
-
static
get_info_path
(dataset_dir)¶ Returns the path to the
ZooDatasetInfo
for the dataset.- Parameters
dataset_dir – the dataset directory
- Returns
the path to the
ZooDatasetInfo
-
get_split_dir
(dataset_dir, split)¶ Returns the directory for the given split of the dataset.
- Parameters
dataset_dir – the dataset directory
split – the dataset split
- Returns
the directory that will/does hold the specified split
-
static
has_info
(dataset_dir)¶ Determines whether the directory contains
ZooDatasetInfo
.- Parameters
dataset_dir – the dataset directory
- Returns
True/False
-
property
has_patches
¶ Whether the dataset has patches that may need to be applied to already downloaded files.
-
has_split
(split)¶ Whether the dataset has the given split.
- Parameters
split – the dataset split
- Returns
True/False
-
property
has_splits
¶ Whether the dataset has splits.
-
has_tag
(tag)¶ Whether the dataset has the given tag.
- Parameters
tag – the tag
- Returns
True/False
Whether the dataset has tags.
-
property
importer_kwargs
¶ A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
-
property
is_remote
¶ Whether the dataset is remotely-sourced.
-
static
load_info
(dataset_dir, upgrade=True, warn_deprecated=False)¶ Loads the
ZooDatasetInfo
from the given dataset directory.- Parameters
dataset_dir – the directory in which to construct the dataset
upgrade (True) – whether to upgrade the JSON file on disk if any migrations were necessary
warn_deprecated (False) – whether to issue a warning if the dataset has a deprecated format
- Returns
the
ZooDatasetInfo
for the dataset
-
property
parameters
¶ An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
-
property
requires_manual_download
¶ Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
-
property
supports_partial_downloads
¶ Whether the dataset supports downloading partial subsets of its splits.