Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization

2019-10-10 10:50:19

Paperhttp://openaccess.thecvf.com/content_ICCV_2017/papers/Huang_Arbitrary_Style_Transfer_ICCV_2017_paper.pdf

Officical Torch Codehttps://github.com/xunhuang1995/AdaIN-style

Unofficial PyTorch Codehttps://github.com/naoto0804/pytorch-AdaIN

Unofficial PyTorch Codehttps://github.com/irasin/Pytorch_Adain_from_scratch

1. Background and Motivation:

本文提出一种快速的可以适应任何一种 style 的图像转换技术。首先先来回归一下常见的几种 Normalization 技术:

1). Batch Normalization:

给定输入的一个 batch x,BN 对每一个特征通道进行归一化操作:

其中,gamma 和 beta 是从数据中学习的仿射参数,mu 和 delta 是均值和方差,是分别沿着 batch size 和 spatial dimension 方向对每一个特征通道进行的操作:

BN 在训练的时候利用 mini-batch 统计来学习,在 inference 的阶段就用流行的统计来替换他们,这样就导致了 training 和 inference 的不一致。后续也有很多对该问题的改进。

2). Instance Normalization:

后来出现的 IN layers 可以显著的改善 style transfer 的性能,即:

与 BN layer 不同的是,此处的均值和方差是分别对 channel 和 each sample 沿着空间维度计算得到的:

另外的一个与 BN 的不同之处是:training 和 inference 是一致的。

3). Conditional Instance Normalization:

该方法对每一种 style 都学习一种参数,即:

惊奇的是,该方法可以产生完全不同 style 的图像,但是用的是同一组网络参数,仅仅是 IN layer 的 affine parameters 不同。

2. Interpreting Instance Normalization

3. Adaptive Instance Normalization

既然 IN 可以根据 affine parameters 将输入归一化为 single style,那么,有没有可能,我们给定多种自适应的 affine transformations 来生成任意给定类型的图像呢?基于该动机,作者对 IN 的技术进行了拓展,提出了 Adaptive Instance Normalization (AdaIN)。AdaIN 接收一张 content input X 和 一张 style input Y,并且简单地对 X 进行 channel wise mean and variance 使其可以匹配 Y。与 BN, IN, CIN 不同,AdaIN 没有可学习的 affine parameters。其根据输入的 style image,自适应的生成 affine parameters:

本文将 normalized content input 进行 scale 处理,然后用 \mu(y) 进行 shift。这些统计都是沿着 spatial locations 进行的。

4. Experimental Results

Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization的更多相关文章

  1. AdaptIS: Adaptive Instance Selection Network

    AdaptIS: Adaptive Instance Selection Network 2019-09-19 12:58:07 Paper: https://arxiv.org/pdf/1909.0 ...

  2. (转) Supercharging Style Transfer

      Supercharging Style Transfer Wednesday, October 26, 2016 Posted by Vincent Dumoulin*, Jonathon Shl ...

  3. Image Style Transfer:多风格 TensorFlow 实现

    ·其实这是一个选修课的present,整理一下作为一篇博客,希望对你有用.讲解风格迁移的博客蛮多的,我就不过多的赘述了.讲一点几个关键的地方吧,当然最后的代码和ppt也希望对你有用. 1.引入: 风格 ...

  4. 项目总结四:神经风格迁移项目(Art generation with Neural Style Transfer)

    1.项目介绍 神经风格转换 (NST) 是深部学习中最有趣的技术之一.它合并两个图像, 即 内容图像 C(content image) 和 样式图像S(style image), 以生成图像 G(ge ...

  5. DeepLearning.ai-Week4-Deep Learning & Art: Neural Style Transfer

    1 - Task Implement the neural style transfer algorithm Generate novel artistic images using your alg ...

  6. 课程四(Convolutional Neural Networks),第四 周(Special applications: Face recognition & Neural style transfer) —— 2.Programming assignments:Art generation with Neural Style Transfer

    Deep Learning & Art: Neural Style Transfer Welcome to the second assignment of this week. In thi ...

  7. Art: Neural Style Transfer

    Andrew Ng deeplearning courese-4:Convolutional Neural Network Convolutional Neural Networks: Step by ...

  8. Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Super-Resolution 论文笔记

    Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Super-Resolution 论文笔记 ECCV 2 ...

  9. pytorch实现style transfer

    说是实现,其实并不是我自己实现的 亮出代码:https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/n ...

随机推荐

  1. Java 面向对象—杂项(方法不能重写,修饰符,变量)

    一.哪些方法不能被重写? 1.final 修饰的不能重写 2.static 修饰的不能重写 3.private 修饰的,因为私有的在子类中不可见 4.如果跨包的话,修饰符缺省的也不能被重写,因为缺省的 ...

  2. Java语法知识点2

    1. 基本数据类型的包装类 byte   Byte short   Short int    Integer long  Long float  Float double  Double boolea ...

  3. 数据结构与算法17—B树(B、B+、B*)

    B树 B-树,就是B树,B树的原英文名是B-tree,所以很多翻译为B-树,就会很多人误以为B-树是一种树.B树是另外一种树.其实,B-tree就是B树. B-树的定义 B树(B-tree)是一种树状 ...

  4. Golang: 打印命令行参数

    记得最早在学校机房学习 Java 时,照着书上的例子,写一个最简单 main 方法,当程序运行并在屏幕上打印出 hello world 时,内心竟有种莫名的激动,相信很多人都有这种经历吧. 不管学什么 ...

  5. (十一)Kubernetes StatefulSet控制器

    StatefulSet介绍 前面使用Deployment创建的Pod是无状态的,当挂载了volume之后,如果该Pod挂了,Replication Controller会再启动一个Pod来保证可用性, ...

  6. 图论篇2——最小生成树算法(kurskal算法&prim算法)

    基本概念 树(Tree) 如果一个无向连通图中不存在回路,则这种图称为树. 生成树 (Spanning Tree) 无向连通图G的一个子图如果是一颗包含G的所有顶点的树,则该子图称为G的生成树. 生成 ...

  7. Java8新特性之forEach+Lambda 表达式遍历Map和List

    这是Java8系列的第二篇,今天来说一下Java8中forEach的简单使用.我们使用对比的方式来看应该会看得更加清楚,更能理解: 一.遍历Map ============Java8之前的方式==== ...

  8. GeoIP简介与资源,定位经纬度,获取用户IP

    所谓GeoIP,就是通过来访者的IP,定位他的经纬度,国家/地区,省市,甚至街道等位置信息.这里面的技术不算难题,关键在于有个精准的数据库.有了准确的数据源就奇货可居赚点小钱,可是发扬合作精神,集体贡 ...

  9. Go语言 - 结构体 | 方法

    自定义类型和类型别名 自定义类型 在Go语言中有一些基本的数据类型,如string.整型.浮点型.布尔等数据类型, Go语言中可以使用type关键字来定义自定义类型. 自定义类型是定义了一个全新的类型 ...

  10. The Secret Life of Types in Swift

    At first glance, Swift looked different as a language compared to Objective-C because of the modern ...