lucidrains / magvit2-pytorch

Implementation of MagViT2 Tokenizer in Pytorch
MIT License
565 stars 34 forks source link

Is there any requirement on the training images? #19

Open wd255 opened 11 months ago

wd255 commented 11 months ago

Hi, thanks for the great job!

When I try it out, I used a subfolder of imagenet (/ILSVRC/Data/CLS-LOC/train/n02096437) which contains a lot of images as dataset_folder, but I got the error: 0 training samples found at /ILSVRC/Data/CLS-LOC/train/n02096437

I double checked the folder, it has a lot of images.

I wonder if there's any requirement?

lucidrains commented 11 months ago

hello! hmm that's weird, could you check what extensions the images are?

wd255 commented 11 months ago

Hi @lucidrains thanks for the timely response. I checked the code and found it's because the extension of the image files in my imagnet dataset was "JPEG" instead of "jpeg". This is the official magnet dataset so I assume others have the same issue, so I added https://github.com/lucidrains/magvit2-pytorch/pull/20

lucidrains commented 11 months ago

@wd255 put in a quick hack, let me know that works!