SinGAN icon indicating copy to clipboard operation
SinGAN copied to clipboard

size error in Harmonization mode, discrepancy btw noise and input image shapes

Open nikjetchev opened this issue 5 years ago • 4 comments

Dear all

I am trying to use the harmonization example. I specified images as required.

However, I get an error in SinGAN_generate(), the shapes do not match on the code line

z_in = noise_amp(z_curr)+I_prev*

I wonder, should the harmonization image I insert have exactly the same size as the training image? Or is there a way to make it work with any size image for harmonization, the model architecture seems flexible enough. But I am a bit confused by the overall code structure and where these tensor size changes should be refactored exactly

nikjetchev avatar Nov 01 '19 10:11 nikjetchev

Sir,I also want to use the harmonization. But the first problem is that i do know how to get naively pasted images and its mask. How do you realize it? @nikjetchev

xuxiangsun avatar Nov 03 '19 03:11 xuxiangsun

In the current version of the code, the harmonized image should have the same size of the original image.

z_curr is the current noise input sample. in order to work with arbitrary image harmonization size you should change it size according to the image size of each scale of the model.

tamarott avatar Nov 05 '19 16:11 tamarott

In the current version of the code, the harmonized image should have the same size of the original image.

z_curr is the current noise input sample. in order to work with arbitrary image harmonization size you should change it size according to the image size of each scale of the model.

Dear madam,Can you share with me the method you use to get naively pasted images and its mask?I don't know how to realize it. Please……

xuxiangsun avatar Nov 06 '19 01:11 xuxiangsun

you can create the naively pasted version and the mask manually, using photoshop/paint.net or similar programs

tamarott avatar Nov 07 '19 08:11 tamarott