当前位置:网站首页>Progressive Reconstruction of Visual Structure for Image Inpainting 论文笔记
Progressive Reconstruction of Visual Structure for Image Inpainting 论文笔记
2022-08-01 04:03:00 【Magic__Conch】
会议与时间 IEEE Conference Proceedings international conference on computer vision Jan 2019 CCF-A
文章目录
- 主要贡献/创新点
- 模型搭建
- 模型主要结构
- Visual Structure Reconstruction Layer
- Visual Structure Generator
- 1. 先使用局部卷积获得更新的feature map X p c 1 X_{pc1} Xpc1和其对应的mask M p c 1 M_{pc1} Mpc1
- 2. X p c 1 X_{pc1} Xpc1输入到bottleneck residual block和一个单通道输出卷积核中产生结构图 E c o n v E_{conv} Econv。
- 3. 新生成的 M p c 1 M_{pc1} Mpc1和 M i n E d g e M_{in}^{Edge} MinEdge做减法,再和 E c o n v E_conv Econv做逐元素乘积,获得新生成的Edge map。
- 4. 原始的 E i n E_in Ein和 E p a r t E_{part} Epart相加,得到迭代后的 E E G E_{EG} EEG。
- 5. 该步输出的结果是 E E G E_{EG} EEG和 M p c 1 M_{pc1} Mpc1。
- VSR层的整体结构
- 除了VSR,上采样层中还使用了结合了部分卷积和转置卷积的部分反卷积层。
- 判别器
- 分析与结论
主要贡献/创新点
在partial convolution地基础上作改进,通过逐步地交错地生成edge map和inpainting image,共享参数以提升两者地效果。
过去方法存在的问题
- 利用对抗损失评估生成的结构,将每个结构图视为一个整体,很难恢复到合格的局部结构。
- 局部卷积等方法缺乏结构性的知识,限制恢复了连续的masked区域。
结构structure就是edge、前景等“中间介质”。
创新点
- 提出PRVS(Progressive Reconstruction of Visual Structure)网络,逐步重建结构和相关的视觉特征。
- 设计了一种新的Visual Structure Reconstruction(VSR)层,将重建的视觉结构(visual structure)和视觉特征(visual feature)纠缠在一起,通过共享参数提高彼此的性能。
- 分析了所提出方法的泛化能力,给出了 O ( 1 N ) O(\frac{1}{\sqrt N}) O(N1)的泛化界。
模型搭建
模型主要结构

也是生成器+判别器结构
- 生成器由使用了VSR层的P-UNet结构组成。
- 判别器由预训练的权重固定的VGG-16和由5层卷积层构成的Patch Discriminator组成。
Visual Structure Reconstruction Layer
VSR层由结构生成器(Visual Structure Generator)和特征生成器组成。
- 先使用结构生成器更新input edge,收缩确实区域的大小。
- 然后使用更新的edge map引导新feature的生成。
Visual Structure Generator

