当前位置:网站首页>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”外,像素注意模块被移除。
边栏推荐
- Flutter Tutorial 02 Introduction to Flutter Desktop Program Development Tutorial Run hello world (tutorial includes source code)
- Introduction to Oracle
- 智芯传感输液泵压力传感器 为精准智能控制注入科技“强心剂”
- 初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现
- How to write a high-quality digital good article recommendation
- 动态规划 01背包
- Mysql基础篇(Mysql数据类型)
- 博客系统(完整版)
- Flutter “Hello world“ 程代码
- 软件测试周刊(第82期):其实所有纠结做选择的人心里早就有了答案,咨询只是想得到内心所倾向的选择。
猜你喜欢
Message Queuing Message Storage Design (Architecture Camp Module 8 Jobs)
MySQL4
【无标题】
Make your Lottie support word wrapping in text fields
Unknown Bounded Array
【Make YOLO Great Again】YOLOv1-v7全系列大解析(Neck篇)
Which interpolation is better for opencv to zoom in and out??
【愚公系列】2022年07月 Go教学课程 025-递归函数
The bigger and bigger the project is, I split it like this
JS new fun(); class and instance JS is based on object language Can only act as a class by writing constructors
随机推荐
【kali-信息收集】枚举——DNS枚举:DNSenum、fierce
[uniCloud] Application and Improvement of Cloud Objects
TypeScript简化运行之ts-node
使用ts-node报错
How to write a high-quality digital good article recommendation
黑客到底可以厉害到什么程度?
opencv 缩小放大用哪种插值更好??
【入门教程】Rollup模块打包器整合
今日睡眠质量记录68分
让你的 Lottie 支持文字区域内自动换行
PMP 项目沟通管理
项目风险管理必备内容总结
Dart named parameter syntax
开源许可证 GPL、BSD、MIT、Mozilla、Apache和LGPL的区别
[Getting Started Tutorial] Rollup Module Packager Integration
MySQL4
win10 固定本机IP
Elastic Stack的介绍
【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
软件测试面试(三)