Generating images of different sizes

I have a problem while generating images of different sizes from GANs.
I have input images of different varying shapes extremely like (220, 3500) or (2100,230) or different. If i reshape or modified it will be waste.

I want to get images given latent random distribution which generates a varying sizes of different images randomly.

How can i do that ?
Please post your ideas.

You could try to use Conditional GANs and treat the “shape” as a class information. You would have to define certain shape classes, but this might be OK instead of reshaping all input images to the same resulution.
Also, the class label could be used to flip the transposed convolutions (swap height and width of the kernels), so that you could use the same model to create the mentioned outputs.
I think using the functional API might be easier in that case than modules.

1 Like

Thank you. I will work on this project, if problem occur i will ask . :slight_smile: