pytorch-CycleGAN-and-pix2pix icon indicating copy to clipboard operation
pytorch-CycleGAN-and-pix2pix copied to clipboard

Image size

Open jwlee8746 opened this issue 4 years ago • 6 comments

Dear Jun-Yan Zhu and Taesung Park,

I'm making a new dataset using CycleGAN and I got satisfactory result.

However, the CycleGAN resizes images size to 256 when training or testing.

I want to learn the same size as original images even though original images size vary.

When testing, Is there any way for images to be outputted as original image size? e.g. original image 3EA: 1000x500, 500x300, 800x600 -> test result: 1000x500, 500x300, 800x600

jwlee8746 avatar Feb 09 '21 07:02 jwlee8746

Same question here

turian avatar Apr 04 '21 20:04 turian

Dear Jun-Yan Zhu and Taesung Park,

I'm making a new dataset using CycleGAN and I got satisfactory result.

However, the CycleGAN resizes images size to 256 when training or testing.

I want to learn the same size as original images even though original images size vary.

When testing, Is there any way for images to be outputted as original image size? e.g. original image 3EA: 1000x500, 500x300, 800x600 -> test result: 1000x500, 500x300, 800x600

set load_size to your input dimensions and fine size to your test dimensions. For example load_size = 1000. However, it is not possible to feed cyclegan rectangular images unless you modify the code yourself. You must use square inputs

WafiChoudhury avatar Jun 29 '21 18:06 WafiChoudhury

Very good question, I have the same problem and await guidance.

icelandno1 avatar Aug 30 '22 03:08 icelandno1

It's possible. Please refer to Training and Test Tips.

junyanz avatar Aug 30 '22 20:08 junyanz

@junyanz I have read “Training and Test Tips” but still have some questions on how to start training if my dataset is 1000x520, 500x310, 870x600 type of images with no pattern? And when using the model, I would like to output the original size images. The dataset is somewhat similar to this one: iphone2dslr_flower, but I didn't find an example of this, so I don't understand how to train and use the model. Any guidance would be much appreciated.

icelandno1 avatar Aug 31 '22 02:08 icelandno1

See #1468 for a detailed discussion.

junyanz avatar Sep 06 '22 20:09 junyanz