lyndonzheng / Pluralistic-Inpainting

[CVPR 2019]: Pluralistic Image Completion
676 stars 145 forks source link

object removing in video as delogo #27

Closed chen849157649 closed 4 years ago

chen849157649 commented 5 years ago

thank you share your project, The inpaint results are different every time as the same image. How can I get the same result? because i want to remove object in video. thank you very much

lyndonzheng commented 5 years ago

@chen849157649 Our main goal in this project is to provide multipy results for the user to select the best one. If you just want to remove object in video, you can follow this project video inpainting. I discussed the project with the authors. It's an interesting work.

chen849157649 commented 5 years ago

@chen849157649 Our main goal in this project is to provide multipy results for the user to select the best one. If you just want to remove object in video, you can follow this project video inpainting. I discussed the project with the authors. It's an interesting work.

@lyndonzheng thank you,

chen849157649 commented 5 years ago

@lyndonzheng , i changed this part code, q_distribution = torch.distributions.Normal(distribution[-1][0], distribution[-1][1]) scale_mask = task.scale_img(self.mask, size=[f[2].size(2), f[2].size(3)])

    # decoder process
    img_list=[]
    for i in range(self.opt.nsampling):
        # z = q_distribution.sample()
        z = distribution[-1][0]
        self.img_g, attn = self.net_G(z, f_m=f[-1], f_e=f[2], mask=scale_mask.chunk(3, dim=1)[0])

as the above, basically it can meet my requirements, the result of removal is also good, Thanks again, I am going to learn the project you recommend.

lyndonzheng commented 5 years ago

@chen849157649 This can get a fixed output for each given maksed image. But it's not our main purpose, and we do not train the free-form mask for the natural images. If you try to use our model for this object removal, maybe you can train the model again, and reduce the weight of kl loss to get fixed output.