f90 / FactorGAN

FactorGAN - Training GANs with missing data
MIT License
35 stars 3 forks source link

From #1: Can I use a rectangular image without resizing? #2

Open f90 opened 4 years ago

f90 commented 4 years ago

Taken from issue #1 - @kalai2033 asks: Can I use a rectangular image without resizing? My i/p image size is 600*400.

f90 commented 4 years ago

Yes, you can use rectangular images for the image2image application, if you use the Unet model that I provided as default "generator" architecture. I think you need to make sure however that the number of pixels is divisible by 2 roughly 4 or 5 times since the Unet will try to downsample the image features by a factor of 2 in each layer/level. But otherwise it does not have requirements on the input dimensions.

If you need more flexibility, you can plug in a custom image2image model yourself, or modify the provided Unet a bit, this should be easy to do due to the modular nature of the codebase.

kalai2033 commented 4 years ago

I tried unet as feature extractor. The results were very bad. Is it possible to use resnet as feature extractor? I tried modifying it to resnet but i ran into issues. can you help me sort it out?

f90 commented 4 years ago

What do you mean with feature extractor? We have one image-to-image model, which is the generator in the GAN framework, plus a few discriminators.

kalai2033 commented 4 years ago

Sorry forget about feature extractor. I mean can you help me with modifying the unet to resnet architecture. Cause i have to train rectangular images. I tried adding the resnet model. But i was not successful. Can you please help me with it?

f90 commented 4 years ago

Hey, you can import an existing resnet architecture model definition into our framework, just make sure that the input and output is correctly structured. How did you not succeed at adding the resnet model, what is the problem exactly?