How to apply torchvision transformations to zip file
I was trying to download CelebA data set and apply transformation to it via code:
from torchvision import transforms
from torchvision.datasets import CelebA

celeba_transforms = transforms.Compose([
    transforms.CenterCrop(140),
    transforms.Resize([64, 64]),
    transforms.ToTensor()
    ])
CelebA(root='path',
       split='train',
       download=True,
       transform=celeba_transforms) 

However I obtained error: BadZipFile: File is not a zip file. I did some research about this error and it seems that its quite popular and not easy to solve (since the problem is with Google Drive which has a daily maximum quota for any file, which seems to be exceeded for the CelebA files).
My solution then was to simply download file from Kaggle in zip. However then I have plain non-transformed CelebA data.
Is there any possibility to still apply celeba_transforms to this data?
EDIT
CelebA(root='archive_celeba.zip',
       split='train',
       download=False,
       transform=celeba_transforms)

I obtained error:
RuntimeError: Dataset not found or corrupted. You can use download=True to download it

Do you know what I'm doing wrong?

According to documentation from pytorch:

download (bool, optional) – If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.

you can set download to false and then it will still perform the transformations on the local dataset.
