pixel rnn/cnn for generative image...

12
Pixel RNN/CNN for Generative Image Model 白辰甲 模式识别研究中心 2018-5-17

Upload: others

Post on 21-Jul-2020

37 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Pixel RNN/CNN for Generative Image Model

白辰甲

模式识别研究中心 2018-5-17

Page 2: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Outline

1. Problem Statement & Related work

2. Approach: Spatial LSTM, PixelRNN / PixelCNN[1] Generative image modeling using spatial LSTMs. NIPS. 2015[2] Pixel recurrent neural networks. ICML. 2016 [3] Conditional image generation with pixelcnn decoders. NIPS. 2016[4] PixelCNN++: Improving the pixelcnn with discretized logistic mixture

likelihood and other modifications. ICLR. 2017.

3. Use in Reinforcement Learning[1] Count-based exploration with neural density models. ICML. 2017

Page 3: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Problem Statement

1. 图像 X 的概率

2.无监督、自回归模型

1) 条件概率模型

2) 循环神经网络

3.提供了显式的概率模型,用于图像概率计算、图像生成

4.其他图像生成的方法还包括VAE,GAN等,但无法提供显式概率分布

Page 4: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Spatial LSTM

1.时序 LSTM

2.空间 LSTM

Page 5: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Pixel RNN/CNN

1.空间的 2 维 LSTM 网络规模庞大,需要简化成 1 维

2. Row LSTM

● 按行进行条件依赖,像素的上下文表示为一个三角形区域

● Input-to-state: 进行按行的 k*1 掩码卷积,对每行

编码,并掩盖不应出现的上下文

● State-to-state:

Page 6: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Pixel RNN/CNN

3. PixelCNN

● 用 CNN 近似代替 RNN 结构,极大的提升速度

● 输入:预测像素的上下文,使用掩码卷积掩盖不应出现的区域

● 输出:像素值的离散预测

● 缺点:感受野受限

Page 7: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Pixel RNN/CNN

CIFAR-10 ImageNet

Page 8: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Conditional PixelCNN Decoder

1. 动机:基于特定图像、向量或文本产生图像

2.将PixelCNN的激活函数进行改造,引入Gated Convolution

3. 消除 PixelCNN 感受野中的盲点区域

1) 多层mask卷积导致盲点

2) 将原卷积核拆分为2个层叠卷积 ,

分别条件依赖于本行左侧像素和上部像素

4. 概率条件依赖于特定向量 h

Page 9: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Conditional PixelCNN Decoder

5. 卷积核修改

● h代表的图像信息与位置无关(what, not where)

● h可以为图像类别(one-hot),训练时 h 与对应类别的图像作为输入

Page 10: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Use in Reinforcement Learning

1. 强化学习

2. 探索与利用

●利用:按照已经获得的经验,选择最大化奖励的动作

●探索:根据一定的策略探索其非最优动作

Page 11: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

Use in Reinforcement Learning

3. Count-based Exploration

● 对状态的访问次数进行虚拟计数

● 状态计数越高,表示在历史中对该状态的访问

越频繁,该状态具有较低的探索价值

● Predition Gain:

其中 用于衡量图像概率,使用Pixel RNN/CNN建模

● 根据PG,可以计算虚拟计数和虚拟奖励,用于鼓励探索

Page 12: Pixel RNN/CNN for Generative Image Modelpr-ai.hit.edu.cn/_upload/article/files/df/3a/bbe2530444669b9bed4ea... · Approach: Spatial LSTM, PixelRNN / PixelCNN [1] Generative image modeling

结 束

白辰甲

模式识别研究中心