Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
2019-10-10 10:50:19
Officical Torch Code: https://github.com/xunhuang1995/AdaIN-style
Unofficial PyTorch Code: https://github.com/naoto0804/pytorch-AdaIN
Unofficial PyTorch Code: https://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的更多相关文章
- AdaptIS: Adaptive Instance Selection Network
AdaptIS: Adaptive Instance Selection Network 2019-09-19 12:58:07 Paper: https://arxiv.org/pdf/1909.0 ...
- (转) Supercharging Style Transfer
Supercharging Style Transfer Wednesday, October 26, 2016 Posted by Vincent Dumoulin*, Jonathon Shl ...
- Image Style Transfer:多风格 TensorFlow 实现
·其实这是一个选修课的present,整理一下作为一篇博客,希望对你有用.讲解风格迁移的博客蛮多的,我就不过多的赘述了.讲一点几个关键的地方吧,当然最后的代码和ppt也希望对你有用. 1.引入: 风格 ...
- 项目总结四:神经风格迁移项目(Art generation with Neural Style Transfer)
1.项目介绍 神经风格转换 (NST) 是深部学习中最有趣的技术之一.它合并两个图像, 即 内容图像 C(content image) 和 样式图像S(style image), 以生成图像 G(ge ...
- DeepLearning.ai-Week4-Deep Learning & Art: Neural Style Transfer
1 - Task Implement the neural style transfer algorithm Generate novel artistic images using your alg ...
- 课程四(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 ...
- Art: Neural Style Transfer
Andrew Ng deeplearning courese-4:Convolutional Neural Network Convolutional Neural Networks: Step by ...
- 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 ...
- pytorch实现style transfer
说是实现,其实并不是我自己实现的 亮出代码:https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/n ...
随机推荐
- 解决Ubuntu18.10 网络图标经常消失连不上网问题
我不知道是什么原因,Ubuntu虚拟机经常会出现无法上网的问题? 此时右上角没有网络标志,Settings->NetWork也只有VPN一项,不知道咋用. 在网上终于找到了方法,亲测有效:htt ...
- Android 系统自带图片裁剪功能(适配7.0、8.0、对了还有小米手机)
前段时间写了如何获取相册和拍照之后的照片并且进行显示和上传,这一次是如何进行圆形图像制作,经常看我写的笔记的人会知道,我很懒.那么我就懒的自定义了,目前需求就用原生的就好了,大神的轮子,我会在后面进行 ...
- Android常用五种布局
1. FrameLayout(框架布局) 这个布局可以看成是墙脚堆东西,有一个四方的矩形的左上角墙脚,我们放了第一个东西,要再放一个,那就在放在原来放的位置的上面,这样依次的放,会盖住原来的东西.这个 ...
- Android P(9.0) userdebug版本执行adb remount失败
[DESCRIPTION] 在android P版本上如果按照“FAQ18076 android 6.0 M userdebug版本执行adb remount失败”的做法在userdebug ...
- 8 smali文件格式
Apktool反编译apk后程序中每一个类都会有一个smali文件. 一.当前类信息:smali文件的头三行描述了当前类的一些信息. Eg: .class <访问权限> [修饰关键字]&l ...
- CDA数据分析实务【第一章:营销决策分析概述】
一.营销概述 营销是关于企业如何发现.创造和交付价值以满足一定目标市场的需求,同时获取利润的学科.营销学用来辨识未被满足的需求,定义,度量目标市场的规模和利润潜力,找到最合适企业进入的细分市场和适合该 ...
- jsp 获取后端配置文件.properties的某个配置内容
如后端有个叫做config.properties的配置文件: sys.img=st_sp jsp中引用的方式是: <%@ page language="java" impor ...
- Linux chage命令详解
原文 chage命令用于密码实效管理,该是用来修改帐号和密码的有效期限,接下来通过本文给大家介绍Linux chage命令相关知识,本文介绍的非常详细,具有参考借鉴价值,感兴趣的朋友一起学习吧 lin ...
- prometheus学习系列十一: Prometheus exporter详解
exporter详解 前面的系列中,我们在主机上面安装了node_exporter程序,该程序对外暴露一个用于获取当前监控样本数据的http的访问地址, 这个的一个程序成为exporter,Expor ...
- redis实现消息队列-java代码实现
转:https://blog.csdn.net/qq_42175986/article/details/88576849 pom.xml <!-- redis依赖 --> <depe ...