Drawing with GoogLeNet

Drawing with GoogLeNet

In my previous post, I showed how you can use deep neural networks to generate image examples of the classes it’s been trained to classify. Since we’ve already started using deep neural networks in ways they were never intended to be used, let’s abuse them some more.

There’s nothing constraining us to generate image examples of one class at a time. Let’s see what happens if we try to generate two class visualizations close to each other, such as for instance a gorilla and a french horn

Gorilla playing an odd-looking french horn

Well, it kind of looks like a gorilla playing the french horn. Or let’s try dressing up a gibbon via “mixing” the gibbon class with some of the clothing classes:

A gibbon in a poncho (left) and an ET-looking gibbon in a labcoat (right)

Or what about making some scenic nature drawings, such as some foxes underneath an erupting volcano:

Foxes beneath an erupting volcano

Or a ballpoint pen drawing a castle:

A vague ballpoint pen drawing a castle

These mixes of classes kind of work out, though it should be noted that these are the best selections from a number of mixes I tried. It’s also tempting to create mixes of animal classes to generate some new kind of monster breeds, but most of the time this doesn’t work so well. Here’s some I tried though, a mix of a scotch terrier and a tarantula, and a mix of a bee and a gibbon:

A slightly spidery looking scotch terrier (left) and a slightly gibbon-looking bee (right)

Another fun thing we can do when generatinge images is to do the gradient ascent randomly along paths instead of on a single point. This of course takes a bit longer time, but it allows us to “draw” with the output, such as for instance drawing a mountain range of alps:

or a line of jellyfish:

or a circle of junco birds:

If we try to fill a larger region with visualizations of a class, we can also apply clipping masks, i.e. forcing the pixels to zero in some pattern during gradient ascent. So we can for instance use letters as clipping masks and try to create the alphabet with animals:

An A of apesA B of bearsAnd a C of cobras

Alright, that’s enough abuse of our deep neural network for today. I’ve just scratched the surface here, but there are several fun ways to use deep neural networks for creative visual work with a bit of experimentation (and lots of patience). I’m going to put the ipython notebooks I used to make these examples in the deepdraw repository as soon as I’ve cleaned up the code, so stay tuned via twitter.

时间: 2024-11-11 00:28:20

Drawing with GoogLeNet的相关文章

debian The type initializer for 'System.Drawing.KnownColors' threw an exception

Change the "System.Drawing" reference of "CoreCompat.System.Drawing"if you throw The type initializer for 'System.Drawing.KnownColors' threw an exception to do:apt-get install libgdiplus debian The type initializer for 'System.Drawing.

使用System.Drawing.Imaging.dll进行图片的合并

在最近开发项目的时候有时候需要进行图片的合并,即将两张图片合并成功一张图片 合并图片的代码: 1 #region 两张图片的合并 2 3 /// <summary > 4 /// 将Image对象转化成二进制流 5 /// </summary > 6 /// <param name="image" > </param > 7 /// <returns > </returns > 8 public byte[] Im

html5 canvas simple drawing

var c = canvas.getContext("2d");//get canvas 2d context canvas including a proposed 3D context; c.fillStyle("#ffffff");//rawing canvas background color c.fillRectangle(sx,sy,ex,ey);//drawing a rectanle ,the (sx,sy) is start point,(ex,e

SGU - 135 - Drawing Lines (简单数学!)

SGU - 135 Drawing Lines Time Limit: 250MS   Memory Limit: 4096KB   64bit IO Format: %I64d & %I64u Submit Status Description Little Johnny likes to draw a lot. A few days ago he painted lots of straight lines on his sheet of paper. Then he counted in

OpenCV Tutorials &mdash;&mdash; Basic Drawing

Point It represents a 2D point, specified by its image coordinates and . We can define it as: Point pt;pt.x = 10;pt.y = 8; or Point pt = Point(10, 8); Scalar Represents a 4-element vector. The type Scalar is widely used in OpenCV for passing pixel va

iOS Drawing Concepts[iOS 绘画概念]

iOS Drawing Concepts https://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html High-quality graphics are an important part of your app’s user interface. Providin

高质量的基于向量条形码产生机制 WPF Drawing API条形码控件

Barcode Professional for WPF条形码控件是一款轻量级的 .NET 程序集,为你的WPF程序生成高质量的基于矢量的条码,支持大多数流行的一维和二维条形码:Code 39, Code 128, GS1-128, GS1 DataBar (RSS-14),  EAN 13 & UPC, Postal (USPS, British Royal Mail, Australia Post, DHL, etc.), Data Matrix, QR Code, PDF 417, UPS

Painting and Drawing[MSDN/Windows GDI]

https://msdn.microsoft.com/en-us/library/dd162759(v=vs.85).aspx Painting and Drawing This overview describes how the system manages output to the screen and explains what applications must do to draw in a window. In particular, this overview describe

类库探源——System.Drawing.Bitmap

一.System.Drawing.Bitmap Bitmap 类: 封装GDI+ 位图,此位图由图形图像及其属性的像素数据组成.Bitmap 是用于处理由像素定义的图像的对象 命名空间: System.Drawing 程序集:   System.Drawing.dll 继承关系: 原型定义: [SerializableAttribute] [ComVisibleAttribute(true)] public sealed class Bitmap : Image 备注:GDI+ 支持下列文件格式