fiftyone.zoo#
- fiftyone.zoo.datasets
- fiftyone.zoo.datasets.base
FiftyOneDataset
FiftyOneDataset.download_and_prepare()
FiftyOneDataset.get_info_path()
FiftyOneDataset.get_split_dir()
FiftyOneDataset.has_info()
FiftyOneDataset.has_patches
FiftyOneDataset.has_split()
FiftyOneDataset.has_splits
FiftyOneDataset.has_tag()
FiftyOneDataset.has_tags
FiftyOneDataset.importer_kwargs
FiftyOneDataset.is_remote
FiftyOneDataset.license
FiftyOneDataset.load_info()
FiftyOneDataset.name
FiftyOneDataset.parameters
FiftyOneDataset.requires_manual_download
FiftyOneDataset.supported_splits
FiftyOneDataset.supports_partial_downloads
FiftyOneDataset.tags
ActivityNet100Dataset
ActivityNet100Dataset.name
ActivityNet100Dataset.license
ActivityNet100Dataset.tags
ActivityNet100Dataset.supported_splits
ActivityNet100Dataset.supports_partial_downloads
ActivityNet100Dataset.download_and_prepare()
ActivityNet100Dataset.get_info_path()
ActivityNet100Dataset.get_split_dir()
ActivityNet100Dataset.has_info()
ActivityNet100Dataset.has_patches
ActivityNet100Dataset.has_split()
ActivityNet100Dataset.has_splits
ActivityNet100Dataset.has_tag()
ActivityNet100Dataset.has_tags
ActivityNet100Dataset.importer_kwargs
ActivityNet100Dataset.is_remote
ActivityNet100Dataset.load_info()
ActivityNet100Dataset.parameters
ActivityNet100Dataset.requires_manual_download
ActivityNet200Dataset
ActivityNet200Dataset.name
ActivityNet200Dataset.license
ActivityNet200Dataset.tags
ActivityNet200Dataset.supported_splits
ActivityNet200Dataset.supports_partial_downloads
ActivityNet200Dataset.download_and_prepare()
ActivityNet200Dataset.get_info_path()
ActivityNet200Dataset.get_split_dir()
ActivityNet200Dataset.has_info()
ActivityNet200Dataset.has_patches
ActivityNet200Dataset.has_split()
ActivityNet200Dataset.has_splits
ActivityNet200Dataset.has_tag()
ActivityNet200Dataset.has_tags
ActivityNet200Dataset.importer_kwargs
ActivityNet200Dataset.is_remote
ActivityNet200Dataset.load_info()
ActivityNet200Dataset.parameters
ActivityNet200Dataset.requires_manual_download
BDD100KDataset
BDD100KDataset.name
BDD100KDataset.license
BDD100KDataset.tags
BDD100KDataset.supported_splits
BDD100KDataset.requires_manual_download
BDD100KDataset.download_and_prepare()
BDD100KDataset.get_info_path()
BDD100KDataset.get_split_dir()
BDD100KDataset.has_info()
BDD100KDataset.has_patches
BDD100KDataset.has_split()
BDD100KDataset.has_splits
BDD100KDataset.has_tag()
BDD100KDataset.has_tags
BDD100KDataset.importer_kwargs
BDD100KDataset.is_remote
BDD100KDataset.load_info()
BDD100KDataset.parameters
BDD100KDataset.supports_partial_downloads
Caltech101Dataset
Caltech101Dataset.name
Caltech101Dataset.license
Caltech101Dataset.tags
Caltech101Dataset.supported_splits
Caltech101Dataset.download_and_prepare()
Caltech101Dataset.get_info_path()
Caltech101Dataset.get_split_dir()
Caltech101Dataset.has_info()
Caltech101Dataset.has_patches
Caltech101Dataset.has_split()
Caltech101Dataset.has_splits
Caltech101Dataset.has_tag()
Caltech101Dataset.has_tags
Caltech101Dataset.importer_kwargs
Caltech101Dataset.is_remote
Caltech101Dataset.load_info()
Caltech101Dataset.parameters
Caltech101Dataset.requires_manual_download
Caltech101Dataset.supports_partial_downloads
Caltech256Dataset
Caltech256Dataset.name
Caltech256Dataset.license
Caltech256Dataset.tags
Caltech256Dataset.supported_splits
Caltech256Dataset.download_and_prepare()
Caltech256Dataset.get_info_path()
Caltech256Dataset.get_split_dir()
Caltech256Dataset.has_info()
Caltech256Dataset.has_patches
Caltech256Dataset.has_split()
Caltech256Dataset.has_splits
Caltech256Dataset.has_tag()
Caltech256Dataset.has_tags
Caltech256Dataset.importer_kwargs
Caltech256Dataset.is_remote
Caltech256Dataset.load_info()
Caltech256Dataset.parameters
Caltech256Dataset.requires_manual_download
Caltech256Dataset.supports_partial_downloads
CityscapesDataset
CityscapesDataset.name
CityscapesDataset.license
CityscapesDataset.tags
CityscapesDataset.supported_splits
CityscapesDataset.requires_manual_download
CityscapesDataset.download_and_prepare()
CityscapesDataset.get_info_path()
CityscapesDataset.get_split_dir()
CityscapesDataset.has_info()
CityscapesDataset.has_patches
CityscapesDataset.has_split()
CityscapesDataset.has_splits
CityscapesDataset.has_tag()
CityscapesDataset.has_tags
CityscapesDataset.importer_kwargs
CityscapesDataset.is_remote
CityscapesDataset.load_info()
CityscapesDataset.parameters
CityscapesDataset.supports_partial_downloads
COCO2014Dataset
COCO2014Dataset.name
COCO2014Dataset.license
COCO2014Dataset.tags
COCO2014Dataset.supported_splits
COCO2014Dataset.supports_partial_downloads
COCO2014Dataset.importer_kwargs
COCO2014Dataset.download_and_prepare()
COCO2014Dataset.get_info_path()
COCO2014Dataset.get_split_dir()
COCO2014Dataset.has_info()
COCO2014Dataset.has_patches
COCO2014Dataset.has_split()
COCO2014Dataset.has_splits
COCO2014Dataset.has_tag()
COCO2014Dataset.has_tags
COCO2014Dataset.is_remote
COCO2014Dataset.load_info()
COCO2014Dataset.parameters
COCO2014Dataset.requires_manual_download
COCO2017Dataset
COCO2017Dataset.name
COCO2017Dataset.license
COCO2017Dataset.tags
COCO2017Dataset.supported_splits
COCO2017Dataset.supports_partial_downloads
COCO2017Dataset.importer_kwargs
COCO2017Dataset.download_and_prepare()
COCO2017Dataset.get_info_path()
COCO2017Dataset.get_split_dir()
COCO2017Dataset.has_info()
COCO2017Dataset.has_patches
COCO2017Dataset.has_split()
COCO2017Dataset.has_splits
COCO2017Dataset.has_tag()
COCO2017Dataset.has_tags
COCO2017Dataset.is_remote
COCO2017Dataset.load_info()
COCO2017Dataset.parameters
COCO2017Dataset.requires_manual_download
SamaCOCODataset
SamaCOCODataset.name
SamaCOCODataset.license
SamaCOCODataset.tags
SamaCOCODataset.supported_splits
SamaCOCODataset.supports_partial_downloads
SamaCOCODataset.importer_kwargs
SamaCOCODataset.download_and_prepare()
SamaCOCODataset.get_info_path()
SamaCOCODataset.get_split_dir()
SamaCOCODataset.has_info()
SamaCOCODataset.has_patches
SamaCOCODataset.has_split()
SamaCOCODataset.has_splits
SamaCOCODataset.has_tag()
SamaCOCODataset.has_tags
SamaCOCODataset.is_remote
SamaCOCODataset.load_info()
SamaCOCODataset.parameters
SamaCOCODataset.requires_manual_download
FIWDataset
FIWDataset.name
FIWDataset.license
FIWDataset.tags
FIWDataset.supported_splits
FIWDataset.download_and_prepare()
FIWDataset.get_info_path()
FIWDataset.get_split_dir()
FIWDataset.has_info()
FIWDataset.has_patches
FIWDataset.has_split()
FIWDataset.has_splits
FIWDataset.has_tag()
FIWDataset.has_tags
FIWDataset.importer_kwargs
FIWDataset.is_remote
FIWDataset.load_info()
FIWDataset.parameters
FIWDataset.requires_manual_download
FIWDataset.supports_partial_downloads
HMDB51Dataset
HMDB51Dataset.name
HMDB51Dataset.license
HMDB51Dataset.tags
HMDB51Dataset.parameters
HMDB51Dataset.supported_splits
HMDB51Dataset.download_and_prepare()
HMDB51Dataset.get_info_path()
HMDB51Dataset.get_split_dir()
HMDB51Dataset.has_info()
HMDB51Dataset.has_patches
HMDB51Dataset.has_split()
HMDB51Dataset.has_splits
HMDB51Dataset.has_tag()
HMDB51Dataset.has_tags
HMDB51Dataset.importer_kwargs
HMDB51Dataset.is_remote
HMDB51Dataset.load_info()
HMDB51Dataset.requires_manual_download
HMDB51Dataset.supports_partial_downloads
ImageNetSampleDataset
ImageNetSampleDataset.name
ImageNetSampleDataset.license
ImageNetSampleDataset.tags
ImageNetSampleDataset.supported_splits
ImageNetSampleDataset.download_and_prepare()
ImageNetSampleDataset.get_info_path()
ImageNetSampleDataset.get_split_dir()
ImageNetSampleDataset.has_info()
ImageNetSampleDataset.has_patches
ImageNetSampleDataset.has_split()
ImageNetSampleDataset.has_splits
ImageNetSampleDataset.has_tag()
ImageNetSampleDataset.has_tags
ImageNetSampleDataset.importer_kwargs
ImageNetSampleDataset.is_remote
ImageNetSampleDataset.load_info()
ImageNetSampleDataset.parameters
ImageNetSampleDataset.requires_manual_download
ImageNetSampleDataset.supports_partial_downloads
Kinetics400Dataset
Kinetics400Dataset.name
Kinetics400Dataset.license
Kinetics400Dataset.tags
Kinetics400Dataset.supported_splits
Kinetics400Dataset.supports_partial_downloads
Kinetics400Dataset.download_and_prepare()
Kinetics400Dataset.get_info_path()
Kinetics400Dataset.get_split_dir()
Kinetics400Dataset.has_info()
Kinetics400Dataset.has_patches
Kinetics400Dataset.has_split()
Kinetics400Dataset.has_splits
Kinetics400Dataset.has_tag()
Kinetics400Dataset.has_tags
Kinetics400Dataset.importer_kwargs
Kinetics400Dataset.is_remote
Kinetics400Dataset.load_info()
Kinetics400Dataset.parameters
Kinetics400Dataset.requires_manual_download
Kinetics600Dataset
Kinetics600Dataset.name
Kinetics600Dataset.license
Kinetics600Dataset.tags
Kinetics600Dataset.supported_splits
Kinetics600Dataset.supports_partial_downloads
Kinetics600Dataset.download_and_prepare()
Kinetics600Dataset.get_info_path()
Kinetics600Dataset.get_split_dir()
Kinetics600Dataset.has_info()
Kinetics600Dataset.has_patches
Kinetics600Dataset.has_split()
Kinetics600Dataset.has_splits
Kinetics600Dataset.has_tag()
Kinetics600Dataset.has_tags
Kinetics600Dataset.importer_kwargs
Kinetics600Dataset.is_remote
Kinetics600Dataset.load_info()
Kinetics600Dataset.parameters
Kinetics600Dataset.requires_manual_download
Kinetics700Dataset
Kinetics700Dataset.name
Kinetics700Dataset.license
Kinetics700Dataset.tags
Kinetics700Dataset.supported_splits
Kinetics700Dataset.supports_partial_downloads
Kinetics700Dataset.download_and_prepare()
Kinetics700Dataset.get_info_path()
Kinetics700Dataset.get_split_dir()
Kinetics700Dataset.has_info()
Kinetics700Dataset.has_patches
Kinetics700Dataset.has_split()
Kinetics700Dataset.has_splits
Kinetics700Dataset.has_tag()
Kinetics700Dataset.has_tags
Kinetics700Dataset.importer_kwargs
Kinetics700Dataset.is_remote
Kinetics700Dataset.load_info()
Kinetics700Dataset.parameters
Kinetics700Dataset.requires_manual_download
Kinetics7002020Dataset
Kinetics7002020Dataset.name
Kinetics7002020Dataset.license
Kinetics7002020Dataset.tags
Kinetics7002020Dataset.supported_splits
Kinetics7002020Dataset.supports_partial_downloads
Kinetics7002020Dataset.download_and_prepare()
Kinetics7002020Dataset.get_info_path()
Kinetics7002020Dataset.get_split_dir()
Kinetics7002020Dataset.has_info()
Kinetics7002020Dataset.has_patches
Kinetics7002020Dataset.has_split()
Kinetics7002020Dataset.has_splits
Kinetics7002020Dataset.has_tag()
Kinetics7002020Dataset.has_tags
Kinetics7002020Dataset.importer_kwargs
Kinetics7002020Dataset.is_remote
Kinetics7002020Dataset.load_info()
Kinetics7002020Dataset.parameters
Kinetics7002020Dataset.requires_manual_download
KITTIDataset
KITTIDataset.name
KITTIDataset.license
KITTIDataset.tags
KITTIDataset.supported_splits
KITTIDataset.download_and_prepare()
KITTIDataset.get_info_path()
KITTIDataset.get_split_dir()
KITTIDataset.has_info()
KITTIDataset.has_patches
KITTIDataset.has_split()
KITTIDataset.has_splits
KITTIDataset.has_tag()
KITTIDataset.has_tags
KITTIDataset.importer_kwargs
KITTIDataset.is_remote
KITTIDataset.load_info()
KITTIDataset.parameters
KITTIDataset.requires_manual_download
KITTIDataset.supports_partial_downloads
KITTIMultiviewDataset
KITTIMultiviewDataset.name
KITTIMultiviewDataset.license
KITTIMultiviewDataset.tags
KITTIMultiviewDataset.supported_splits
KITTIMultiviewDataset.supports_partial_downloads
KITTIMultiviewDataset.has_patches
KITTIMultiviewDataset.download_and_prepare()
KITTIMultiviewDataset.get_info_path()
KITTIMultiviewDataset.get_split_dir()
KITTIMultiviewDataset.has_info()
KITTIMultiviewDataset.has_split()
KITTIMultiviewDataset.has_splits
KITTIMultiviewDataset.has_tag()
KITTIMultiviewDataset.has_tags
KITTIMultiviewDataset.importer_kwargs
KITTIMultiviewDataset.is_remote
KITTIMultiviewDataset.load_info()
KITTIMultiviewDataset.parameters
KITTIMultiviewDataset.requires_manual_download
LabeledFacesInTheWildDataset
LabeledFacesInTheWildDataset.name
LabeledFacesInTheWildDataset.license
LabeledFacesInTheWildDataset.tags
LabeledFacesInTheWildDataset.supported_splits
LabeledFacesInTheWildDataset.download_and_prepare()
LabeledFacesInTheWildDataset.get_info_path()
LabeledFacesInTheWildDataset.get_split_dir()
LabeledFacesInTheWildDataset.has_info()
LabeledFacesInTheWildDataset.has_patches
LabeledFacesInTheWildDataset.has_split()
LabeledFacesInTheWildDataset.has_splits
LabeledFacesInTheWildDataset.has_tag()
LabeledFacesInTheWildDataset.has_tags
LabeledFacesInTheWildDataset.importer_kwargs
LabeledFacesInTheWildDataset.is_remote
LabeledFacesInTheWildDataset.load_info()
LabeledFacesInTheWildDataset.parameters
LabeledFacesInTheWildDataset.requires_manual_download
LabeledFacesInTheWildDataset.supports_partial_downloads
OpenImagesV6Dataset
OpenImagesV6Dataset.name
OpenImagesV6Dataset.license
OpenImagesV6Dataset.tags
OpenImagesV6Dataset.supported_splits
OpenImagesV6Dataset.supports_partial_downloads
OpenImagesV6Dataset.download_and_prepare()
OpenImagesV6Dataset.get_info_path()
OpenImagesV6Dataset.get_split_dir()
OpenImagesV6Dataset.has_info()
OpenImagesV6Dataset.has_patches
OpenImagesV6Dataset.has_split()
OpenImagesV6Dataset.has_splits
OpenImagesV6Dataset.has_tag()
OpenImagesV6Dataset.has_tags
OpenImagesV6Dataset.importer_kwargs
OpenImagesV6Dataset.is_remote
OpenImagesV6Dataset.load_info()
OpenImagesV6Dataset.parameters
OpenImagesV6Dataset.requires_manual_download
OpenImagesV7Dataset
OpenImagesV7Dataset.name
OpenImagesV7Dataset.license
OpenImagesV7Dataset.tags
OpenImagesV7Dataset.supported_splits
OpenImagesV7Dataset.supports_partial_downloads
OpenImagesV7Dataset.download_and_prepare()
OpenImagesV7Dataset.get_info_path()
OpenImagesV7Dataset.get_split_dir()
OpenImagesV7Dataset.has_info()
OpenImagesV7Dataset.has_patches
OpenImagesV7Dataset.has_split()
OpenImagesV7Dataset.has_splits
OpenImagesV7Dataset.has_tag()
OpenImagesV7Dataset.has_tags
OpenImagesV7Dataset.importer_kwargs
OpenImagesV7Dataset.is_remote
OpenImagesV7Dataset.load_info()
OpenImagesV7Dataset.parameters
OpenImagesV7Dataset.requires_manual_download
PlacesDataset
PlacesDataset.name
PlacesDataset.license
PlacesDataset.tags
PlacesDataset.supported_splits
PlacesDataset.supports_partial_downloads
PlacesDataset.download_and_prepare()
PlacesDataset.get_info_path()
PlacesDataset.get_split_dir()
PlacesDataset.has_info()
PlacesDataset.has_patches
PlacesDataset.has_split()
PlacesDataset.has_splits
PlacesDataset.has_tag()
PlacesDataset.has_tags
PlacesDataset.importer_kwargs
PlacesDataset.is_remote
PlacesDataset.load_info()
PlacesDataset.parameters
PlacesDataset.requires_manual_download
QuickstartDataset
QuickstartDataset.name
QuickstartDataset.license
QuickstartDataset.tags
QuickstartDataset.supported_splits
QuickstartDataset.download_and_prepare()
QuickstartDataset.get_info_path()
QuickstartDataset.get_split_dir()
QuickstartDataset.has_info()
QuickstartDataset.has_patches
QuickstartDataset.has_split()
QuickstartDataset.has_splits
QuickstartDataset.has_tag()
QuickstartDataset.has_tags
QuickstartDataset.importer_kwargs
QuickstartDataset.is_remote
QuickstartDataset.load_info()
QuickstartDataset.parameters
QuickstartDataset.requires_manual_download
QuickstartDataset.supports_partial_downloads
QuickstartGeoDataset
QuickstartGeoDataset.name
QuickstartGeoDataset.license
QuickstartGeoDataset.tags
QuickstartGeoDataset.supported_splits
QuickstartGeoDataset.download_and_prepare()
QuickstartGeoDataset.get_info_path()
QuickstartGeoDataset.get_split_dir()
QuickstartGeoDataset.has_info()
QuickstartGeoDataset.has_patches
QuickstartGeoDataset.has_split()
QuickstartGeoDataset.has_splits
QuickstartGeoDataset.has_tag()
QuickstartGeoDataset.has_tags
QuickstartGeoDataset.importer_kwargs
QuickstartGeoDataset.is_remote
QuickstartGeoDataset.load_info()
QuickstartGeoDataset.parameters
QuickstartGeoDataset.requires_manual_download
QuickstartGeoDataset.supports_partial_downloads
QuickstartVideoDataset
QuickstartVideoDataset.name
QuickstartVideoDataset.license
QuickstartVideoDataset.tags
QuickstartVideoDataset.supported_splits
QuickstartVideoDataset.download_and_prepare()
QuickstartVideoDataset.get_info_path()
QuickstartVideoDataset.get_split_dir()
QuickstartVideoDataset.has_info()
QuickstartVideoDataset.has_patches
QuickstartVideoDataset.has_split()
QuickstartVideoDataset.has_splits
QuickstartVideoDataset.has_tag()
QuickstartVideoDataset.has_tags
QuickstartVideoDataset.importer_kwargs
QuickstartVideoDataset.is_remote
QuickstartVideoDataset.load_info()
QuickstartVideoDataset.parameters
QuickstartVideoDataset.requires_manual_download
QuickstartVideoDataset.supports_partial_downloads
QuickstartGroupsDataset
QuickstartGroupsDataset.name
QuickstartGroupsDataset.license
QuickstartGroupsDataset.tags
QuickstartGroupsDataset.supported_splits
QuickstartGroupsDataset.has_patches
QuickstartGroupsDataset.download_and_prepare()
QuickstartGroupsDataset.get_info_path()
QuickstartGroupsDataset.get_split_dir()
QuickstartGroupsDataset.has_info()
QuickstartGroupsDataset.has_split()
QuickstartGroupsDataset.has_splits
QuickstartGroupsDataset.has_tag()
QuickstartGroupsDataset.has_tags
QuickstartGroupsDataset.importer_kwargs
QuickstartGroupsDataset.is_remote
QuickstartGroupsDataset.load_info()
QuickstartGroupsDataset.parameters
QuickstartGroupsDataset.requires_manual_download
QuickstartGroupsDataset.supports_partial_downloads
Quickstart3DDataset
Quickstart3DDataset.name
Quickstart3DDataset.license
Quickstart3DDataset.tags
Quickstart3DDataset.supported_splits
Quickstart3DDataset.download_and_prepare()
Quickstart3DDataset.get_info_path()
Quickstart3DDataset.get_split_dir()
Quickstart3DDataset.has_info()
Quickstart3DDataset.has_patches
Quickstart3DDataset.has_split()
Quickstart3DDataset.has_splits
Quickstart3DDataset.has_tag()
Quickstart3DDataset.has_tags
Quickstart3DDataset.importer_kwargs
Quickstart3DDataset.is_remote
Quickstart3DDataset.load_info()
Quickstart3DDataset.parameters
Quickstart3DDataset.requires_manual_download
Quickstart3DDataset.supports_partial_downloads
UCF101Dataset
UCF101Dataset.name
UCF101Dataset.license
UCF101Dataset.tags
UCF101Dataset.parameters
UCF101Dataset.supported_splits
UCF101Dataset.download_and_prepare()
UCF101Dataset.get_info_path()
UCF101Dataset.get_split_dir()
UCF101Dataset.has_info()
UCF101Dataset.has_patches
UCF101Dataset.has_split()
UCF101Dataset.has_splits
UCF101Dataset.has_tag()
UCF101Dataset.has_tags
UCF101Dataset.importer_kwargs
UCF101Dataset.is_remote
UCF101Dataset.load_info()
UCF101Dataset.requires_manual_download
UCF101Dataset.supports_partial_downloads
- fiftyone.zoo.datasets.tf
TFDSDataset
TFDSDataset.download_and_prepare()
TFDSDataset.get_info_path()
TFDSDataset.get_split_dir()
TFDSDataset.has_info()
TFDSDataset.has_patches
TFDSDataset.has_split()
TFDSDataset.has_splits
TFDSDataset.has_tag()
TFDSDataset.has_tags
TFDSDataset.importer_kwargs
TFDSDataset.is_remote
TFDSDataset.license
TFDSDataset.load_info()
TFDSDataset.name
TFDSDataset.parameters
TFDSDataset.requires_manual_download
TFDSDataset.supported_splits
TFDSDataset.supports_partial_downloads
TFDSDataset.tags
MNISTDataset
MNISTDataset.name
MNISTDataset.license
MNISTDataset.tags
MNISTDataset.supported_splits
MNISTDataset.download_and_prepare()
MNISTDataset.get_info_path()
MNISTDataset.get_split_dir()
MNISTDataset.has_info()
MNISTDataset.has_patches
MNISTDataset.has_split()
MNISTDataset.has_splits
MNISTDataset.has_tag()
MNISTDataset.has_tags
MNISTDataset.importer_kwargs
MNISTDataset.is_remote
MNISTDataset.load_info()
MNISTDataset.parameters
MNISTDataset.requires_manual_download
MNISTDataset.supports_partial_downloads
FashionMNISTDataset
FashionMNISTDataset.name
FashionMNISTDataset.license
FashionMNISTDataset.tags
FashionMNISTDataset.supported_splits
FashionMNISTDataset.download_and_prepare()
FashionMNISTDataset.get_info_path()
FashionMNISTDataset.get_split_dir()
FashionMNISTDataset.has_info()
FashionMNISTDataset.has_patches
FashionMNISTDataset.has_split()
FashionMNISTDataset.has_splits
FashionMNISTDataset.has_tag()
FashionMNISTDataset.has_tags
FashionMNISTDataset.importer_kwargs
FashionMNISTDataset.is_remote
FashionMNISTDataset.load_info()
FashionMNISTDataset.parameters
FashionMNISTDataset.requires_manual_download
FashionMNISTDataset.supports_partial_downloads
CIFAR10Dataset
CIFAR10Dataset.name
CIFAR10Dataset.license
CIFAR10Dataset.tags
CIFAR10Dataset.supported_splits
CIFAR10Dataset.download_and_prepare()
CIFAR10Dataset.get_info_path()
CIFAR10Dataset.get_split_dir()
CIFAR10Dataset.has_info()
CIFAR10Dataset.has_patches
CIFAR10Dataset.has_split()
CIFAR10Dataset.has_splits
CIFAR10Dataset.has_tag()
CIFAR10Dataset.has_tags
CIFAR10Dataset.importer_kwargs
CIFAR10Dataset.is_remote
CIFAR10Dataset.load_info()
CIFAR10Dataset.parameters
CIFAR10Dataset.requires_manual_download
CIFAR10Dataset.supports_partial_downloads
CIFAR100Dataset
CIFAR100Dataset.name
CIFAR100Dataset.license
CIFAR100Dataset.tags
CIFAR100Dataset.supported_splits
CIFAR100Dataset.download_and_prepare()
CIFAR100Dataset.get_info_path()
CIFAR100Dataset.get_split_dir()
CIFAR100Dataset.has_info()
CIFAR100Dataset.has_patches
CIFAR100Dataset.has_split()
CIFAR100Dataset.has_splits
CIFAR100Dataset.has_tag()
CIFAR100Dataset.has_tags
CIFAR100Dataset.importer_kwargs
CIFAR100Dataset.is_remote
CIFAR100Dataset.load_info()
CIFAR100Dataset.parameters
CIFAR100Dataset.requires_manual_download
CIFAR100Dataset.supports_partial_downloads
ImageNet2012Dataset
ImageNet2012Dataset.name
ImageNet2012Dataset.license
ImageNet2012Dataset.tags
ImageNet2012Dataset.supported_splits
ImageNet2012Dataset.requires_manual_download
ImageNet2012Dataset.download_and_prepare()
ImageNet2012Dataset.get_info_path()
ImageNet2012Dataset.get_split_dir()
ImageNet2012Dataset.has_info()
ImageNet2012Dataset.has_patches
ImageNet2012Dataset.has_split()
ImageNet2012Dataset.has_splits
ImageNet2012Dataset.has_tag()
ImageNet2012Dataset.has_tags
ImageNet2012Dataset.importer_kwargs
ImageNet2012Dataset.is_remote
ImageNet2012Dataset.load_info()
ImageNet2012Dataset.parameters
ImageNet2012Dataset.supports_partial_downloads
VOC2007Dataset
VOC2007Dataset.name
VOC2007Dataset.license
VOC2007Dataset.tags
VOC2007Dataset.supported_splits
VOC2007Dataset.download_and_prepare()
VOC2007Dataset.get_info_path()
VOC2007Dataset.get_split_dir()
VOC2007Dataset.has_info()
VOC2007Dataset.has_patches
VOC2007Dataset.has_split()
VOC2007Dataset.has_splits
VOC2007Dataset.has_tag()
VOC2007Dataset.has_tags
VOC2007Dataset.importer_kwargs
VOC2007Dataset.is_remote
VOC2007Dataset.load_info()
VOC2007Dataset.parameters
VOC2007Dataset.requires_manual_download
VOC2007Dataset.supports_partial_downloads
VOC2012Dataset
VOC2012Dataset.name
VOC2012Dataset.license
VOC2012Dataset.tags
VOC2012Dataset.supported_splits
VOC2012Dataset.download_and_prepare()
VOC2012Dataset.get_info_path()
VOC2012Dataset.get_split_dir()
VOC2012Dataset.has_info()
VOC2012Dataset.has_patches
VOC2012Dataset.has_split()
VOC2012Dataset.has_splits
VOC2012Dataset.has_tag()
VOC2012Dataset.has_tags
VOC2012Dataset.importer_kwargs
VOC2012Dataset.is_remote
VOC2012Dataset.load_info()
VOC2012Dataset.parameters
VOC2012Dataset.requires_manual_download
VOC2012Dataset.supports_partial_downloads
- fiftyone.zoo.datasets.torch
TorchVisionDataset
TorchVisionDataset.download_and_prepare()
TorchVisionDataset.get_info_path()
TorchVisionDataset.get_split_dir()
TorchVisionDataset.has_info()
TorchVisionDataset.has_patches
TorchVisionDataset.has_split()
TorchVisionDataset.has_splits
TorchVisionDataset.has_tag()
TorchVisionDataset.has_tags
TorchVisionDataset.importer_kwargs
TorchVisionDataset.is_remote
TorchVisionDataset.license
TorchVisionDataset.load_info()
TorchVisionDataset.name
TorchVisionDataset.parameters
TorchVisionDataset.requires_manual_download
TorchVisionDataset.supported_splits
TorchVisionDataset.supports_partial_downloads
TorchVisionDataset.tags
MNISTDataset
MNISTDataset.name
MNISTDataset.license
MNISTDataset.tags
MNISTDataset.supported_splits
MNISTDataset.download_and_prepare()
MNISTDataset.get_info_path()
MNISTDataset.get_split_dir()
MNISTDataset.has_info()
MNISTDataset.has_patches
MNISTDataset.has_split()
MNISTDataset.has_splits
MNISTDataset.has_tag()
MNISTDataset.has_tags
MNISTDataset.importer_kwargs
MNISTDataset.is_remote
MNISTDataset.load_info()
MNISTDataset.parameters
MNISTDataset.requires_manual_download
MNISTDataset.supports_partial_downloads
FashionMNISTDataset
FashionMNISTDataset.name
FashionMNISTDataset.license
FashionMNISTDataset.tags
FashionMNISTDataset.supported_splits
FashionMNISTDataset.download_and_prepare()
FashionMNISTDataset.get_info_path()
FashionMNISTDataset.get_split_dir()
FashionMNISTDataset.has_info()
FashionMNISTDataset.has_patches
FashionMNISTDataset.has_split()
FashionMNISTDataset.has_splits
FashionMNISTDataset.has_tag()
FashionMNISTDataset.has_tags
FashionMNISTDataset.importer_kwargs
FashionMNISTDataset.is_remote
FashionMNISTDataset.load_info()
FashionMNISTDataset.parameters
FashionMNISTDataset.requires_manual_download
FashionMNISTDataset.supports_partial_downloads
CIFAR10Dataset
CIFAR10Dataset.name
CIFAR10Dataset.license
CIFAR10Dataset.tags
CIFAR10Dataset.supported_splits
CIFAR10Dataset.download_and_prepare()
CIFAR10Dataset.get_info_path()
CIFAR10Dataset.get_split_dir()
CIFAR10Dataset.has_info()
CIFAR10Dataset.has_patches
CIFAR10Dataset.has_split()
CIFAR10Dataset.has_splits
CIFAR10Dataset.has_tag()
CIFAR10Dataset.has_tags
CIFAR10Dataset.importer_kwargs
CIFAR10Dataset.is_remote
CIFAR10Dataset.load_info()
CIFAR10Dataset.parameters
CIFAR10Dataset.requires_manual_download
CIFAR10Dataset.supports_partial_downloads
CIFAR100Dataset
CIFAR100Dataset.name
CIFAR100Dataset.license
CIFAR100Dataset.tags
CIFAR100Dataset.supported_splits
CIFAR100Dataset.download_and_prepare()
CIFAR100Dataset.get_info_path()
CIFAR100Dataset.get_split_dir()
CIFAR100Dataset.has_info()
CIFAR100Dataset.has_patches
CIFAR100Dataset.has_split()
CIFAR100Dataset.has_splits
CIFAR100Dataset.has_tag()
CIFAR100Dataset.has_tags
CIFAR100Dataset.importer_kwargs
CIFAR100Dataset.is_remote
CIFAR100Dataset.load_info()
CIFAR100Dataset.parameters
CIFAR100Dataset.requires_manual_download
CIFAR100Dataset.supports_partial_downloads
ImageNet2012Dataset
ImageNet2012Dataset.name
ImageNet2012Dataset.license
ImageNet2012Dataset.tags
ImageNet2012Dataset.supported_splits
ImageNet2012Dataset.requires_manual_download
ImageNet2012Dataset.download_and_prepare()
ImageNet2012Dataset.get_info_path()
ImageNet2012Dataset.get_split_dir()
ImageNet2012Dataset.has_info()
ImageNet2012Dataset.has_patches
ImageNet2012Dataset.has_split()
ImageNet2012Dataset.has_splits
ImageNet2012Dataset.has_tag()
ImageNet2012Dataset.has_tags
ImageNet2012Dataset.importer_kwargs
ImageNet2012Dataset.is_remote
ImageNet2012Dataset.load_info()
ImageNet2012Dataset.parameters
ImageNet2012Dataset.supports_partial_downloads
VOC2007Dataset
VOC2007Dataset.name
VOC2007Dataset.license
VOC2007Dataset.tags
VOC2007Dataset.supported_splits
VOC2007Dataset.download_and_prepare()
VOC2007Dataset.get_info_path()
VOC2007Dataset.get_split_dir()
VOC2007Dataset.has_info()
VOC2007Dataset.has_patches
VOC2007Dataset.has_split()
VOC2007Dataset.has_splits
VOC2007Dataset.has_tag()
VOC2007Dataset.has_tags
VOC2007Dataset.importer_kwargs
VOC2007Dataset.is_remote
VOC2007Dataset.load_info()
VOC2007Dataset.parameters
VOC2007Dataset.requires_manual_download
VOC2007Dataset.supports_partial_downloads
VOC2012Dataset
VOC2012Dataset.name
VOC2012Dataset.license
VOC2012Dataset.tags
VOC2012Dataset.supported_splits
VOC2012Dataset.download_and_prepare()
VOC2012Dataset.get_info_path()
VOC2012Dataset.get_split_dir()
VOC2012Dataset.has_info()
VOC2012Dataset.has_patches
VOC2012Dataset.has_split()
VOC2012Dataset.has_splits
VOC2012Dataset.has_tag()
VOC2012Dataset.has_tags
VOC2012Dataset.importer_kwargs
VOC2012Dataset.is_remote
VOC2012Dataset.load_info()
VOC2012Dataset.parameters
VOC2012Dataset.requires_manual_download
VOC2012Dataset.supports_partial_downloads
- Module contents
list_zoo_datasets()
list_zoo_dataset_sources()
list_downloaded_zoo_datasets()
download_zoo_dataset()
load_zoo_dataset()
find_zoo_dataset()
load_zoo_dataset_info()
get_zoo_dataset()
delete_zoo_dataset()
ZooDatasetInfo
ZooDatasetInfo.name
ZooDatasetInfo.zoo_dataset
ZooDatasetInfo.dataset_type
ZooDatasetInfo.supported_splits
ZooDatasetInfo.url
ZooDatasetInfo.get_zoo_dataset()
ZooDatasetInfo.get_dataset_type()
ZooDatasetInfo.is_split_downloaded()
ZooDatasetInfo.add_split()
ZooDatasetInfo.remove_split()
ZooDatasetInfo.attributes()
ZooDatasetInfo.from_dict()
ZooDatasetInfo.from_json()
ZooDatasetInfo.copy()
ZooDatasetInfo.custom_attributes()
ZooDatasetInfo.from_str()
ZooDatasetInfo.get_class_name()
ZooDatasetInfo.serialize()
ZooDatasetInfo.to_str()
ZooDatasetInfo.write_json()
ZooDatasetSplitInfo
ZooDatasetSplitInfo.attributes()
ZooDatasetSplitInfo.from_dict()
ZooDatasetSplitInfo.copy()
ZooDatasetSplitInfo.custom_attributes()
ZooDatasetSplitInfo.from_json()
ZooDatasetSplitInfo.from_str()
ZooDatasetSplitInfo.get_class_name()
ZooDatasetSplitInfo.serialize()
ZooDatasetSplitInfo.to_str()
ZooDatasetSplitInfo.write_json()
ZooDataset
ZooDataset.name
ZooDataset.is_remote
ZooDataset.license
ZooDataset.tags
ZooDataset.has_tags
ZooDataset.parameters
ZooDataset.supported_splits
ZooDataset.has_splits
ZooDataset.has_patches
ZooDataset.supports_partial_downloads
ZooDataset.requires_manual_download
ZooDataset.importer_kwargs
ZooDataset.has_tag()
ZooDataset.has_split()
ZooDataset.get_split_dir()
ZooDataset.has_info()
ZooDataset.load_info()
ZooDataset.get_info_path()
ZooDataset.download_and_prepare()
RemoteZooDataset
RemoteZooDataset.metadata
RemoteZooDataset.name
RemoteZooDataset.url
RemoteZooDataset.is_remote
RemoteZooDataset.author
RemoteZooDataset.version
RemoteZooDataset.source
RemoteZooDataset.license
RemoteZooDataset.description
RemoteZooDataset.fiftyone_version
RemoteZooDataset.tags
RemoteZooDataset.supported_splits
RemoteZooDataset.supports_partial_downloads
RemoteZooDataset.size_samples
RemoteZooDataset.download_and_prepare()
RemoteZooDataset.get_info_path()
RemoteZooDataset.get_split_dir()
RemoteZooDataset.has_info()
RemoteZooDataset.has_patches
RemoteZooDataset.has_split()
RemoteZooDataset.has_splits
RemoteZooDataset.has_tag()
RemoteZooDataset.has_tags
RemoteZooDataset.importer_kwargs
RemoteZooDataset.load_info()
RemoteZooDataset.parameters
RemoteZooDataset.requires_manual_download
DeprecatedZooDataset
DeprecatedZooDataset.name
DeprecatedZooDataset.supported_splits
DeprecatedZooDataset.download_and_prepare()
DeprecatedZooDataset.get_info_path()
DeprecatedZooDataset.get_split_dir()
DeprecatedZooDataset.has_info()
DeprecatedZooDataset.has_patches
DeprecatedZooDataset.has_split()
DeprecatedZooDataset.has_splits
DeprecatedZooDataset.has_tag()
DeprecatedZooDataset.has_tags
DeprecatedZooDataset.importer_kwargs
DeprecatedZooDataset.is_remote
DeprecatedZooDataset.license
DeprecatedZooDataset.load_info()
DeprecatedZooDataset.parameters
DeprecatedZooDataset.requires_manual_download
DeprecatedZooDataset.supports_partial_downloads
DeprecatedZooDataset.tags
- fiftyone.zoo.datasets.base
- fiftyone.zoo.models
- fiftyone.zoo.models.torch
TorchvisionImageModelConfig
TorchvisionImageModelConfig.attributes()
TorchvisionImageModelConfig.builder()
TorchvisionImageModelConfig.copy()
TorchvisionImageModelConfig.custom_attributes()
TorchvisionImageModelConfig.default()
TorchvisionImageModelConfig.download_model_if_necessary()
TorchvisionImageModelConfig.from_dict()
TorchvisionImageModelConfig.from_json()
TorchvisionImageModelConfig.from_kwargs()
TorchvisionImageModelConfig.from_str()
TorchvisionImageModelConfig.get_class_name()
TorchvisionImageModelConfig.init()
TorchvisionImageModelConfig.load_default()
TorchvisionImageModelConfig.parse_array()
TorchvisionImageModelConfig.parse_bool()
TorchvisionImageModelConfig.parse_categorical()
TorchvisionImageModelConfig.parse_dict()
TorchvisionImageModelConfig.parse_int()
TorchvisionImageModelConfig.parse_mutually_exclusive_fields()
TorchvisionImageModelConfig.parse_number()
TorchvisionImageModelConfig.parse_object()
TorchvisionImageModelConfig.parse_object_array()
TorchvisionImageModelConfig.parse_object_dict()
TorchvisionImageModelConfig.parse_path()
TorchvisionImageModelConfig.parse_raw()
TorchvisionImageModelConfig.parse_string()
TorchvisionImageModelConfig.serialize()
TorchvisionImageModelConfig.to_str()
TorchvisionImageModelConfig.validate_all_or_nothing_fields()
TorchvisionImageModelConfig.write_json()
TorchvisionImageModel
TorchvisionImageModel.build_get_item()
TorchvisionImageModel.can_embed_prompts
TorchvisionImageModel.classes
TorchvisionImageModel.collate_fn()
TorchvisionImageModel.device
TorchvisionImageModel.embed()
TorchvisionImageModel.embed_all()
TorchvisionImageModel.from_config()
TorchvisionImageModel.from_dict()
TorchvisionImageModel.from_json()
TorchvisionImageModel.from_kwargs()
TorchvisionImageModel.get_embeddings()
TorchvisionImageModel.has_collate_fn
TorchvisionImageModel.has_embeddings
TorchvisionImageModel.has_logits
TorchvisionImageModel.mask_targets
TorchvisionImageModel.media_type
TorchvisionImageModel.num_classes
TorchvisionImageModel.parse()
TorchvisionImageModel.predict()
TorchvisionImageModel.predict_all()
TorchvisionImageModel.preprocess
TorchvisionImageModel.ragged_batches
TorchvisionImageModel.required_keys
TorchvisionImageModel.skeleton
TorchvisionImageModel.store_logits
TorchvisionImageModel.transforms
TorchvisionImageModel.using_gpu
TorchvisionImageModel.using_half_precision
TorchvisionImageModel.validate()
- Module contents
list_zoo_models()
list_downloaded_zoo_models()
is_zoo_model_downloaded()
download_zoo_model()
install_zoo_model_requirements()
ensure_zoo_model_requirements()
load_zoo_model()
find_zoo_model()
get_zoo_model()
delete_zoo_model()
list_zoo_model_sources()
register_zoo_model_source()
delete_zoo_model_source()
HasZooModel
ZooModel
ZooModel.attributes()
ZooModel.comp_version
ZooModel.copy()
ZooModel.custom_attributes()
ZooModel.download_model()
ZooModel.ensure_requirements()
ZooModel.filename
ZooModel.flush_model()
ZooModel.flush_model_from_dir()
ZooModel.from_dict()
ZooModel.from_json()
ZooModel.from_str()
ZooModel.get_class_name()
ZooModel.get_path_in_dir()
ZooModel.has_manager
ZooModel.has_requirements
ZooModel.has_tag()
ZooModel.has_tags
ZooModel.has_version
ZooModel.has_version_str()
ZooModel.install_requirements()
ZooModel.is_in_dir()
ZooModel.is_model_downloaded()
ZooModel.name
ZooModel.parse_name()
ZooModel.serialize()
ZooModel.supports_cpu
ZooModel.supports_gpu
ZooModel.to_str()
ZooModel.write_json()
RemoteZooModel
RemoteZooModel.load_model()
RemoteZooModel.resolve_input()
RemoteZooModel.parse_parameters()
RemoteZooModel.attributes()
RemoteZooModel.comp_version
RemoteZooModel.copy()
RemoteZooModel.custom_attributes()
RemoteZooModel.download_model()
RemoteZooModel.ensure_requirements()
RemoteZooModel.filename
RemoteZooModel.flush_model()
RemoteZooModel.flush_model_from_dir()
RemoteZooModel.from_dict()
RemoteZooModel.from_json()
RemoteZooModel.from_str()
RemoteZooModel.get_class_name()
RemoteZooModel.get_path_in_dir()
RemoteZooModel.has_manager
RemoteZooModel.has_requirements
RemoteZooModel.has_tag()
RemoteZooModel.has_tags
RemoteZooModel.has_version
RemoteZooModel.has_version_str()
RemoteZooModel.install_requirements()
RemoteZooModel.is_in_dir()
RemoteZooModel.is_model_downloaded()
RemoteZooModel.name
RemoteZooModel.parse_name()
RemoteZooModel.serialize()
RemoteZooModel.supports_cpu
RemoteZooModel.supports_gpu
RemoteZooModel.to_str()
RemoteZooModel.write_json()
RemoteModelManagerConfig
RemoteModelManagerConfig.attributes()
RemoteModelManagerConfig.builder()
RemoteModelManagerConfig.copy()
RemoteModelManagerConfig.custom_attributes()
RemoteModelManagerConfig.default()
RemoteModelManagerConfig.from_dict()
RemoteModelManagerConfig.from_json()
RemoteModelManagerConfig.from_kwargs()
RemoteModelManagerConfig.from_str()
RemoteModelManagerConfig.get_class_name()
RemoteModelManagerConfig.load_default()
RemoteModelManagerConfig.parse_array()
RemoteModelManagerConfig.parse_bool()
RemoteModelManagerConfig.parse_categorical()
RemoteModelManagerConfig.parse_dict()
RemoteModelManagerConfig.parse_int()
RemoteModelManagerConfig.parse_mutually_exclusive_fields()
RemoteModelManagerConfig.parse_number()
RemoteModelManagerConfig.parse_object()
RemoteModelManagerConfig.parse_object_array()
RemoteModelManagerConfig.parse_object_dict()
RemoteModelManagerConfig.parse_path()
RemoteModelManagerConfig.parse_raw()
RemoteModelManagerConfig.parse_string()
RemoteModelManagerConfig.serialize()
RemoteModelManagerConfig.to_str()
RemoteModelManagerConfig.validate_all_or_nothing_fields()
RemoteModelManagerConfig.write_json()
RemoteModelManager
RemoteModelManager.attributes()
RemoteModelManager.copy()
RemoteModelManager.custom_attributes()
RemoteModelManager.delete_model()
RemoteModelManager.download_model()
RemoteModelManager.flush_model()
RemoteModelManager.from_config()
RemoteModelManager.from_dict()
RemoteModelManager.from_json()
RemoteModelManager.from_kwargs()
RemoteModelManager.from_str()
RemoteModelManager.get_class_name()
RemoteModelManager.is_model_downloaded()
RemoteModelManager.parse()
RemoteModelManager.serialize()
RemoteModelManager.to_str()
RemoteModelManager.upload_model()
RemoteModelManager.validate()
RemoteModelManager.write_json()
ZooModelsManifest
ZooModelsManifest.add_model()
ZooModelsManifest.attributes()
ZooModelsManifest.copy()
ZooModelsManifest.custom_attributes()
ZooModelsManifest.dir_has_manifest()
ZooModelsManifest.from_dict()
ZooModelsManifest.from_dir()
ZooModelsManifest.from_json()
ZooModelsManifest.from_str()
ZooModelsManifest.get_class_name()
ZooModelsManifest.get_latest_model_with_base_name()
ZooModelsManifest.get_model_with_name()
ZooModelsManifest.has_model_with_filename()
ZooModelsManifest.has_model_with_name()
ZooModelsManifest.make_manifest_path()
ZooModelsManifest.merge()
ZooModelsManifest.remove_model()
ZooModelsManifest.serialize()
ZooModelsManifest.subdir
ZooModelsManifest.to_str()
ZooModelsManifest.write_json()
ZooModelsManifest.write_to_dir()
RemoteZooModelsManifest
RemoteZooModelsManifest.add_model()
RemoteZooModelsManifest.attributes()
RemoteZooModelsManifest.copy()
RemoteZooModelsManifest.custom_attributes()
RemoteZooModelsManifest.dir_has_manifest()
RemoteZooModelsManifest.from_dict()
RemoteZooModelsManifest.from_dir()
RemoteZooModelsManifest.from_json()
RemoteZooModelsManifest.from_str()
RemoteZooModelsManifest.get_class_name()
RemoteZooModelsManifest.get_latest_model_with_base_name()
RemoteZooModelsManifest.get_model_with_name()
RemoteZooModelsManifest.has_model_with_filename()
RemoteZooModelsManifest.has_model_with_name()
RemoteZooModelsManifest.make_manifest_path()
RemoteZooModelsManifest.merge()
RemoteZooModelsManifest.remove_model()
RemoteZooModelsManifest.serialize()
RemoteZooModelsManifest.subdir
RemoteZooModelsManifest.to_str()
RemoteZooModelsManifest.write_json()
RemoteZooModelsManifest.write_to_dir()
- fiftyone.zoo.models.torch
Module contents#
The FiftyOne Zoo.
Copyright 2017-2025, Voxel51, Inc. voxel51.com
Classes:
Dictionary that remembers insertion order |
|
|
Class for interacting with a GitHub repository. |
|
Class containing info about a dataset in the FiftyOne Dataset Zoo. |
|
Class containing info about a split of a dataset in the FiftyOne Dataset Zoo. |
Base class for datasets made available in the FiftyOne Dataset Zoo. |
|
|
Class for working with remotely-sourced datasets that are compatible with the FiftyOne Dataset Zoo. |
Class representing a zoo dataset that no longer exists in the FiftyOne Dataset Zoo. |
|
defaultdict(default_factory=None, /, [...]) --> dict with default factory |
|
Mixin class for Config classes of |
|
|
Class describing a model in the FiftyOne Model Zoo. |
|
|
|
|
|
Class that describes the collection of models in the FiftyOne Model Zoo. |
|
Class that describes the collection of remotely-sourced models in the FiftyOne Model Zoo. |
Functions:
|
Lists the available datasets in the FiftyOne Dataset Zoo. |
Returns the list of available zoo dataset sources. |
|
Returns information about the zoo datasets that have been downloaded. |
|
|
Downloads the specified dataset from the FiftyOne Dataset Zoo. |
|
Loads the specified dataset from the FiftyOne Dataset Zoo. |
|
Returns the directory containing the given zoo dataset. |
|
Loads the |
|
Returns the |
|
Deletes the zoo dataset from local disk, if necessary. |
|
Deep copy operation on arbitrary Python objects. |
|
Returns the list of available models in the FiftyOne Model Zoo. |
Returns information about the zoo models that have been downloaded. |
|
|
Determines whether the zoo model of the given name is downloaded. |
|
Downloads the specified model from the FiftyOne Model Zoo. |
|
Installs any package requirements for the specified zoo model. |
|
Ensures that the package requirements for the specified zoo model are satisfied. |
|
Loads the specified model from the FiftyOne Model Zoo. |
|
Returns the path to the zoo model on disk. |
|
Returns the |
|
Deletes the zoo model from local disk, if necessary. |
Returns the list of remote model sources that are registered locally. |
|
|
Registers a remote source of models, if necessary. |
|
Deletes the specified remote source and all downloaded models associated with it. |
Exceptions:
Exception raised when an invalid Config instance is encountered. |
- class fiftyone.zoo.OrderedDict#
Bases:
dict
Dictionary that remembers insertion order
Methods:
clear
()popitem
([last])Remove and return a (key, value) pair from the dictionary.
move_to_end
(key[, last])Move an existing element to the end (or beginning if last is false).
update
([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
keys
()items
()values
()pop
(key[,default])If the key is not found, return the default if given; otherwise, raise a KeyError.
setdefault
(key[, default])Insert key with a value of default if key is not in the dictionary.
copy
()fromkeys
([value])Create a new ordered dictionary with keys from iterable and values set to value.
get
(key[, default])Return the value for key if key is in the dictionary, else default.
- clear() None. Remove all items from od. #
- popitem(last=True)#
Remove and return a (key, value) pair from the dictionary.
Pairs are returned in LIFO order if last is true or FIFO order if false.
- move_to_end(key, last=True)#
Move an existing element to the end (or beginning if last is false).
Raise KeyError if the element does not exist.
- update([E, ]**F) None. Update D from dict/iterable E and F. #
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- keys() a set-like object providing a view on D's keys #
- items() a set-like object providing a view on D's items #
- values() an object providing a view on D's values #
- pop(key[, default]) v, remove specified key and return the corresponding value. #
If the key is not found, return the default if given; otherwise, raise a KeyError.
- setdefault(key, default=None)#
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- copy() a shallow copy of od #
- fromkeys(value=None)#
Create a new ordered dictionary with keys from iterable and values set to value.
- get(key, default=None, /)#
Return the value for key if key is in the dictionary, else default.
- class fiftyone.zoo.GitHubRepository(repo, safe=False)#
Bases:
object
Class for interacting with a GitHub repository.
Note
To interact with private GitHub repositories that you have access to, provide your GitHub personal access token by setting the
GITHUB_TOKEN
environment variable.- Parameters:
repo –
the GitHub repository or identifier, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
safe (False) – whether to allow
repo
to contain a tree path likehttps://github.com/<user>/<repo>/tree/<branch>/<path>
. Ifsafe=True
and a<path>
is found, it is extracted and stored in thesafe_path()
property
Attributes:
The username of the repo.
The name of the repo.
The ref (e.g. branch, tag, commit hash), if any.
The path that was extracted from the provided ref, if any.
The repository identifier string.
Methods:
Returns a dict of info about the repository.
get_file
(path[, outpath])Downloads the file at the given path.
list_path_contents
([path])Returns the contents of the repo rooted at the given path.
list_repo_contents
([recursive])Returns a flat list of the repository's contents.
download
(outdir)Downloads the repository to the specified root directory.
parse_url
(url)parse_identifier
(identifier)- property user#
The username of the repo.
- property repo#
The name of the repo.
- property ref#
The ref (e.g. branch, tag, commit hash), if any.
- property safe_path#
The path that was extracted from the provided ref, if any.
- property identifier#
The repository identifier string.
- get_repo_info()#
Returns a dict of info about the repository.
- Returns:
an info dict
- get_file(path, outpath=None)#
Downloads the file at the given path.
- Parameters:
path – the filepath in the repository
outpath (None) – a path on disk to write the file
- Returns:
the file bytes, if no
outpath
is provided
- list_path_contents(path=None)#
Returns the contents of the repo rooted at the given path.
Note
This method has a limit of 1,000 files. Documentation.
- Parameters:
path (None) – an optional root path to start the search from
- Returns:
a list of file info dicts
- list_repo_contents(recursive=True)#
Returns a flat list of the repository’s contents.
Note
This method has a limit of 100,000 entries and 7MB response size. Documentation.
- Parameters:
recursive (True) – whether to recursively traverse subdirectories
- Returns:
a list of file info dicts
- download(outdir)#
Downloads the repository to the specified root directory.
- Parameters:
outdir – the output directory
- static parse_url(url)#
- static parse_identifier(identifier)#
- fiftyone.zoo.list_zoo_datasets(tags=None, source=None, license=None)#
Lists the available datasets in the FiftyOne Dataset Zoo.
Also includes any remotely-sourced zoo datasets that you’ve downloaded.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz # # List all zoo datasets # names = foz.list_zoo_datasets() print(names) # # List all zoo datasets with (both of) the specified tags # names = foz.list_zoo_datasets(tags=["image", "detection"]) print(names) # # List all zoo datasets available via the given source # names = foz.list_zoo_datasets(source="torch") print(names)
- Parameters:
tags (None) – only include datasets that have the specified tag or list of tags
source (None) – only include datasets available via the given source or list of sources
license (None) – only include datasets that are distributed under the specified license or any of the specified list of licenses. Run
fiftyone zoo datasets list
to see the available licenses
- Returns:
a sorted list of dataset names
- fiftyone.zoo.list_zoo_dataset_sources()#
Returns the list of available zoo dataset sources.
- Returns:
a list of sources
- fiftyone.zoo.list_downloaded_zoo_datasets()#
Returns information about the zoo datasets that have been downloaded.
- Returns:
a dict mapping dataset names to (
dataset_dir
,ZooDatasetInfo
) tuples
- fiftyone.zoo.download_zoo_dataset(name_or_url, split=None, splits=None, overwrite=False, cleanup=True, **kwargs)#
Downloads the specified dataset from the FiftyOne Dataset Zoo.
Any dataset splits that have already been downloaded are not re-downloaded, unless
overwrite == True
is specified.Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the
GITHUB_TOKEN
environment variable.- Parameters:
name_or_url –
the name of the zoo dataset to download, or the remote source to download it from, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
split (None) –
("train", "validation", "test")
. If neithersplit
norsplits
are provided, all available splits are downloaded. Consult the documentation for theZooDataset
you specified to see the supported splitssplits (None) – a list of splits to download, if applicable. Typical values are
("train", "validation", "test")
. If neithersplit
norsplits
are provided, all available splits are downloaded. Consult the documentation for theZooDataset
you specified to see the supported splitsoverwrite (False) – whether to overwrite any existing files
cleanup (True) – whether to cleanup any temporary files generated during download
**kwargs – optional arguments for the
ZooDataset
constructor or the remote dataset’sdownload_and_prepare()
method
- Returns:
a tuple of
info: the
ZooDatasetInfo
for the datasetdataset_dir: the directory containing the dataset
- fiftyone.zoo.load_zoo_dataset(name_or_url, split=None, splits=None, label_field=None, dataset_name=None, download_if_necessary=True, drop_existing_dataset=False, persistent=False, overwrite=False, cleanup=True, progress=None, **kwargs)#
Loads the specified dataset from the FiftyOne Dataset Zoo.
By default, the dataset will be downloaded if necessary.
Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the
GITHUB_TOKEN
environment variable.If you do not specify a custom
dataset_name
and you have previously loaded the same zoo dataset and split(s) into FiftyOne, the existing dataset will be returned.- Parameters:
name_or_url –
the name of the zoo dataset to load, or the remote source to load it from, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
split (None) –
("train", "validation", "test")
. If neithersplit
norsplits
are provided, all available splits are loaded. Consult the documentation for theZooDataset
you specified to see the supported splitssplits (None) – a list of splits to load, if applicable. Typical values are
("train", "validation", "test")
. If neithersplit
norsplits
are provided, all available splits are loaded. Consult the documentation for theZooDataset
you specified to see the supported splitslabel_field (None) – the label field (or prefix, if the dataset contains multiple label fields) in which to store the dataset’s labels. By default, this is
"ground_truth"
if the dataset contains a single label field. If the dataset contains multiple label fields and this value is not provided, the labels will be stored under dataset-specific field namesdataset_name (None) – an optional name to give the returned
fiftyone.core.dataset.Dataset
. By default, a name will be constructed based on the dataset and split(s) you are loadingdownload_if_necessary (True) – whether to download the dataset if it is not found in the specified dataset directory
drop_existing_dataset (False) – whether to drop an existing dataset with the same name if it exists
persistent (False) – whether the dataset should persist in the database after the session terminates
overwrite (False) – whether to overwrite any existing files if the dataset is to be downloaded
cleanup (True) – whether to cleanup any temporary files generated during download
progress (None) – whether to render a progress bar (True/False), use the default value
fiftyone.config.show_progress_bars
(None), or a progress callback function to invoke instead**kwargs – optional arguments to pass to the
fiftyone.utils.data.importers.DatasetImporter
constructor or the remote dataset’sload_dataset()` method. If ``download_if_necessary == True
, thenkwargs
can also contain arguments fordownload_zoo_dataset()
- Returns:
- fiftyone.zoo.find_zoo_dataset(name_or_url, split=None)#
Returns the directory containing the given zoo dataset.
If a
split
is provided, the path to the dataset split is returned; otherwise, the path to the root directory is returned.The dataset must be downloaded. Use
download_zoo_dataset()
to download datasets.- Parameters:
name_or_url –
the name of the zoo dataset or its remote source, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
split (None) – a specific split to locate
- Returns:
the directory containing the dataset or split
- Raises:
ValueError – if the dataset or split does not exist or has not been downloaded
- fiftyone.zoo.load_zoo_dataset_info(name_or_url)#
Loads the
ZooDatasetInfo
for the specified zoo dataset.The dataset must be downloaded. Use
download_zoo_dataset()
to download datasets.- Parameters:
name_or_url –
the name of the zoo dataset or its remote source, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
- Returns:
the
ZooDatasetInfo
for the dataset- Raises:
ValueError – if the dataset has not been downloaded
- fiftyone.zoo.get_zoo_dataset(name_or_url, overwrite=False, **kwargs)#
Returns the
ZooDataset
instance for the given dataset.If the dataset is available from multiple sources, the default source is used.
- Parameters:
name_or_url –
the name of the zoo dataset, or its remote source, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
overwrite (False) – whether to overwrite existing metadata if it has already been downloaded. Only applicable when
name_or_url
is a remote source**kwargs – optional arguments for
ZooDataset
- Returns:
the
ZooDataset
instance
- fiftyone.zoo.delete_zoo_dataset(name_or_url, split=None)#
Deletes the zoo dataset from local disk, if necessary.
If a
split
is provided, only that split is deleted.- Parameters:
name_or_url –
the name of the zoo dataset, or its remote source, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
split (None)
- class fiftyone.zoo.ZooDatasetInfo(zoo_dataset, dataset_type, num_samples, downloaded_splits=None, parameters=None, classes=None)#
Bases:
Serializable
Class containing info about a dataset in the FiftyOne Dataset Zoo.
- Parameters:
zoo_dataset – the
ZooDataset
instance for the datasetdataset_type – the
fiftyone.types.Dataset
type of the datasetnum_samples – the total number of samples in all downloaded splits of the dataset
downloaded_splits (None) – a dict of
ZooDatasetSplitInfo
instances describing the downloaded splits of the dataset, if applicableparameters (None) – a dict of parameters for the dataset
classes (None) – a list of class label strings
Attributes:
The name of the dataset.
The fully-qualified class string for the
ZooDataset
of the dataset.The fully-qualified class string of the
fiftyone.types.Dataset
type, if any.A tuple of supported splits for the dataset, or None if the dataset does not have splits.
The dataset's URL, or None if it is not remotely-sourced.
Methods:
Returns the
ZooDataset
instance for the dataset.Returns the
fiftyone.types.Dataset
type instance for the dataset.is_split_downloaded
(split)Whether the given dataset split is downloaded.
add_split
(split_info)Adds the split to the dataset.
remove_split
(split)Removes the split from the dataset.
Returns a list of class attributes to be serialized.
from_dict
(d)Loads a
ZooDatasetInfo
from a JSON dictionary.from_json
(json_path[, zoo_dataset, upgrade, ...])Loads a
ZooDatasetInfo
from a JSON file on disk.copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
- property name#
The name of the dataset.
- property zoo_dataset#
The fully-qualified class string for the
ZooDataset
of the dataset.
- property dataset_type#
The fully-qualified class string of the
fiftyone.types.Dataset
type, if any.
- property supported_splits#
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
- property url#
The dataset’s URL, or None if it is not remotely-sourced.
- get_zoo_dataset()#
Returns the
ZooDataset
instance for the dataset.- Returns:
a
ZooDataset
instance
- get_dataset_type()#
Returns the
fiftyone.types.Dataset
type instance for the dataset.- Returns:
a
fiftyone.types.Dataset
instance
- is_split_downloaded(split)#
Whether the given dataset split is downloaded.
- Parameters:
split – the dataset split
- Returns:
True/False
- add_split(split_info)#
Adds the split to the dataset.
- Parameters:
split_info – a
ZooDatasetSplitInfo
- remove_split(split)#
Removes the split from the dataset.
- Parameters:
split – the name of the split
- attributes()#
Returns a list of class attributes to be serialized.
- Returns:
a list of class attributes
- classmethod from_dict(d)#
Loads a
ZooDatasetInfo
from a JSON dictionary.- Parameters:
d – a JSON dictionary
- Returns:
- classmethod from_json(json_path, zoo_dataset=None, upgrade=False, warn_deprecated=False)#
Loads a
ZooDatasetInfo
from a JSON file on disk.- Parameters:
json_path – path to JSON file
zoo_dataset (None) – an existing
ZooDataset
instanceupgrade (False) – 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:
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- class fiftyone.zoo.ZooDatasetSplitInfo(split, num_samples)#
Bases:
Serializable
Class containing info about a split of a dataset in the FiftyOne Dataset Zoo.
- Parameters:
split – the name of the split
num_samples – the number of samples in the split
Methods:
Returns a list of class attributes to be serialized.
from_dict
(d)Loads a
ZooDatasetSplitInfo
from a JSON dictionary.copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
from_json
(path, *args, **kwargs)Constructs a Serializable object from a JSON file.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
- attributes()#
Returns a list of class attributes to be serialized.
- Returns:
a list of class attributes
- classmethod from_dict(d)#
Loads a
ZooDatasetSplitInfo
from a JSON dictionary.- Parameters:
d – a JSON dictionary
- Returns:
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- classmethod from_json(path, *args, **kwargs)#
Constructs a Serializable object from a JSON file.
Subclasses may override this method, but, by default, this method simply reads the JSON and calls from_dict(), which subclasses must implement.
- Parameters:
path – the path to the JSON file on disk
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- class fiftyone.zoo.ZooDataset#
Bases:
object
Base class for datasets made available in the FiftyOne Dataset Zoo.
Attributes:
The name of the dataset.
Whether the dataset is remotely-sourced.
The license or list,of,licenses under which the dataset is distributed, or None if unknown.
A tuple of tags for the dataset.
Whether the dataset has tags.
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
Whether the dataset has splits.
Whether the dataset has patches that may need to be applied to already downloaded files.
Whether the dataset supports downloading partial subsets of its splits.
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
A dict of default kwargs to pass to this dataset's
fiftyone.utils.data.importers.DatasetImporter
.Methods:
has_tag
(tag)Whether the dataset has the given tag.
has_split
(split)Whether the dataset has the given split.
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
.load_info
(dataset_dir[, upgrade, ...])Loads the
ZooDatasetInfo
from the given dataset directory.get_info_path
(dataset_dir)Returns the path to the
ZooDatasetInfo
for the dataset.download_and_prepare
(dataset_dir[, split, ...])Downloads the dataset and prepares it for use.
- property name#
The name of the dataset.
- property is_remote#
Whether the dataset is remotely-sourced.
- property license#
The license or list,of,licenses under which the dataset is distributed, or None if unknown.
- property tags#
A tuple of tags for the dataset.
- property has_tags#
Whether the dataset has tags.
- property parameters#
An optional dict of parameters describing the configuration of the zoo dataset when it was downloaded.
- property supported_splits#
A tuple of supported splits for the dataset, or None if the dataset does not have splits.
- property has_splits#
Whether the dataset has splits.
- property has_patches#
Whether the dataset has patches that may need to be applied to already downloaded files.
- property supports_partial_downloads#
Whether the dataset supports downloading partial subsets of its splits.
- property requires_manual_download#
Whether this dataset requires some files to be manually downloaded by the user before the dataset can be loaded.
- property importer_kwargs#
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
- has_tag(tag)#
Whether the dataset has the given tag.
- Parameters:
tag – the tag
- Returns:
True/False
- has_split(split)#
Whether the dataset has the given split.
- Parameters:
split – the dataset split
- Returns:
True/False
- 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
- 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
- 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
- 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
- class fiftyone.zoo.RemoteZooDataset(dataset_dir, url=None, **kwargs)#
Bases:
ZooDataset
Class for working with remotely-sourced datasets that are compatible with the FiftyOne Dataset Zoo.
- Parameters:
dataset_dir – the dataset’s local directory, which must contain a valid dataset YAML file
url (None) –
the dataset’s remote source, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
This is explicitly provided rather than relying on the YAML file’s
url
property in case the caller has specified a particular branch or commit**kwargs – optional keyword arguments for the dataset’s download_and_prepare() and/or load_dataset() methods
Attributes:
The name of the dataset.
Whether the dataset is remotely-sourced.
The license or list,of,licenses under which the dataset is distributed, or None if unknown.
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 supports downloading partial subsets of its 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
.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.
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 metadata#
- property name#
The name of the dataset.
- property url#
- property is_remote#
Whether the dataset is remotely-sourced.
- property author#
- property version#
- property source#
- property license#
The license or list,of,licenses under which the dataset is distributed, or None if unknown.
- property description#
- property fiftyone_version#
- property tags#
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 supports_partial_downloads#
Whether the dataset supports downloading partial subsets of its splits.
- property size_samples#
- 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
- property has_tags#
Whether the dataset has tags.
- property importer_kwargs#
A dict of default kwargs to pass to this dataset’s
fiftyone.utils.data.importers.DatasetImporter
.
- 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.
- class fiftyone.zoo.DeprecatedZooDataset#
Bases:
ZooDataset
Class representing a zoo dataset that no longer exists in the FiftyOne Dataset Zoo.
Attributes:
The name of 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.
The license or list,of,licenses under which the dataset is distributed, or None if unknown.
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.
A tuple of tags for the dataset.
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.
- 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
- property has_tags#
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.
- property license#
The license or list,of,licenses under which the dataset is distributed, or None if unknown.
- 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.
- property tags#
A tuple of tags for the dataset.
- class fiftyone.zoo.defaultdict#
Bases:
dict
defaultdict(default_factory=None, /, […]) –> dict with default factory
The default factory is called without arguments to produce a new value when a key is not present, in __getitem__ only. A defaultdict compares equal to a dict with the same items. All remaining arguments are treated the same as if they were passed to the dict constructor, including keyword arguments.
Methods:
clear
()copy
()fromkeys
([value])Create a new dictionary with keys from iterable and values set to value.
get
(key[, default])Return the value for key if key is in the dictionary, else default.
items
()keys
()pop
(k[,d])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
()Remove and return a (key, value) pair as a 2-tuple.
setdefault
(key[, default])Insert key with a value of default if key is not in the dictionary.
update
([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values
()Attributes:
Factory for default value called by __missing__().
- clear() None. Remove all items from D. #
- copy() a shallow copy of D. #
- default_factory#
Factory for default value called by __missing__().
- fromkeys(value=None, /)#
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)#
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items #
- keys() a set-like object providing a view on D's keys #
- pop(k[, d]) v, remove specified key and return the corresponding value. #
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()#
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)#
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from dict/iterable E and F. #
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values #
- fiftyone.zoo.deepcopy(x, memo=None, _nil=[])#
Deep copy operation on arbitrary Python objects.
See the module’s __doc__ string for more info.
- exception fiftyone.zoo.ConfigError#
Bases:
Exception
Exception raised when an invalid Config instance is encountered.
Methods:
Exception.add_note(note) -- add a note to the exception
Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
Attributes:
- add_note()#
Exception.add_note(note) – add a note to the exception
- args#
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- fiftyone.zoo.list_zoo_models(tags=None, source=None, license=None)#
Returns the list of available models in the FiftyOne Model Zoo.
Also includes models from any remote sources that you’ve registered.
Example usage:
import fiftyone as fo import fiftyone.zoo as foz # # List all zoo models # names = foz.list_zoo_models() print(names) # # List all zoo models with the specified tag(s) # names = foz.list_zoo_models(tags="torch") print(names)
- Parameters:
tags (None) – only include models that have the specified tag or list of tags
source (None) – only include models available via the given remote source
license (None) – only include models that are distributed under the specified license or any of the specified list of licenses. Run
fiftyone zoo models list
to see the available licenses
- Returns:
a list of model names
- fiftyone.zoo.list_downloaded_zoo_models()#
Returns information about the zoo models that have been downloaded.
- Returns:
a dict mapping model names to (model path,
ZooModel
) tuples
- fiftyone.zoo.is_zoo_model_downloaded(name)#
Determines whether the zoo model of the given name is downloaded.
- Parameters:
name – the name of the zoo model, which can have
@<ver>
appended to refer to a specific version of the model- Returns:
True/False
- fiftyone.zoo.download_zoo_model(name_or_url, model_name=None, overwrite=False)#
Downloads the specified model from the FiftyOne Model Zoo.
If the model is already downloaded, it is not re-downloaded unless
overwrite == True
is specified.Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the
GITHUB_TOKEN
environment variable.- Parameters:
name_or_url –
the name of the zoo model to download, which can have
@<ver>
appended to refer to a specific version of the model, or the remote source to download it from, which can be:a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
model_name (None) – the specific model to download, if
name_or_url
is a remote sourceoverwrite (False) – whether to overwrite any existing files
- Returns:
tuple of
model: the
ZooModel
for the modelmodel_path: the path to the downloaded model on disk
- fiftyone.zoo.install_zoo_model_requirements(name, error_level=None)#
Installs any package requirements for the specified zoo model.
- Parameters:
name – the name of the zoo model, which can have
@<ver>
appended to refer to a specific version of the modelerror_level (None) –
the error level to use, defined as:
0: raise error if a requirement install fails
1: log warning if a requirement install fails
2: ignore install fails requirements
By default,
fo.config.requirement_error_level
is used
- fiftyone.zoo.ensure_zoo_model_requirements(name, error_level=None, log_success=True)#
Ensures that the package requirements for the specified zoo model are satisfied.
- Parameters:
name – the name of the zoo model, which can have
@<ver>
appended to refer to a specific version of the modelerror_level (None) –
the error level to use when installing/ensuring requirements, defined as:
0: raise error if a requirement is not satisfied
1: log warning if a requirement is not satisfied
2: ignore unsatisfied requirements
By default,
fo.config.requirement_error_level
is usedlog_success (True) – whether to generate a log message when a requirement is satisfied
- fiftyone.zoo.load_zoo_model(name_or_url, model_name=None, download_if_necessary=True, ensure_requirements=True, install_requirements=False, error_level=None, cache=True, **kwargs)#
Loads the specified model from the FiftyOne Model Zoo.
By default, the model will be downloaded if necessary, and any documented package requirements will be checked to ensure that they are installed.
Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the
GITHUB_TOKEN
environment variable.- Parameters:
name_or_url –
the name of the zoo model to load, which can have
@<ver>
appended to refer to a specific version of the model, or the remote source to load it from, which can be:a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
model_name (None) – the specific model to load, if
name_or_url
is a remote sourcedownload_if_necessary (True) – whether to download the model if necessary
ensure_requirements (True) – whether to ensure any requirements are installed before loading the model
install_requirements (False) – whether to install any requirements before loading the model
error_level (None) –
the error level to use when installing/ensuring requirements, defined as:
0: raise error if a requirement is not satisfied
1: log warning if a requirement is not satisfied
2: ignore unsatisfied requirements
By default,
fo.config.requirement_error_level
is usedcache (True) – whether to store a weak reference to the model so that running this method again will return the same instance while the model is still in use
**kwargs – keyword arguments to inject into the model’s
Config
instance
- Returns:
- fiftyone.zoo.find_zoo_model(name)#
Returns the path to the zoo model on disk.
The model must be downloaded. Use
download_zoo_model()
to download models.- Parameters:
name – the name of the zoo model, which can have
@<ver>
appended to refer to a specific version of the model- Returns:
the path to the model on disk
- Raises:
ValueError – if the model does not exist or has not been downloaded
- fiftyone.zoo.get_zoo_model(name)#
Returns the
ZooModel
instance for the specified zoo model.- Parameters:
name – the name of the zoo model, which can have
@<ver>
appended to refer to a specific version of the model- Returns:
a
ZooModel
- fiftyone.zoo.delete_zoo_model(name)#
Deletes the zoo model from local disk, if necessary.
- Parameters:
name – the name of the zoo model, which can have
@<ver>
appended to refer to a specific version of the model
- fiftyone.zoo.list_zoo_model_sources()#
Returns the list of remote model sources that are registered locally.
- Returns:
the list of remote sources
- fiftyone.zoo.register_zoo_model_source(url_or_gh_repo, overwrite=False)#
Registers a remote source of models, if necessary.
Note
To download from a private GitHub repository that you have access to, provide your GitHub personal access token by setting the
GITHUB_TOKEN
environment variable.- Parameters:
url_or_gh_repo –
the remote source to register, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
overwrite (False) – whether to overwrite any existing files
- fiftyone.zoo.delete_zoo_model_source(url_or_gh_repo)#
Deletes the specified remote source and all downloaded models associated with it.
- Parameters:
url_or_gh_repo –
the remote source to delete, which can be:
a GitHub repo URL like
https://github.com/<user>/<repo>
a GitHub ref like
https://github.com/<user>/<repo>/tree/<branch>
orhttps://github.com/<user>/<repo>/commit/<commit>
a GitHub ref string like
<user>/<repo>[/<ref>]
a publicly accessible URL of an archive (eg zip or tar) file
- class fiftyone.zoo.HasZooModel#
Bases:
HasPublishedModel
Mixin class for Config classes of
fiftyone.core.models.Model
instances whose models are stored in the FiftyOne Model Zoo.This class provides the following functionality:
The model to load can be specified either by:
providing a model_name, which specifies the zoo model to load. The model will be downloaded, if necessary
providing a model_path, which directly specifies the path to the model to load
fiftyone.core.models.ModelConfig
definitions that use zoo models with default deployments will have default values for any unspecified parameters loaded and applied at runtime
- Parameters:
model_name – the name of the zoo model to load. If this value is provided, model_path does not need to be
model_path – the path to an already downloaded zoo model on disk to load. If this value is provided, model_name does not need to be
Methods:
Downloads the published model specified by the config, if necessary.
init
(d)Initializes the published model config.
- download_model_if_necessary()#
Downloads the published model specified by the config, if necessary.
After this method is called, the model_path attribute will always contain the path to the model on disk.
- init(d)#
Initializes the published model config.
This method should be called by ModelConfig.__init__(), and it performs the following tasks:
Parses the model_name and model_path parameters
Populates any default parameters in the provided ModelConfig dict
- Parameters:
d – a ModelConfig dict
- Returns:
a ModelConfig dict with any default parameters populated
- class fiftyone.zoo.ZooModel(base_name, base_filename=None, subdir=None, manager=None, author=None, version=None, url=None, source=None, license=None, description=None, size_bytes=None, default_deployment_config_dict=None, requirements=None, tags=None, date_added=None)#
Bases:
Model
Class describing a model in the FiftyOne Model Zoo.
- Parameters:
base_name – the base name of the model (no version info)
base_filename (None) – the base filename or directory of the model (no version info), if applicable
author (None) – the author of the model
version (None) – the version of the model
url (None) – the URL at which the model is hosted
license (None) – the license under which the model is distributed
source (None) – the source of the model
description (None) – the description of the model
tags (None) – a list of tags for the model
size_bytes (None) – the size of the model on disk
date_added (None) – the datetime that the model was added to the zoo
requirements (None) – the
eta.core.models.ModelRequirements
for the modelmanager (None) – the
fiftyone.core.models.ModelManager
instance that describes the remote storage location of the model, if applicabledefault_deployment_config_dict (None) – a
fiftyone.core.models.ModelConfig
dict describing the recommended settings for deploying the model
Methods:
Returns a list of class attributes to be serialized.
copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
download_model
(model_path[, force])Downloads the model to the given local path.
ensure_requirements
([error_level, log_success])Ensures that any requirement(s) for this model are satisfied.
flush_model
(model_path)Flushes the copy of the model at the given local path, if necessary.
flush_model_from_dir
(models_dir)Flushes the copy of the model in the given models directory, if necessary.
from_dict
(d[, subdir])Constructs a Model from a JSON dictionary.
from_json
(path, *args, **kwargs)Constructs a Serializable object from a JSON file.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
get_path_in_dir
(models_dir)Gets the model path for the model in the given models directory.
has_tag
(tag)Whether this model has the given tag.
has_version_str
(name)Determines whether the given model name has a version string.
install_requirements
([error_level])Installs any necessary requirement(s) for this model.
is_in_dir
(models_dir)Determines whether a copy of the model exists in the given models directory.
is_model_downloaded
(model_path)Determines whether the model is downloaded to the given location.
parse_name
(name)Parses the model name, returning the base name and the version, if any.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
Attributes:
The version of this model expressed as a distutils.version.LooseVersion intended for comparison operations.
The version-aware filename of the model.
Whether this model has a manager instance.
Whether this model has requirements in order to be used.
Whether this model has tags.
Determines whether the model has a version.
The version-aware name of the model.
Whether the model supports CPU (True), or not (False), or unknown (None).
Whether the model supports GPU (True), or not (False), or unknown (None).
- attributes()#
Returns a list of class attributes to be serialized.
- Returns:
a list of class attributes
- property comp_version#
The version of this model expressed as a distutils.version.LooseVersion intended for comparison operations.
Models with no version are given a version of 0.0.0.
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- download_model(model_path, force=False)#
Downloads the model to the given local path.
If the download is forced, any existing model is overwritten. If the download is not forced, the model will only be downloaded if it does not already exist locally.
If the model has no manager, nothing is downloaded.
- Parameters:
model_path – the path to which to download the model
force – whether to force download the model. If True, the model is always downloaded. If False, the model is only downloaded if necessary. The default is False
- Raises:
ModelError – if model downloading is not currently allowed
- ensure_requirements(error_level=0, log_success=False)#
Ensures that any requirement(s) for this model are satisfied.
- Parameters:
error_level –
the error level to use, defined as:
0: raise error if a requirement is not satisfied 1: log warning if a requirement is not satisifed 2: ignore unsatisifed requirements
log_success – whether to generate a log message when a requirement is satisifed
- property filename#
The version-aware filename of the model.
- flush_model(model_path)#
Flushes the copy of the model at the given local path, if necessary.
- Parameters:
model_path – the path on disk for the model
- flush_model_from_dir(models_dir)#
Flushes the copy of the model in the given models directory, if necessary.
- Parameters:
models_dir – the models directory
- classmethod from_dict(d, subdir=None)#
Constructs a Model from a JSON dictionary.
- Parameters:
d – a JSON dictionary
subdir (optional) – a subdirectory for the model
- Returns:
a Model instance
- classmethod from_json(path, *args, **kwargs)#
Constructs a Serializable object from a JSON file.
Subclasses may override this method, but, by default, this method simply reads the JSON and calls from_dict(), which subclasses must implement.
- Parameters:
path – the path to the JSON file on disk
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- get_path_in_dir(models_dir)#
Gets the model path for the model in the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
the model path, or None if the model has no manager
- property has_manager#
Whether this model has a manager instance.
- property has_requirements#
Whether this model has requirements in order to be used.
- has_tag(tag)#
Whether this model has the given tag.
- Parameters:
tag – a tag
- Returns:
True/False
- property has_tags#
Whether this model has tags.
- property has_version#
Determines whether the model has a version.
- static has_version_str(name)#
Determines whether the given model name has a version string.
- Parameters:
name – the model name
- Returns:
True/False
- install_requirements(error_level=0)#
Installs any necessary requirement(s) for this model.
- Parameters:
error_level –
the error level to use, defined as:
0: raise error if an install fails 1: log warning if an install fails 2: ignore install fails
- is_in_dir(models_dir)#
Determines whether a copy of the model exists in the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
True/False, or None if the model has no manager
- is_model_downloaded(model_path)#
Determines whether the model is downloaded to the given location.
If model_path is an archive, this method will also return True if a directory with the same basename as model_path exists.
- Parameters:
model_path – the path on disk for the model
- Returns:
True/False, or None if the model has no manager
- property name#
The version-aware name of the model.
- static parse_name(name)#
Parses the model name, returning the base name and the version, if any.
- Parameters:
name – the name of the model, which can have “@<ver>” appended to refer to a specific version of the model
- Returns:
the base name of the model version: the version of the model, or None if no version was found
- Return type:
base_name
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- property supports_cpu#
Whether the model supports CPU (True), or not (False), or unknown (None).
- property supports_gpu#
Whether the model supports GPU (True), or not (False), or unknown (None).
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- class fiftyone.zoo.RemoteZooModel(*args, **kwargs)#
Bases:
ZooModel
Methods:
load_model
(**kwargs)resolve_input
(ctx)parse_parameters
(ctx, params)Returns a list of class attributes to be serialized.
copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
download_model
(model_path[, force])Downloads the model to the given local path.
ensure_requirements
([error_level, log_success])Ensures that any requirement(s) for this model are satisfied.
flush_model
(model_path)Flushes the copy of the model at the given local path, if necessary.
flush_model_from_dir
(models_dir)Flushes the copy of the model in the given models directory, if necessary.
from_dict
(d[, subdir])Constructs a Model from a JSON dictionary.
from_json
(path, *args, **kwargs)Constructs a Serializable object from a JSON file.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
get_path_in_dir
(models_dir)Gets the model path for the model in the given models directory.
has_tag
(tag)Whether this model has the given tag.
has_version_str
(name)Determines whether the given model name has a version string.
install_requirements
([error_level])Installs any necessary requirement(s) for this model.
is_in_dir
(models_dir)Determines whether a copy of the model exists in the given models directory.
is_model_downloaded
(model_path)Determines whether the model is downloaded to the given location.
parse_name
(name)Parses the model name, returning the base name and the version, if any.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
Attributes:
The version of this model expressed as a distutils.version.LooseVersion intended for comparison operations.
The version-aware filename of the model.
Whether this model has a manager instance.
Whether this model has requirements in order to be used.
Whether this model has tags.
Determines whether the model has a version.
The version-aware name of the model.
Whether the model supports CPU (True), or not (False), or unknown (None).
Whether the model supports GPU (True), or not (False), or unknown (None).
- load_model(**kwargs)#
- resolve_input(ctx)#
- parse_parameters(ctx, params)#
- attributes()#
Returns a list of class attributes to be serialized.
- Returns:
a list of class attributes
- property comp_version#
The version of this model expressed as a distutils.version.LooseVersion intended for comparison operations.
Models with no version are given a version of 0.0.0.
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- download_model(model_path, force=False)#
Downloads the model to the given local path.
If the download is forced, any existing model is overwritten. If the download is not forced, the model will only be downloaded if it does not already exist locally.
If the model has no manager, nothing is downloaded.
- Parameters:
model_path – the path to which to download the model
force – whether to force download the model. If True, the model is always downloaded. If False, the model is only downloaded if necessary. The default is False
- Raises:
ModelError – if model downloading is not currently allowed
- ensure_requirements(error_level=0, log_success=False)#
Ensures that any requirement(s) for this model are satisfied.
- Parameters:
error_level –
the error level to use, defined as:
0: raise error if a requirement is not satisfied 1: log warning if a requirement is not satisifed 2: ignore unsatisifed requirements
log_success – whether to generate a log message when a requirement is satisifed
- property filename#
The version-aware filename of the model.
- flush_model(model_path)#
Flushes the copy of the model at the given local path, if necessary.
- Parameters:
model_path – the path on disk for the model
- flush_model_from_dir(models_dir)#
Flushes the copy of the model in the given models directory, if necessary.
- Parameters:
models_dir – the models directory
- classmethod from_dict(d, subdir=None)#
Constructs a Model from a JSON dictionary.
- Parameters:
d – a JSON dictionary
subdir (optional) – a subdirectory for the model
- Returns:
a Model instance
- classmethod from_json(path, *args, **kwargs)#
Constructs a Serializable object from a JSON file.
Subclasses may override this method, but, by default, this method simply reads the JSON and calls from_dict(), which subclasses must implement.
- Parameters:
path – the path to the JSON file on disk
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- get_path_in_dir(models_dir)#
Gets the model path for the model in the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
the model path, or None if the model has no manager
- property has_manager#
Whether this model has a manager instance.
- property has_requirements#
Whether this model has requirements in order to be used.
- has_tag(tag)#
Whether this model has the given tag.
- Parameters:
tag – a tag
- Returns:
True/False
- property has_tags#
Whether this model has tags.
- property has_version#
Determines whether the model has a version.
- static has_version_str(name)#
Determines whether the given model name has a version string.
- Parameters:
name – the model name
- Returns:
True/False
- install_requirements(error_level=0)#
Installs any necessary requirement(s) for this model.
- Parameters:
error_level –
the error level to use, defined as:
0: raise error if an install fails 1: log warning if an install fails 2: ignore install fails
- is_in_dir(models_dir)#
Determines whether a copy of the model exists in the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
True/False, or None if the model has no manager
- is_model_downloaded(model_path)#
Determines whether the model is downloaded to the given location.
If model_path is an archive, this method will also return True if a directory with the same basename as model_path exists.
- Parameters:
model_path – the path on disk for the model
- Returns:
True/False, or None if the model has no manager
- property name#
The version-aware name of the model.
- static parse_name(name)#
Parses the model name, returning the base name and the version, if any.
- Parameters:
name – the name of the model, which can have “@<ver>” appended to refer to a specific version of the model
- Returns:
the base name of the model version: the version of the model, or None if no version was found
- Return type:
base_name
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- property supports_cpu#
Whether the model supports CPU (True), or not (False), or unknown (None).
- property supports_gpu#
Whether the model supports GPU (True), or not (False), or unknown (None).
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- class fiftyone.zoo.RemoteModelManagerConfig(d)#
Bases:
ModelManagerConfig
Methods:
Returns a list of attributes to be serialized.
builder
()Returns a ConfigBuilder instance for this class.
copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
default
()Returns the default config instance.
from_dict
(d)Constructs a Config object from a JSON dictionary.
from_json
(path, *args, **kwargs)Constructs a Serializable object from a JSON file.
from_kwargs
(**kwargs)Constructs a Config object from keyword arguments.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
Loads the default config instance from file.
parse_array
(d, key[, default])Parses a raw array attribute.
parse_bool
(d, key[, default])Parses a boolean value.
parse_categorical
(d, key, choices[, default])Parses a categorical JSON field, which must take a value from among the given choices.
parse_dict
(d, key[, default])Parses a dictionary attribute.
parse_int
(d, key[, default])Parses an integer attribute.
parse_mutually_exclusive_fields
(fields)Parses a mutually exclusive dictionary of pre-parsed fields, which must contain exactly one field with a truthy value.
parse_number
(d, key[, default])Parses a number attribute.
parse_object
(d, key, cls[, default])Parses an object attribute.
parse_object_array
(d, key, cls[, default])Parses an array of objects.
parse_object_dict
(d, key, cls[, default])Parses a dictionary whose values are objects.
parse_path
(d, key[, default])Parses a path attribute.
parse_raw
(d, key[, default])Parses a raw (arbitrary) JSON field.
parse_string
(d, key[, default])Parses a string attribute.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
validate_all_or_nothing_fields
(fields)Validates a dictionary of pre-parsed fields checking that either all or none of the fields have a truthy value.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
- attributes()#
Returns a list of attributes to be serialized.
- Returns:
a list of attributes
- classmethod builder()#
Returns a ConfigBuilder instance for this class.
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- classmethod default()#
Returns the default config instance.
By default, this method instantiates the class from an empty dictionary, which will only succeed if all attributes are optional. Otherwise, subclasses should override this method to provide the desired default configuration.
- classmethod from_dict(d)#
Constructs a Config object from a JSON dictionary.
Config subclass constructors accept JSON dictionaries, so this method simply passes the dictionary to cls().
- Parameters:
d – a dict of fields expected by cls
- Returns:
an instance of cls
- classmethod from_json(path, *args, **kwargs)#
Constructs a Serializable object from a JSON file.
Subclasses may override this method, but, by default, this method simply reads the JSON and calls from_dict(), which subclasses must implement.
- Parameters:
path – the path to the JSON file on disk
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod from_kwargs(**kwargs)#
Constructs a Config object from keyword arguments.
- Parameters:
**kwargs – keyword arguments that define the fields expected by cls
- Returns:
an instance of cls
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- classmethod load_default()#
Loads the default config instance from file.
Subclasses must implement this method if they intend to support default instances.
- static parse_array(d, key, default=<eta.core.config.NoDefault object>)#
Parses a raw array attribute.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default list to return if key is not present
- Returns:
a list of raw (untouched) values
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_bool(d, key, default=<eta.core.config.NoDefault object>)#
Parses a boolean value.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default bool to return if key is not present
- Returns:
True/False
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_categorical(d, key, choices, default=<eta.core.config.NoDefault object>)#
Parses a categorical JSON field, which must take a value from among the given choices.
- Parameters:
d – a JSON dictionary
key – the key to parse
choices – either an iterable of possible values or an enum-like class whose attributes define the possible values
default – a default value to return if key is not present
- Returns:
the raw (untouched) value of the given field, which is equal to a value from choices
- Raises:
ConfigError – if the key was present in the dictionary but its value was not an allowed choice, or if no default value was provided and the key was not found in the dictionary
- static parse_dict(d, key, default=<eta.core.config.NoDefault object>)#
Parses a dictionary attribute.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default dict to return if key is not present
- Returns:
a dictionary
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_int(d, key, default=<eta.core.config.NoDefault object>)#
Parses an integer attribute.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default integer value to return if key is not present
- Returns:
an int
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_mutually_exclusive_fields(fields)#
Parses a mutually exclusive dictionary of pre-parsed fields, which must contain exactly one field with a truthy value.
- Parameters:
fields – a dictionary of pre-parsed fields
- Returns:
the (field, value) that was set
- Raises:
ConfigError – if zero or more than one truthy value was found
- static parse_number(d, key, default=<eta.core.config.NoDefault object>)#
Parses a number attribute.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default numeric value to return if key is not present
- Returns:
a number (e.g. int, float)
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_object(d, key, cls, default=<eta.core.config.NoDefault object>)#
Parses an object attribute.
The value of d[key] can be either an instance of cls or a serialized dict from an instance of cls.
- Parameters:
d – a JSON dictionary
key – the key to parse
cls – the class of d[key]
default – a default cls instance to return if key is not present
- Returns:
an instance of cls
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_object_array(d, key, cls, default=<eta.core.config.NoDefault object>)#
Parses an array of objects.
The values in d[key] can be either instances of cls or serialized dicts from instances of cls.
- Parameters:
d – a JSON dictionary
key – the key to parse
cls – the class of the elements of list d[key]
default – the default list to return if key is not present
- Returns:
a list of cls instances
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_object_dict(d, key, cls, default=<eta.core.config.NoDefault object>)#
Parses a dictionary whose values are objects.
The values in d[key] can be either instances of cls or serialized dicts from instances of cls.
- Parameters:
d – a JSON dictionary
key – the key to parse
cls – the class of the values of dictionary d[key]
default – the default dict of cls instances to return if key is not present
- Returns:
a dictionary whose values are cls instances
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_path(d, key, default=<eta.core.config.NoDefault object>)#
Parses a path attribute.
The path is converted to an absolute path if necessary via
os.path.abspath(os.path.expanduser(value))
.- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default string to return if key is not present
- Returns:
a path string
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- static parse_raw(d, key, default=<eta.core.config.NoDefault object>)#
Parses a raw (arbitrary) JSON field.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default value to return if key is not present
- Returns:
the raw (untouched) value of the given field
- Raises:
ConfigError – if no default value was provided and the key was not found in the dictionary
- static parse_string(d, key, default=<eta.core.config.NoDefault object>)#
Parses a string attribute.
- Parameters:
d – a JSON dictionary
key – the key to parse
default – a default string to return if key is not present
- Returns:
a string
- Raises:
ConfigError – if the field value was the wrong type or no default value was provided and the key was not found in the dictionary
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- static validate_all_or_nothing_fields(fields)#
Validates a dictionary of pre-parsed fields checking that either all or none of the fields have a truthy value.
- Parameters:
fields – a dictionary of pre-parsed fields
- Raises:
ConfigError – if some values are truth and some are not
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- class fiftyone.zoo.RemoteModelManager(config)#
Bases:
ModelManager
Methods:
Returns a list of attributes to be serialized.
copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
Deletes the model from remote storage.
download_model
(model_path[, force])Downloads the model to the given local path.
flush_model
(model_path)Flushes the copy of the model at the given local path, if necessary.
from_config
(config)Instantiates a Configurable class from a <cls>Config instance.
from_dict
(d)Builds the ModelManager subclass from a JSON dictionary.
from_json
(json_path)Instantiates a Configurable class from a <cls>Config JSON file.
from_kwargs
(**kwargs)Instantiates a Configurable class from keyword arguments defining the attributes of a <cls>Config.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
is_model_downloaded
(model_path)Determines whether the model is downloaded to the given location.
parse
(class_name[, module_name])Parses a Configurable subclass name string.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
upload_model
(model_path, *args, **kwargs)validate
(config)Validates that the given config is an instance of <cls>Config.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
- attributes()#
Returns a list of attributes to be serialized.
- Returns:
a list of attributes
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- delete_model()#
Deletes the model from remote storage.
- download_model(model_path, force=False)#
Downloads the model to the given local path.
If the download is forced, any existing model is overwritten. If the download is not forced, the model will only be downloaded if it does not already exist locally.
- Parameters:
model_path – the path to which to download the model
force – whether to force download the model. If True, the model is always downloaded. If False, the model is only downloaded if necessary. The default is False
- Raises:
ModelError – if model downloading is not currently allowed
- flush_model(model_path)#
Flushes the copy of the model at the given local path, if necessary.
- Parameters:
model_path – the path on disk for the model
- classmethod from_config(config)#
Instantiates a Configurable class from a <cls>Config instance.
- classmethod from_dict(d)#
Builds the ModelManager subclass from a JSON dictionary.
- Parameters:
d – a JSON dictionary
- Returns:
a ModelManager instance
- classmethod from_json(json_path)#
Instantiates a Configurable class from a <cls>Config JSON file.
- Parameters:
json_path – path to a JSON file for type <cls>Config
- Returns:
an instance of cls
- classmethod from_kwargs(**kwargs)#
Instantiates a Configurable class from keyword arguments defining the attributes of a <cls>Config.
- Parameters:
**kwargs – keyword arguments that define the fields of a <cls>Config dict
- Returns:
an instance of cls
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- is_model_downloaded(model_path)#
Determines whether the model is downloaded to the given location.
If model_path is an archive, this method will also return True if a directory with the same basename as model_path exists.
- Parameters:
model_path – the path on disk for the model
- Returns:
True/False
- static parse(class_name, module_name=None)#
Parses a Configurable subclass name string.
Assumes both the Configurable class and the Config class are defined in the same module. The module containing the classes will be loaded if necessary.
- Parameters:
class_name – a string containing the name of the Configurable class, e.g. “ClassName”, or a fully-qualified class name, e.g. “eta.core.config.ClassName”
module_name – a string containing the fully-qualified module name, e.g. “eta.core.config”, or None if class_name includes the module name. Set module_name = __name__ to load a class from the calling module
- Returns:
the Configurable class config_cls: the Config class associated with cls
- Return type:
cls
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- static upload_model(model_path, *args, **kwargs)#
- classmethod validate(config)#
Validates that the given config is an instance of <cls>Config.
- Raises:
ConfigurableError – if config is not an instance of <cls>Config
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- class fiftyone.zoo.ZooModelsManifest(models=None, name=None, url=None)#
Bases:
ModelsManifest
Class that describes the collection of models in the FiftyOne Model Zoo.
- Parameters:
models – a list of
ZooModel
instances
Methods:
add_model
(model[, error_level])Adds the given model to the manifest.
Returns a list of class attributes to be serialized.
copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
dir_has_manifest
(models_dir)Determines whether the given directory has a models manifest.
from_dict
(d)Constructs a ModelsManifest from a JSON dictionary.
from_dir
(models_dir)Loads the ModelsManifest from the given models directory.
from_json
(path, *args, **kwargs)Constructs a Serializable object from a JSON file.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
get_latest_model_with_base_name
(base_name)Gets the Model instance for the latest version of the model with the given base name.
get_model_with_name
(name)Gets the model with the given name.
has_model_with_filename
(model)Determines whether this manifest contains a model with a conflicting filename.
has_model_with_name
(name)Determines whether this manifest contains the model with the given name.
make_manifest_path
(models_dir)Makes the manifest path for the given models directory.
merge
(models_manifest[, error_level])Merges the models manifest into this one.
remove_model
(name[, error_level])Removes the model with the given name from the ModelsManifest.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
write_to_dir
(models_dir)Writes the ModelsManifest to the given models directory.
Attributes:
- add_model(model, error_level=0)#
Adds the given model to the manifest.
- Parameters:
model – a Model instance
error_level –
the error level to use, defined as:
0: raise error if the model cannot be added 1: log warning if the model cannot be added 2: ignore models that cannot be added
- attributes()#
Returns a list of class attributes to be serialized.
This method is called internally by serialize() to determine the class attributes to serialize.
Subclasses can override this method, but, by default, all attributes in vars(self) are returned, minus private attributes, i.e., those starting with “_”. The order of the attributes in this list is preserved when serializing objects, so a common pattern is for subclasses to override this method if they want their JSON files to be organized in a particular way.
- Returns:
a list of class attributes to be serialized
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- static dir_has_manifest(models_dir)#
Determines whether the given directory has a models manifest.
- Parameters:
models_dir – the models directory
- Returns:
True/False
- classmethod from_dict(d)#
Constructs a ModelsManifest from a JSON dictionary.
- Parameters:
d – a JSON dictionary
- Returns:
a ModelsManifest
- classmethod from_dir(models_dir)#
Loads the ModelsManifest from the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
a ModelsManifest
- classmethod from_json(path, *args, **kwargs)#
Constructs a Serializable object from a JSON file.
Subclasses may override this method, but, by default, this method simply reads the JSON and calls from_dict(), which subclasses must implement.
- Parameters:
path – the path to the JSON file on disk
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- get_latest_model_with_base_name(base_name)#
Gets the Model instance for the latest version of the model with the given base name.
- Parameters:
base_name – the base name of the model
- Returns:
the Model instance
- Raises:
ModelError – if the model was not found
- get_model_with_name(name)#
Gets the model with the given name.
- Parameters:
name – the name of the model
- Returns:
the Model instance
- Raises:
ModelError – if the model was not found
- has_model_with_filename(model)#
Determines whether this manifest contains a model with a conflicting filename.
- Parameters:
model – a Model instance
- Returns:
True/False
- has_model_with_name(name)#
Determines whether this manifest contains the model with the given name.
- Parameters:
name – the model name
- Returns:
True/False
- static make_manifest_path(models_dir)#
Makes the manifest path for the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
the manifest path
- merge(models_manifest, error_level=0)#
Merges the models manifest into this one.
- Parameters:
models_manifest – a ModelsManifest
error_level –
the error level to use, defined as:
0: raise error if a model cannot be added 1: log warning if a model cannot be added 2: ignore models that cannot be added
- remove_model(name, error_level=0)#
Removes the model with the given name from the ModelsManifest.
- Parameters:
name – the name of the model
error_level –
the error level to use, defined as:
0: raise error if the model cannot be added 1: log warning if the model cannot be added 2: ignore models that cannot be added
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- property subdir#
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- write_to_dir(models_dir)#
Writes the ModelsManifest to the given models directory.
- Parameters:
models_dir – the models directory
- class fiftyone.zoo.RemoteZooModelsManifest(models=None, name=None, url=None)#
Bases:
ZooModelsManifest
Class that describes the collection of remotely-sourced models in the FiftyOne Model Zoo.
- Parameters:
models – a list of
RemoteZooModel
instances
Methods:
add_model
(model[, error_level])Adds the given model to the manifest.
Returns a list of class attributes to be serialized.
copy
()Returns a deep copy of the object.
custom_attributes
([dynamic, private])Returns a customizable list of class attributes.
dir_has_manifest
(models_dir)Determines whether the given directory has a models manifest.
from_dict
(d)Constructs a ModelsManifest from a JSON dictionary.
from_dir
(models_dir)Loads the ModelsManifest from the given models directory.
from_json
(path, *args, **kwargs)Constructs a Serializable object from a JSON file.
from_str
(s, *args, **kwargs)Constructs a Serializable object from a JSON string.
Returns the fully-qualified class name string of this object.
get_latest_model_with_base_name
(base_name)Gets the Model instance for the latest version of the model with the given base name.
get_model_with_name
(name)Gets the model with the given name.
has_model_with_filename
(model)Determines whether this manifest contains a model with a conflicting filename.
has_model_with_name
(name)Determines whether this manifest contains the model with the given name.
make_manifest_path
(models_dir)Makes the manifest path for the given models directory.
merge
(models_manifest[, error_level])Merges the models manifest into this one.
remove_model
(name[, error_level])Removes the model with the given name from the ModelsManifest.
serialize
([reflective])Serializes the object into a dictionary.
to_str
([pretty_print])Returns a string representation of this object.
write_json
(path[, pretty_print])Serializes the object and writes it to disk.
write_to_dir
(models_dir)Writes the ModelsManifest to the given models directory.
Attributes:
- add_model(model, error_level=0)#
Adds the given model to the manifest.
- Parameters:
model – a Model instance
error_level –
the error level to use, defined as:
0: raise error if the model cannot be added 1: log warning if the model cannot be added 2: ignore models that cannot be added
- attributes()#
Returns a list of class attributes to be serialized.
This method is called internally by serialize() to determine the class attributes to serialize.
Subclasses can override this method, but, by default, all attributes in vars(self) are returned, minus private attributes, i.e., those starting with “_”. The order of the attributes in this list is preserved when serializing objects, so a common pattern is for subclasses to override this method if they want their JSON files to be organized in a particular way.
- Returns:
a list of class attributes to be serialized
- copy()#
Returns a deep copy of the object.
- Returns:
a Serializable instance
- custom_attributes(dynamic=False, private=False)#
Returns a customizable list of class attributes.
By default, all attributes in vars(self) are returned, minus private attributes (those starting with “_”).
- Parameters:
dynamic – whether to include dynamic properties, e.g., those defined by getter/setter methods or the @property decorator. By default, this is False
private – whether to include private properties, i.e., those starting with “_”. By default, this is False
- Returns:
a list of class attributes
- static dir_has_manifest(models_dir)#
Determines whether the given directory has a models manifest.
- Parameters:
models_dir – the models directory
- Returns:
True/False
- classmethod from_dict(d)#
Constructs a ModelsManifest from a JSON dictionary.
- Parameters:
d – a JSON dictionary
- Returns:
a ModelsManifest
- classmethod from_dir(models_dir)#
Loads the ModelsManifest from the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
a ModelsManifest
- classmethod from_json(path, *args, **kwargs)#
Constructs a Serializable object from a JSON file.
Subclasses may override this method, but, by default, this method simply reads the JSON and calls from_dict(), which subclasses must implement.
- Parameters:
path – the path to the JSON file on disk
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod from_str(s, *args, **kwargs)#
Constructs a Serializable object from a JSON string.
Subclasses may override this method, but, by default, this method simply parses the string and calls from_dict(), which subclasses must implement.
- Parameters:
s – a JSON string representation of a Serializable object
*args – optional positional arguments for self.from_dict()
**kwargs – optional keyword arguments for self.from_dict()
- Returns:
an instance of the Serializable class
- classmethod get_class_name()#
Returns the fully-qualified class name string of this object.
- get_latest_model_with_base_name(base_name)#
Gets the Model instance for the latest version of the model with the given base name.
- Parameters:
base_name – the base name of the model
- Returns:
the Model instance
- Raises:
ModelError – if the model was not found
- get_model_with_name(name)#
Gets the model with the given name.
- Parameters:
name – the name of the model
- Returns:
the Model instance
- Raises:
ModelError – if the model was not found
- has_model_with_filename(model)#
Determines whether this manifest contains a model with a conflicting filename.
- Parameters:
model – a Model instance
- Returns:
True/False
- has_model_with_name(name)#
Determines whether this manifest contains the model with the given name.
- Parameters:
name – the model name
- Returns:
True/False
- static make_manifest_path(models_dir)#
Makes the manifest path for the given models directory.
- Parameters:
models_dir – the models directory
- Returns:
the manifest path
- merge(models_manifest, error_level=0)#
Merges the models manifest into this one.
- Parameters:
models_manifest – a ModelsManifest
error_level –
the error level to use, defined as:
0: raise error if a model cannot be added 1: log warning if a model cannot be added 2: ignore models that cannot be added
- remove_model(name, error_level=0)#
Removes the model with the given name from the ModelsManifest.
- Parameters:
name – the name of the model
error_level –
the error level to use, defined as:
0: raise error if the model cannot be added 1: log warning if the model cannot be added 2: ignore models that cannot be added
- serialize(reflective=False)#
Serializes the object into a dictionary.
Serialization is applied recursively to all attributes in the object, including element-wise serialization of lists and dictionary values.
- Parameters:
reflective – whether to include reflective attributes when serializing the object. By default, this is False
- Returns:
a JSON dictionary representation of the object
- property subdir#
- to_str(pretty_print=True, **kwargs)#
Returns a string representation of this object.
- Parameters:
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is True
**kwargs – optional keyword arguments for self.serialize()
- Returns:
a string representation of the object
- write_json(path, pretty_print=False, **kwargs)#
Serializes the object and writes it to disk.
- Parameters:
path – the output path
pretty_print – whether to render the JSON in human readable format with newlines and indentations. By default, this is False
**kwargs – optional keyword arguments for self.serialize()
- write_to_dir(models_dir)#
Writes the ModelsManifest to the given models directory.
- Parameters:
models_dir – the models directory