run-youngjoo / SC-FEGAN

SC-FEGAN : Face Editing Generative Adversarial Network with User's Sketch and Color (ICCV2019)
Other
3.35k stars 532 forks source link

512x512 issue #32

Open claudetheboof opened 5 years ago

claudetheboof commented 5 years ago

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.

abtExp commented 5 years ago

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.

claudetheboof commented 5 years ago

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?

abtExp commented 5 years ago

@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.