Using Fastai's GAN module to generate rectangular images

Is it possible? It seems the in_size parameter for the generator and critic require it to be square.

I’ve created custom architectures in Keras and Pytorch for rectangular image GANs, but I suppose padding rectangular images with white space to make them square is a possibility.

I’m wondering what’s the best practice for generating rectangular images with a Gan.

It’s certainly possible, but you will have to customize the models to deal with rectangular output.

@xjdeng, I’m curious about this as well. I have a set of images with consistent channels and height, but varying widths. Did you find a solution?

Not using fastai unfortunately :slight_smile:

https://medium.com/@intprogrammer/what-i-learned-about-gans-after-trying-to-build-the-worlds-first-rectangular-image-gan-6fd2a32df9ee

Wow, yikes! Okay, thanks for the quick reply. In my case I think the images can be zero-padded pretty safely, so that’s probably going to be a better/simpler solution.

Thanks again!