generative_inpainting icon indicating copy to clipboard operation
generative_inpainting copied to clipboard

About the dimensions of inputs

Open guvcolie opened this issue 6 years ago • 7 comments

def build_inpaint_net(self, x, mask, config=None, reuse=False, training=True, padding='SAME', name='inpaint_net'):
    xin = x
    offset_flow = None
    ones_x = tf.ones_like(x)[:, :, :, 0:1]
    x = tf.concat([x, ones_x, ones_x * mask], axis=3)

I find the input contains 'ones_x',is there anything meaningful?

guvcolie avatar Aug 29 '18 09:08 guvcolie

Because the convolution automatically pad zeros as in 'SAME' mode. You can also have a look of issue #40.

JiahuiYu avatar Aug 29 '18 18:08 JiahuiYu

I am sorry to bother you. I want to ask you a question. Does the bbox2mask function generate a single-channel mask? @JiahuiYu

LeonCurry avatar Aug 17 '19 02:08 LeonCurry

@LeonCurry Yes.

JiahuiYu avatar Aug 19 '19 02:08 JiahuiYu

Thanks for your reply! @JiahuiYu

LeonCurry avatar Aug 19 '19 02:08 LeonCurry

what is yout data_list in inpatient.yml ?the example has bugger

soar200 avatar Dec 23 '19 09:12 soar200

@soar200 #15

JiahuiYu avatar Dec 23 '19 19:12 JiahuiYu

Hello @soar200 and @JiahuiYu

Thanks for the informative thread. I had some specific doubts regarding the input which is fed to the network. I know ALMOST similar questions have been asked on this topic but, unfortunately, I could not get a full picture about the exact nature of the inputs which are fed to the network.

For example, if we consider: tf.concat([x, ones_x, ones_x*mask], axis=3). My doubts are:

  1. I understand (x) is the INCOMPLETE normalized image in [-1, 1]. Do you make the masked pixels = 0 in (x) or you make masked pixels = 1 in (x)

  2. Why do we need to input the (ones_x) tensor ? It is simply an all-white input? Is it explicitly used anywhere for inpainting purpose?

  3. Is the (mask) tensor = 0 on masked pixels or is it = 1 on masked pixels ?

Thanks, Avisek

avisekiit avatar Jan 28 '20 08:01 avisekiit