caffe+GAN︱PPGN生成模型5则官方案例(caffe版)
一、效果与架构
PPGN 整合了对抗训练、cnn特征匹配、降噪自编码、Langevin采样;在NIPS2016得到了Ian Goodfellow的介绍.
PPGN生成的图像同类差异化大,可根据指定生成不同类别的图像、多类化,生成的图像清楚分辨率高。
PPGN可使用imagenet1000类分类网络生成特定类别的图像。
效果:
架构图:
详细解读:zdx3578(微信公众号)
二、案例
所需环境:caffe/python/GPU可以加速
确保你是在./caffe/python下运行settings.py
Install ImageMagick command-line interface on your system.
1、案例一:1_class_conditional_sampling.sh
1_class_conditional_sampling.sh: Sampling conditioning on the class “junco” (output unit #13 of the CaffeNet DNNtrained on ImageNet dataset). This script produces a sampling chain for a single given class.
Running ./1_class_conditional_sampling.sh 13 produces this result:
2、2_class_conditional_sampling_many.sh
Running ./2_class_conditional_sampling_many.sh <epsilon1> with different epsilon1 (multiplier for the image prior component) produces a chain with different styles of samples:
3、3_hidden_conditional_sampling.sh
Instead of conditioning on a class, it is possible to condition on a hidden neuron i.e. performing Multifaceted Feature Visualization or synthesizing a set of inputs that highly activate a given neuron to understand what features it has learned to detect.
Running ./3_hidden_conditional_sampling.sh 196 produces a set of images for a conv5 neuron #196 previously identified as a "face detector" in DeepVis toolbox:
4、4_hidden_conditional_sampling_placesCNN.sh
One can repeat the example above but with an arbitrary neuron in a different condition network. Here, we visualize the conv5 neuron #182 in the AlexNet DNN trained on MIT Places205 dataset. This neuron has been previously identified as a “food detector” in Zhou et al [2].
Running ./4_hidden_conditional_sampling_placesCNN.sh 182 produces this result:
5、5_caption_conditional_sampling.sh
We can also replace the image classifier network in previous examples with a pre-trained image captioning network to form a text-to-image model without even re-training anything. The image captioning model in this example is the LRCN model in Donahue et al (2015) [1].
You would need to use the Caffe provided here and update the path to Caffe accordingly in settings.py
The list of words supported are here
Running ./5_caption_conditional_sampling.sh a_church_steeple_that_has_a_clock_on_it produces this result:
caffe+GAN︱PPGN生成模型5则官方案例(caffe版)的更多相关文章
- tflearn kears GAN官方demo代码——本质上GAN是先训练判别模型让你能够识别噪声,然后生成模型基于噪声生成数据,目标是让判别模型出错。GAN的过程就是训练这个生成模型参数!!!
GAN:通过 将 样本 特征 化 以后, 告诉 模型 哪些 样本 是 黑 哪些 是 白, 模型 通过 训练 后, 理解 了 黑白 样本 的 区别, 再输入 测试 样本 时, 模型 就可以 根据 以往 ...
- TensorRT加速 ——NVIDIA终端AI芯片加速用,可以直接利用caffe或TensorFlow生成的模型来predict(inference)
官网:https://developer.nvidia.com/tensorrt 作用:NVIDIA TensorRT™ is a high-performance deep learning inf ...
- GAN︱生成模型学习笔记(运行机制、NLP结合难点、应用案例、相关Paper)
我对GAN"生成对抗网络"(Generative Adversarial Networks)的看法: 前几天在公开课听了新加坡国立大学[机器学习与视觉实验室]负责人冯佳时博士在[硬 ...
- caffe︱cifar-10数据集quick模型的官方案例
准备拿几个caffe官方案例用来练习,就看到了caffe中的官方案例有cifar-10数据集.于是练习了一下,在CPU情况下构建quick模型.主要参考博客:liumaolincycle的博客 配置: ...
- GAN实战笔记——第二章自编码器生成模型入门
自编码器生成模型入门 之所以讲解本章内容,原因有三. 生成模型对大多数人来说是一个全新的领域.大多数人一开始接触到的往往都是机器学习中的分类任务--也许因为它们更为直观:而生成模型试图生成看起来很逼真 ...
- 深度|OpenAI 首批研究成果聚焦无监督学习,生成模型如何高效的理解世界(附论文)
本文经机器之心(微信公众号:almosthuman2014)授权转载,禁止二次转载,原文. 选自 Open AI 作者:ANDREJ KARPATHY, PIETER ABBEEL, GREG BRO ...
- ICML 2018 | 从强化学习到生成模型:40篇值得一读的论文
https://blog.csdn.net/y80gDg1/article/details/81463731 感谢阅读腾讯AI Lab微信号第34篇文章.当地时间 7 月 10-15 日,第 35 届 ...
- caffe-windows环境配置(github上官方BVLC/caffe的推荐配置方法详解)
[转载来的文章:如有侵权,请联系我!我将马上删除!] 首先声明一下,如标题,本教程是caffe在windows系统上的配置方法,而且是github上官方BVLC/caffe目前推荐的配置方法,并不是使 ...
- 【机器学习PAI实战】—— 玩转人工智能之利用GAN自动生成二次元头像
前言 深度学习作为人工智能的重要手段,迎来了爆发,在NLP.CV.物联网.无人机等多个领域都发挥了非常重要的作用.最近几年,各种深度学习算法层出不穷, Generative Adverarial Ne ...
随机推荐
- FBReader阅读引擎支持的功能
"三十年河东,三十年河西"是一句民间谚语,它的来源是:从前黄河河道不固定,经常会改道(历史上无数次发生).某个地方原来在河的东面,若干年后,因黄河水流改道,这个地方会变为在河的西面 ...
- 使用hexo搭建个人博客
安装前提 node.js git 如果缺少以上条件,则前往相应的官网下载安装即可.. 安装hexo $ npm install hexo-cli -g 待安装完成后,执行相关命令查看hexo的信息. ...
- javascript 中 dom.getAttribute("value") 与dom.value的差异
dom 是一个 input type="text" 手动修改 input 的值, 使用 dom.getAttribute("value") 只能得到 html ...
- vue打包后不使用服务器直接访问方法
根据官网打包执行npm run build 后dist文件夹打开的index.html 是空白 需要开启http服务器才能访问,以下是解决办法 1.找到config文件夹下的index文件 修改成 2 ...
- springboot(二十):使用spring-boot-admin对spring-boot服务进行监控
上一篇文章<springboot(十九):使用Spring Boot Actuator监控应用>介绍了Spring Boot Actuator的使用,Spring Boot Actuato ...
- JetBrains Pycharm 破解+汉化
准备材料: 1.JetBrains Pycharm 传送门: https://pan.baidu.com/s/1qZCpIR6 密码: rvrn 2.JetbrainsCrack-2.6.2. ...
- 吴恩达深度学习笔记(deeplearning.ai)之卷积神经网络(一)
Padding 在卷积操作中,过滤器(又称核)的大小通常为奇数,如3x3,5x5.这样的好处有两点: 在特征图(二维卷积)中就会存在一个中心像素点.有一个中心像素点会十分方便,便于指出过滤器的位置. ...
- FTP工具
上传本地资源到FTP服务器,可以使用LeapFTP软件.左侧为本地资源,右侧为FTP资源.输入用户名,密码,连接后直接拖动即可. 为本地资源建立FTP,可以方便进行设备升级.文件传输等.
- CF585E. Present for Vitalik the Philatelist [容斥原理 !]
CF585E. Present for Vitalik the Philatelist 题意:\(n \le 5*10^5\) 数列 \(2 \le a_i \le 10^7\),对于每个数\(a\) ...
- 二维码开源库ZBar-吐槽篇
前不久在网上看到一篇文章<QR-Decoder-OV5640 二维码识别> ,是某开发板的教程.记得对应的开发板以前购买过,当初只是为了看OV5640的JPG的输出效果,结果由于公司奇葩的 ...