module documentation

Utilities for working with the ImageNet dataset.

Copyright 2017-2025, Voxel51, Inc.

Function ensure_imagenet_manual_download Ensures that the ImageNet archive(s) for the requested split have been manually downloaded to the required locations.
Function _ensure_archive Undocumented
Function _raise_imagenet_error Undocumented
Constant _DEVKIT_TAR Undocumented
Constant _TRAIN_IMAGES_TAR Undocumented
Constant _VAL_IMAGES_DIR Undocumented
def ensure_imagenet_manual_download(source_dir, split, devkit=False): (source)

Ensures that the ImageNet archive(s) for the requested split have been manually downloaded to the required locations.

Parameters
source_dirthe dataset directory
splitthe split of interest. Supported values are ("train", "validation")
devkit:Falsewhether to ensure that the devkit archive is present
Raises
OSErrorif the required files are not present
def _ensure_archive(archive_name, source_dir): (source)

Undocumented

def _raise_imagenet_error(msg): (source)

Undocumented

_DEVKIT_TAR: str = (source)

Undocumented

Value
'ILSVRC2012_devkit_t12.tar.gz'
_TRAIN_IMAGES_TAR: str = (source)

Undocumented

Value
'ILSVRC2012_img_train.tar'
_VAL_IMAGES_DIR: str = (source)

Undocumented

Value
'ILSVRC2012_img_val.tar'