1. 先使用局部卷积获得更新的feature map X p c 1 X_{pc1} Xpc1和其对应的mask M p c 1 M_{pc1} Mpc1
X p c 1 , M p c 1 = P c o n v ( < X i n , E i n > , < M i n I m g , M i n E d g e > ) X_{pc1},M_{pc1} = Pconv(<X_{in},E_{in}>,<M_{in}^{Img},M_{in}^{Edge}>) Xpc1,Mpc1=Pconv(<Xin,Ein>,<MinImg,MinEdge>)
Pconv是局部卷积操作,<>是concatenate, X i n X_{in} Xin是image feature,3通道, E i n E_{in} Ein
是structure map,单通道,M分别代表它们的mask。
X p c 1 X_{pc1} Xpc1和 M p c 1 M_{pc1} Mpc1分别是更新后的feature map和它的mask。
2. X p c 1 X_{pc1} Xpc1输入到bottleneck residual block和一个单通道输出卷积核中产生结构图 E c o n v E_{conv} Econv。
3. 新生成的 M p c 1 M_{pc1} Mpc1和 M i n E d g e M_{in}^{Edge} MinEdge做减法,再和 E c o n v E_conv Econv做逐元素乘积,获得新生成的Edge map。
4. 原始的 E i n E_in Ein和 E p a r t E_{part} Epart相加,得到迭代后的 E E G E_{EG} EEG。
5. 该步输出的结果是 E E G E_{EG} EEG和 M p c 1 M_{pc1} Mpc1。
VSR层的整体结构
VSR层的主要目的是将结构信息整合到重构的特征映射中。
获得迭代的边缘图和其mask,按照下面的公式更新特征图及对应的mask X o u t X_{out} Xout和 M p c 2 M_{pc2} Mpc2。保证了edge map和feature map的同步更新。
X o u t , M p c 2 = M p c 1 ⊙ ( Pconv ( * X i n , E E G * , * M i n , M p c 1 * ) ) \mathbf{X}_{o u t}, \mathbf{M}_{p c 2}=\mathbf{M}_{p c 1} \odot\left(\operatorname{Pconv}\left(\left\langle\mathbf{X}_{i n}, \mathbf{E}_{E G}\right\rangle,\left\langle\mathbf{M}_{i n}, \mathbf{M}_{p c 1}\right\rangle\right)\right) Xout,Mpc2=Mpc1⊙(Pconv(*Xin,EEG*,*Min,Mpc1*))
除了VSR,上采样层中还使用了结合了部分卷积和转置卷积的部分反卷积层。
本文通过使用局部卷积层使得mask在不同通道中的大小保持一致,然后转置卷积进行上采样特征映射,解决之前P-Unet跳接引起的难以使用反卷积的问题。
左边是P-Unet中原始的上采样层,右边是本文的,本文在局部卷积层后面加入了反卷积层。 Nearest up-sampling用于在PRVS网络解码器阶段放大mask。

判别器
1. Patch-GAN:structure generation learning
用于学习结构,也就是本文的Edge map。
2. pre-trained and fixed VGG-16 network: image generation learning
使用来自预训练的值固定的VGG-16的 perceptual loss and style loss.(VGG-16仅仅是特征提取器而已)
- perceptual loss:
L preceptual = ∑ i = 1 N 1 H i W i C i ∣ ϕ pool i g t − ϕ pool i pred ∣ 1 L_{\text {preceptual }}=\sum_{i=1}^{N} \frac{1}{H_{i} W_{i} C_{i}}\left|\phi_{\text {pool }_{i}}^{g t}-\phi_{\text {pool }_{i}}^{\text {pred }}\right|_{1} Lpreceptual =i=1∑NHiWiCi1∣∣ϕpool igt−ϕpool ipred ∣∣1
ϕ p o o l i \phi_{pool_i} ϕpooli表示固定VGG-16中一i个池化层的特征映射。
- style loss:
ϕ pool i s t y l e = ϕ pool i ϕ pool i T \phi_{\text {pool }_{i}}^{s t y l e}=\phi_{\text {pool }_{i}} \phi_{\text {pool }_{i}}^{T} ϕpool istyle=ϕpool iϕpool iT
L style = ∑ i = 1 N 1 C i ∗ C i ∣ 1 H i W i C i ( ϕ pool i style g t − ϕ pool i style pred ) ∣ 1 L_{\text {style }}=\sum_{i=1}^{N} \frac{1}{C_{i} * C_{i}} \mid\left.\frac{1}{H_{i} W_{i} C_{i}}\left(\phi_{\text {pool }_{i}}^{\text {style }_{g t}}-\phi_{\text {pool }_{i}}^{\text {style }} \text { pred }\right)\right|_{1} Lstyle =i=1∑NCi∗Ci1∣HiWiCi1(ϕpool istyle gt−ϕpool istyle pred )∣∣1 - L v a l i d L_{valid} Lvalid和 L h o l e L_{hole} Lhole分别是unmasked area和masked area的L1 distance.
- total loss:
L total = λ hole L hole + λ valid L valid + λ tv L tv + λ style L style + λ perceptual L perceptual + λ adv ( L adv 1 + L adv 2 ) \begin{aligned} L_{\text {total }} &=\lambda_{\text {hole }} L_{\text {hole }}+\lambda_{\text {valid }} L_{\text {valid }}+\lambda_{\text {tv }} L_{\text {tv }}+\lambda_{\text {style }} L_{\text {style }} \\ &+\lambda_{\text {perceptual }} L_{\text {perceptual }}+\lambda_{\text {adv }}\left(L_{\text {adv }}^{1}+L_{\text {adv }}^{2}\right) \end{aligned} Ltotal =λhole Lhole +λvalid Lvalid +λtv Ltv +λstyle Lstyle +λperceptual Lperceptual +λadv (Ladv 1+Ladv 2)
分析与结论
泛化能力分析
- 泛化界表明,泛化能力与判别器的复杂度呈负相关,泛化界为 O ( 1 N ) O(\frac{1}{\sqrt N}) O(N1)。
log N ( F ∣ S , ε , ∥ ⋅ ∥ 2 ) ≤ log ( 2 W 2 ) ∥ X ∥ 2 2 ε 2 ( ρ ∏ i = 1 5 s i ) 2 ( ∑ i = 1 5 b i 2 / 3 s i 2 / 3 ) 3 \begin{aligned} & \log \mathcal{N}\left(\left.\mathcal{F}\right|_{S}, \varepsilon,\|\cdot\|_{2}\right) \\ \leq & \frac{\log \left(2 W^{2}\right)\|X\|_{2}^{2}}{\varepsilon^{2}}\left(\rho \prod_{i=1}^{5} s_{i}\right)^{2}\left(\sum_{i=1}^{5} \frac{b_{i}^{2 / 3}}{s_{i}^{2 / 3}}\right)^{3} \end{aligned} ≤logN(F∣S,ε,∥⋅∥2)ε2log(2W2)∥X∥22(ρi=1∏5si)2(i=1∑5si2/3bi2/3)3 - 权重矩阵的谱规范之间存在负相关关系,这就需要对谱规范进行归一化来控制谱规范。
与其他方法对比
比P-UNet和Edge-Connect定性和定量上都要好。

