FactorGAN icon indicating copy to clipboard operation
FactorGAN copied to clipboard

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

Open f90 opened this issue 5 years ago • 5 comments

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

f90 avatar Apr 09 '20 15:04 f90

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.

f90 avatar Apr 09 '20 16:04 f90

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?

kalai2033 avatar Apr 21 '20 17:04 kalai2033

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.

f90 avatar Apr 23 '20 14:04 f90

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?

kalai2033 avatar Apr 23 '20 15:04 kalai2033

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?

f90 avatar Apr 30 '20 10:04 f90