美文网首页
图像修复 "structural inpainting" ten

图像修复 "structural inpainting" ten

作者: JzCh | 来源:发表于2019-01-19 10:43 被阅读0次

    概述

    structural inpainting,作者在context encoder[2]的基础上进行改进,在网络中加入了feature reconstruction lossfeature reconstruction lossMSE loss的线性组合构成了structural loss,以此来提升修复区域中结构信息的修复效果。

    • 😛😜😝代码托管在github

    网络结构与损失函数

    structural inpainting使用到了3种损失,feature reconstruction lossMSE lossadversarial loss,其中MSE lossadversarial loss的使用来源于context encoder。在训练过程中,context encoder与鉴别网络构成了对抗关系,context encoder用来对缺失信息的图像进行修复,而鉴别网络用来对图像进行分类,判断图像是context encoder修复出来的图像,还是ground truth。而对于feature reconstruction loss,则需要使用到VGG16提取图像的特征来计算。

    网络结构

    如图1所示,整个网络结构由三部分组成,context encoder,鉴别网络与VGG16,其中context encoder和鉴别网络是需要训练的部分,而VGG16在训练过程其权重值不变,使用VGG16来提取图像的特征,以计算feature reconstruction loss。图中,X是待修复图像,ycontext encoder的输出,包含了修复信息,\hat{X}ground truth\hat{X}_Cground truth对应的鉴别网络输入,D_{W'}是鉴别网络。

    X经过context encoder修复之后,得到yground truth\hat{X}截取中心部分的信息之后得到\hat{X}_Cy\hat{X}_C作为鉴别网络输入,让鉴别网络进行分类,计算得到adversarial lossy\hat{X}_C进入VGG16分别提取特征,计算两张图像特征之间的差别,得到feature reconstruction loss

    图1 网络结构 来源:[1]论文
    feature reconstruction loss

    feature reconstruction loss的思想来源于论文[3]提出的perceptual lossperceptual lossfeature lossstyle loss组成,其中的一个要点就是使用VGG16来提取生成图像与ground truth的特征,比较两张图像在特征之间的差别,以此来指导网络权重的迭代调整。而之前,比较生成图像与ground truth之间的差别,多数情况下使用的是MSE loss,就是比较图像像素级别的差距。

    [1]作者认为adversarial loss的使用,有利于修复缺失区域的纹理,但是对于修复区域的结构信息贡献较小,所以在网络训练中加入了feature reconstruction loss,想要以此提升网络对图像结构的修复质量,并将MSE lossfeature reconstruction loss的线性组合成为了structural loss

    feature reconstruction loss的加入有提升网络对于结构信息的修复质量,这一点可以从图2中看出,图2对比了patch-basedcontext encoder与加了feature reconstruction losscontext encoder,可以看到,最右边一排的图像对比context encoder,在图像结构方面的修复质量更好。

    图2 来源:[1]论文
    使用VGG16提取哪些特征

    如图3所示,对比了在VGG16中不同的网络层中计算图像的特征之间的差距对于最终修复效果的影响,发现使用MSE lossVGG16conv1_1conv2_1conv3_1的组合的效果最好,即需要对比两张图像在像素级别的差距,再使用VGG16提取它们在conv1_1conv2_1conv3_1层的特征并计算feature reconstruction loss

    图3 来源:[1]论文

    参考文献

    [1]. Vo H V, Duong N Q K, Perez P. Structural inpainting[J]. arXiv preprint arXiv:1803.10348, 2018.
    [2]. Pathak D, Krahenbuhl P, Donahue J, et al. Context encoders: Feature learning by inpainting[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2016: 2536-2544.
    [3]. Johnson J, Alahi A, Fei-Fei L. Perceptual losses for real-time style transfer and super-resolution[C]//European Conference on Computer Vision. Springer, Cham, 2016: 694-711.

    相关文章

      网友评论

          本文标题:图像修复 "structural inpainting" ten

          本文链接:https://www.haomeiwen.com/subject/dgnndqtx.html