消融实验

- Baseline是原始的P-Unet。
- PD是在第一个的基础上,用partial deconvolution layer替代 nearest up-sampling。
- 第三个是引入了VSR层。
- 除“Full”外,像素注意模块被移除。
边栏推荐
- 一个往年的朋友
- HCIP(14)
- The fledgling Xiao Li's 114th blog project notes: Wisdom cloud intelligent flower watering device combat (3) - basic Demo implementation
- lambda
- 出现Command ‘vim‘ is available in the following places,vim: command not found等解决方法
- 【愚公系列】2022年07月 Go教学课程 025-递归函数
- EntityFramework saves to SQLServer decimal precision is lost
- 【消息通知】用公众号模板消息怎么样?
- "ArchSummit: The cry of the times, technical people can hear"
- [Message Notification] How about using the official account template message?
猜你喜欢

How to download the Keil package
![[Search topic] After reading the inevitable BFS solution to the shortest path problem](/img/f8/fbe906106dc8f7f7a6bd54d2dc3bc1.png)
[Search topic] After reading the inevitable BFS solution to the shortest path problem

对无限debugger的一种处理方式

每周小结(*67):为什么不敢发表观点

Simulation of Active anti-islanding-AFD Active Anti-islanding Model Based on Simulink

Four implementations of
batch insert: have you really got it? ![[Message Notification] How about using the official account template message?](/img/4d/5b47722d1f5ec1cae73fc8d930a35d.jpg)
[Message Notification] How about using the official account template message?

The 16th day of the special assault version of the sword offer

最新 955 不加班的公司名单

情人节浪漫3D照片墙【附源码】
随机推荐
Make your Lottie support word wrapping in text fields
Introduction to Oracle
Mysql基础篇(Mysql数据类型)
Write a method to flatten an array and deduplicate and sort it incrementally
故乡的素描画
今日睡眠质量记录68分
[kali-information collection] enumeration - DNS enumeration: DNSenum, fierce
MySQL modifies SQL statements to optimize performance
Visual Studio提供的 Command Prompt 到底有啥用
简单易用的任务队列-beanstalkd
How to download the Keil package
测试
【SemiDrive源码分析】系列文章链接汇总(全)
Software Testing Weekly (Issue 82): In fact, all those who are entangled in making choices already have the answer in their hearts, and consultation is just to get the choice that they prefer.
移动端页面秒开优化总结
leetcode6132. Make all elements in an array equal to zero (simple, weekly)
Mysql基础篇(约束)
软件测试面试(三)
MySQL修改SQL语句优化性能
JS new fun(); class and instance JS is based on object language Can only act as a class by writing constructors