A Tiny Imagenet Dataset for PyTorch, the usage is similar to torchvision.datasets
, this means each sample in the Dataset is a PIL.Image.Image
.
This script will download the dataset from the internet to your disk, and store preload data on your disk.
The script is a revision of this.
pip install imageio tqdm
For training data, use parameter mode='train'
, for validation data, use mode='val'
.
from TinyImageNetDataset import TinyImageNetDataset
# for classification
ti = TinyImageNetDataset(root_dir="./path_to_folder", download=True, task='classification')
# for localization
ti = TinyImageNetDataset(root_dir="./path_to_folder", download=True, task='localization')