jingyuanli001 / RFR-Inpainting

The source code for CVPR 2020 accepted paper "Recurrent Feature Reasoning for Image Inpainting"
MIT License
355 stars 76 forks source link

About RFRNet code #4

Closed yabg-shuai666 closed 4 years ago

yabg-shuai666 commented 4 years ago

for i in range(6): x2, m2 = self.Pconv21(x2, m2) x2, m2 = self.Pconv22(x2, m2) x2 = F.leaky_relu(self.bn2(x2), inplace = True) x2 = self.RFRModule(x2, m2[:,0:1,:,:]) x2 = x2 m2 About RFRNet code , I wonder why the result x2 after self.RFRModule needs to be carried out x2 = x2 m2。This will obscure the newly generated pixels。Looking forward to your reply,thank you.

jingyuanli001 commented 4 years ago

Thanks for your question. This part is an intentional design in RFRNet. The basic idea behind the RFRNet is that when there are a large number of missing pixels, the contents in the known region is not informative for recovering the pixels in the hole center. As a consequence, in the earlier iterations during inpainting, we drop the synthesized pixels in the hole center and recover these pixels in later iterations when there are more known pixels. In x2 = x2 * m2, the m2 is an updated mask whose hole region is smaller than that from the previous m2. This way, we can progressively inpaint the missing regions from their boundaries to the centers.

yabg-shuai666 commented 4 years ago

Thanks for your reply, I understand. Thank you again for your outstanding work.

------------------ 原始邮件 ------------------ 发件人: "jingyuanli001/RFR-Inpainting" <notifications@github.com>; 发送时间: 2020年7月21日(星期二) 上午9:37 收件人: "jingyuanli001/RFR-Inpainting"<RFR-Inpainting@noreply.github.com>; 抄送: "杨帅"<326605441@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [jingyuanli001/RFR-Inpainting] About RFRNet code (#4)

Thanks for your question. This part is an intentional design in RFRNet. The basic idea behind the RFRNet is that when there are a large number of missing pixels, the contents in the known region is not informative for recovering the pixels in the hole center. As a consequence, in the earlier iterations during inpainting, we drop the synthesized pixels in the hole center and recover these pixels in later iterations when there are more known pixels. In x2 = x2 * m2, the m2 is an updated mask whose hole region is smaller than that from the previous m2. This way, we can progressively inpaint the missing regions from their boundaries to the centers.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.