Archive

class olympus.datasets.archive.ZipDataset(root, transform=None, target_transform=None, loader=<function pil_loader>)[source]

Bases: torch.utils.data.dataset.Dataset

Use a Zip archive to load a Folder dataset/ImageFolder. Zip are superiors to plain folders because they simplify access patterns for the OS

Zip: 1 file with N random seeks Plain Folder: N files any where on the disk

Attributes:
classes
classes_to_idx
files
read_timer
transform_timer
zipfile

Zip file loading need to be delayed until the dataloader is ready,

Methods

find_classes  
register_datapipe_as_function  
register_function  
classes
classes_to_idx
files
find_classes(files)[source]
read_timer
transform_timer
zipfile

Zip file loading need to be delayed until the dataloader is ready, because the zip handles are not serializable

olympus.datasets.archive.pil_loader(file_object)[source]