score_sde_pytorch icon indicating copy to clipboard operation
score_sde_pytorch copied to clipboard

Question for inpaint

Open TLi347 opened this issue 4 years ago • 3 comments

Hi Yang Song,

In 30 row, section "Inpaint", Score SDE demo PyTorch.ipynb,

should it be changed to x = pc_inpainter(score_model, scaler(img*mask), mask) so that it wouldn't inference img from img?

Please correct me if I misunderstand this part.

TLi347 avatar Sep 16 '21 04:09 TLi347

It shouldn't affect the results. In pc_inpainter we use masks to make sure the network does not have access to extra knowledge.

yang-song avatar Sep 28 '21 04:09 yang-song

I find the img input is used in inpainting.Althougth the img input add noise,I think the img input can't be used in this place,the input img can't exist really. mask_data = masked_data_mean +torch.randn_like(x)*std[:,None,None,None]] .the mask_data_mean is equal to data(the img input) please correct me if my thoughts is error. sincerely

phaigx avatar Jan 10 '22 16:01 phaigx

I find the img input is used in inpainting.Althougth the img input add noise,I think the img input can't be used in this place,the input img can't exist really. mask_data = masked_data_mean +torch.randn_like(x)*std[:,None,None,None]] .the mask_data_mean is equal to data(the img input) please correct me if my thoughts is error. sincerely

The next line of code masks out the information in mask_data. As a result the inpainting algorithm does not know the ground truth.

yang-song avatar Jan 15 '22 23:01 yang-song