当前位置:网站首页>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”外,像素注意模块被移除。
边栏推荐
- Four implementations of
batch insert: have you really got it? - 软件测试基础理论知识—用例篇
- "ArchSummit: The cry of the times, technical people can hear"
- 【Make YOLO Great Again】YOLOv1-v7全系列大解析(Neck篇)
- Difference Between Compiled and Interpreted Languages
- 【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
- 基于STM32设计的UNO卡牌游戏(双人、多人对战)
- 一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
- 一个往年的朋友
- JS new fun(); class and instance JS is based on object language Can only act as a class by writing constructors
猜你喜欢

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.

New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment

JS new fun(); class and instance JS is based on object language Can only act as a class by writing constructors

预言机简介

The fledgling Xiao Li's 114th blog project notes: Wisdom cloud intelligent flower watering device combat (3) - basic Demo implementation

<JDBC> 批量插入 的四种实现方式:你真的get到了吗?

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

初出茅庐的小李第114篇博客项目笔记之机智云智能浇花器实战(3)-基础Demo实现

对无限debugger的一种处理方式

深圳某游戏研发公司给每个工位都装监控,网友:堪比坐牢!
随机推荐
PMP 项目质量管理
[SemiDrive source code analysis] series article link summary (full)
Character encoding and floating point calculation precision loss problem
数据比对功能调研总结
一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
When opening a MYSQL table, some can display editing, some do not, how to set.
/etc/fstab
EntityFramework saves to SQLServer decimal precision is lost
带你体验一次类型编程实践
Input输入框光标在前输入后自动跳到最后面的bug
[kali-information collection] enumeration - DNS enumeration: DNSenum, fierce
Valentine's Day Romantic 3D Photo Wall [with source code]
【入门教程】Rollup模块打包器整合
[Getting Started Tutorial] Rollup Module Packager Integration
Mysql基础篇(Mysql数据类型)
One service layer needs to call the other two service layers to obtain data and assemble it into the final data. The data is all lists. How to design the cache?
Unity在BuildIn渲染管线下实现PlanarReflection的初级方法
出现Command ‘vim‘ is available in the following places,vim: command not found等解决方法
The bigger and bigger the project is, I split it like this
使用ts-node报错