TobiasSunderdiek / cartoon-gan

Implementation of cartoon GAN [Chen et al., CVPR18] with pytorch
https://tobiassunderdiek.github.io/cartoon-gan/
MIT License
61 stars 22 forks source link

Data loader error #9

Closed impactcolor closed 1 year ago

impactcolor commented 1 year ago

Hi! Thank you so much for sharing this code. When running the data loader step I get the following error: FileNotFoundError Traceback (most recent call last) in 14 ]) 15 ---> 16 cartoon_dataset = ImageFolder('cartoons/', transformer) 17 len_training_set = math.floor(len(cartoon_dataset) * 0.9) 18 len_valid_set = len(cartoon_dataset) - len_training_set

3 frames /usr/local/lib/python3.7/dist-packages/torchvision/datasets/folder.py in make_dataset(directory, class_to_idx, extensions, is_valid_file) 101 if extensions is not None: 102 msg += f"Supported extensions are: {extensions if isinstance(extensions, str) else ', '.join(extensions)}" --> 103 raise FileNotFoundError(msg) 104 105 return instances

FileNotFoundError: Found no valid file for the classes 1. Supported extensions are: .jpg, .jpeg, .png, .ppm, .bmp, .pgm, .tif, .tiff, .webp

Any idea what's causing it?

TobiasSunderdiek commented 1 year ago

Hi, first of all: sorry for the late reply!

I think it may be either the location of the images, or the structure within the images folder...but that is only a guess.

Do you use Google Drive and Google Colab, or do you run it on another machine than colab? Does the folder cartoons/1 contain the images?

TobiasSunderdiek commented 1 year ago

Hi, as this issue has no activity since a while, I'll close it. I hope this is okay, otherwise you're welcome to open it again! Thank you for adding this issue in general, every issue helps me to make this repo better, so thank you again! Best regards