NVlabs / stylegan2-ada-pytorch

StyleGAN2-ADA - Official PyTorch implementation
https://arxiv.org/abs/2006.06676
Other
4k stars 1.15k forks source link

AssertionError : list(image.shape) == self.image_shape #270

Open ku60 opened 1 year ago

ku60 commented 1 year ago

I intended to train network. I prepared training data with png format and pass the folder path. first time, it went well, but after I added new images, program says "AssertionError" in training/dataset.py, line88 in __getitem__ : assert list(image.shape) == self.image_shape But the shape of images I passed are all the same (128,128), I checked and the first data is the same size. Anyone helps me ?

rakhon9 commented 1 month ago

Hello, for training the model on your custom dataset, the images should have the following format: Resolution: power of 2 (1024x1024, 512x512, 256x256, 128x128 .....) Format: .png image.channel==3, which means only RGB images are supported. Please remove any grayscale(channel=1) or RGBA(channel=4) images from your dataset or convert them into RGB format. I hope this will solve your problem...