junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
23.09k stars 6.32k forks source link

Training High Resolution + Rectangular images #1464

Closed ankur-chr closed 2 years ago

ankur-chr commented 2 years ago

Hi,

I intend to training images which are both rectangular and high resolution. Which training flags should be used in this case? I checked the training/test tips link. However, it mentions either high-resolution or rectangular, which seems not possible to combine.

icelandno1 commented 2 years ago

@cankur007 I have the same problem, I don't know if it's solved, can you teach me?

junyanz commented 2 years ago

It's possible to synthesize high-res, rectangular images. Both --preprocess scale_width_and_crop and --preprocess crop could work. If all of your images share the same image size, you can just use the 2nd option --preprocess crop'. If images come at different sizes (some are 1600x900, some are 360x256), you may want to use --preprocess scale_width_and_crop` to force them to be at the same scale.