run-youngjoo/SC-FEGAN

512x512 issue

Opened this issue · 3 comments

does all the images has to be 512 by 512 pixels for it to work? if so what software I should use to reshape a 4k face into 512 by 512? and maybe Train code + update the code so that it accept all resolution instead of stretching it out.

You can simply use OpenCV or Pillow for resizing your image. it's not possible for a model to work on any shape. You'll have to pre process your inputs to match the input shape. One other way is to give the input shape as (None, None, channels) but then you'll have to make sure that the model architecture doesn't break on some input shape.

say if I were to haave a 1024 by 1024 image ... will the generator work with image that is being downscaled down to 512 by 512?

@claudetheboof the input has to be 512 x 512 x 9 for this model. Yes, downscaled images will work, just make sure you adjust the other input features accordingly, like the mask. Or better downscale the image first and then do the masking.