Google Inceptionism:按类别获取图像 [英] Google Inceptionism: obtain images by class

查看:71
本文介绍了Google Inceptionism:按类别获取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在著名的Google Inceptionism文章中, http://googleresearch.blogspot.jp/2015/06 /inceptionism-going-deeper-into-neural.html 它们显示了每个类别(例如香蕉或蚂蚁)获得的图像.我想对其他数据集执行相同的操作.

In the famous Google Inceptionism article, http://googleresearch.blogspot.jp/2015/06/inceptionism-going-deeper-into-neural.html they show images obtained for each class, such as banana or ant. I want to do the same for other datasets.

这篇文章确实描述了它是如何获得的,但是我认为解释是不够的.

The article does describe how it was obtained, but I feel that the explanation is insufficient.

有一个相关的代码 https://github.com/google/deepdream/blob/master/dream.ipynb

但是它的作用是产生一个随机的梦幻图像,而不是指定一个类并学习其在网络中的外观,如上一篇文章所示.

but what it does is to produce a random dreamy image, rather than specifying a class and learn what it looks like in the network, as shown in the article above.

任何人都可以给出更具体的概述,或者有关如何为特定类生成图像的代码/教程吗? (最好是假设使用caffe框架)

Could anyone give a more concrete overview, or code/tutorial on how to generate images for specific class? (preferably assuming caffe framework)

推荐答案

我认为这段代码是复制Google团队发布的图像的良好起点.该过程看起来很清楚:

I think this code is a good starting point to reproduce the images Google team published. The procedure looks clear:

  1. 从纯噪声图像和一个类(例如猫")开始
  2. 执行前向传递并反向传播带有强加的类标签的错误
  3. 使用在数据层计算的梯度更新初始图像

涉及一些技巧,可以在原始论文中找到.

There are some tricks involved, that can be found in the original paper.

似乎主要区别在于Google员工试图获得更逼真的"图像:

It seems that the main difference is that Google folks tried to get a more "realistic" image:

就其本身而言,这不是很好,但是如果我们施加一个先验约束,那就是图像应该具有与自然图像相似的统计数据,例如需要关联的相邻像素,那么它就可以了.

By itself, that doesn’t work very well, but it does if we impose a prior constraint that the image should have similar statistics to natural images, such as neighboring pixels needing to be correlated.

这篇关于Google Inceptionism:按类别获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