【论文解读】Image Inpainting for Irregular Holes Using Partial Convolutions

原文地址
代码地址

Partial Convolution

从文章的标题来看, partial convolution(局部卷积)是方法核心。实际上这个思想还是很直观的:
x ′ = { W T ( X ⊙ M ) s u m ( 1 ) s u m ( M ) + b , i f   s u m ( M ) > 0 0 , o t h e r w i s e x'= \left\{ \begin{array}{ll} \bold{W}^T ( \bold{X}\odot\bold{M} )\frac{sum(\bold{1})}{sum(\bold{M})} +b,& if \ sum(\bold{M}) >0\\ 0, & otherwise \\ \end{array} \right. x={ WT(XM)sum(M)sum(1)+b,0,if sum(M)>0otherwise
在原来的卷积层的基础上,加入一个二进制的Mask M \bold{M} M,标准化之后作为该层的输出,通俗来讲就是“不想让你看的东西别看”。 M \bold{M} M的确定方式也是一个简单的One for all思路,如果对应的上一层的receptive field存在有效pixel,则归为1.
m ′ = { 1 i f   s u m ( M ) > 0 0 , o t h e r w i s e m'= \left\{ \begin{array}{ll} 1& if \ sum(\bold{M}) >0\\ 0, & otherwise \\ \end{array} \right. m={ 10,if sum(M)>0otherwise
所以,这种局部卷积的方法就是通过“蒙住”无效区域,以减少噪声,从而使该方法对不规则区域的inpainting适用。

5 个损失函数

我之前没有看过inpainting的文章,也不是数学专业,所以当看到论文的Loss Functions这一节如获至宝。

Per Pixel Loss

L h o l e = 1 N I g t ∣ ∣ ( 1 − M ) ⊙ ( I o u t − I g t ) ∣ ∣ 1 \mathcal{L}_{hole} = \frac{1}{N_{\bold{I}_{gt}}}||(\bold{1}-\bold{M})\odot(\bold{I}_{out}-\bold{I}_{gt})||_1 Lhole=NIgt1(1M)(IoutIgt)1
L v a l i d = 1 N I g t ∣ ∣ ( M ) ⊙ ( I o u t − I g t ) ∣ ∣ 1 \mathcal{L}_{valid} = \frac{1}{N_{\bold{I}_{gt}}}||(\bold{M})\odot(\bold{I}_{out}-\bold{I}_{gt})||_1

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值