robgon-art/MachineRay

Error: Input images must have the same width and height

Closed this issue · 4 comments

Hello,
I and trying to train a new model, but it always give:
Error: Input images must have the same width and height

Is any way to solve this, with change my image dataset?

  • I generate cropped folder images
  • Then generate resized folder image
  • Then create painting_info.txt file

Hi khalidoz,

This is a limitation of StyleGAN2 from NVIDIA, "The images must be square-shaped and they must all have the same power-of-two dimensions." From https://github.com/NVlabs/stylegan2#preparing-datasets

What size images are you working with?

Original image and resized (1024x1024) image in the same folder "resized".
Is this the issue?

Yes, the original images and the resized images should be in different folders.

Also, check out my article on GANscapes and the associated repo. If you are using Google Colab it might be easier to start with that project. https://towardsdatascience.com/ganscapes-using-ai-to-create-new-impressionist-paintings-d6af1cf94c56

Thank you so much.