17 Temmuz 2015 Cuma

We Worked Out How To Generate The Trippiest Images With Google's Deepdream

Last month Google published "Inceptionism", an article about their latest experimentation with a computer program that attempts to detect and re-create patterns in images using similar techniques to the human brain.

In the same way our brain identifies shapes and forms in clouds in the sky, Google's artificial neural network has been trained to recognise common features such as doors, dogs, and bicycles. The result is a new image, enhanced with information from what the network thinks it has seen.

Each layer of the program deals with features at a different level of abstraction. As the article explains, the first layer looks for information such as edges, surfaces, and orientation. Intermediate layers interpret the basic features to look for overall shapes or components, and the final layers recognise high-level features like the human body, creating complete interpretations.

Google went on to open-source the code under the name "deepdream", and the internet went on an acid trip, producing a myriad of beautiful, sometimes unsettling, and always strangely compelling images, GIFs, and videos.

Keen developers and web services quickly put up portals to allow people to explore deepdream themselves; however, it is an intensive process and many services were quickly overwhelmed. We wanted to get a thorough insight in to what deepdream was capable of, so Paul, a BuzzFeed developer, set it up the hard way.

Here are some examples of peoples' #deepdream creations on Twitter:

NASA / Reuters

First, we wanted to get a feel for how deepdream responded to a variety of different images, using the default filter - "inception_4c/output". This would guide us on which kind of image could be made more beautiful, which induced the most vivid and abstract "dreams", and if any simply did nothing at all.

China Daily / Reuters / BuzzFeed

Now that we had a good idea as to how deepdream responded to varying levels of detail, we went on to run a single image though all 54 filters available to us. This would tell us which filters produced the most interesting results.

The variety of different interpretations the network produced was stunning. Combining our knowledge of likely effective images and 13 filters that produce interesting results, we ran a selection of images through deepdream at high resolution. Our machine took a 48-hour processing nap; here are the dreams it had:

inception_3b/output

inception_3b/output

David Gray / Reuters / BuzzFeed

This is our final selection of images, each run through our favourite four filters.

inception_5a/pool_proj

inception_5a/pool_proj

Denis Balibouse / Reuters / BuzzFeed

Jan Hetfleisch / Getty Images / BuzzFeed

Stoyan Nenov / Reuters

Stoyan Nenov / Reuters / BuzzFeed

Here is a photo by Denis Balibouse of solar-powered lights along the Hoernli ridge on the Matterhorn in Zermatt, Switzerland.

Here is a photo by Denis Balibouse of solar-powered lights along the Hoernli ridge on the Matterhorn in Zermatt, Switzerland.

Denis Balibouse / Reuters

youtube.com

Stoyan Nenov / Reuters

Stoyan Nenov / Reuters / BuzzFeed

NASA / Reuters / BuzzFeed

Maja Hitij / Getty

Maja Hitij / Getty Images / BuzzFeed

inception_4d/pool

inception_4d/pool

David Gray / Reuters / BuzzFeed

Charles Platiau / Reuters

Here is a photo by David Gray of a turtle digging for food among coral in Lady Elliot Island's lagoon in Australia.

Here is a photo by David Gray of a turtle digging for food among coral in Lady Elliot Island's lagoon in Australia.

David Gray / Reuters

This is it run through filter conv2/3x3.

This is it run through filter conv2/3x3.

conv2/3×3

David Gray / Reuters / BuzzFeed

Here is a photo by Ali Al Qarni of Muslims praying at the Grand Mosque in the holy city of Mecca during Ramadan.

Here is a photo by Ali Al Qarni of Muslims praying at the Grand Mosque in the holy city of Mecca during Ramadan.

Ali Al Qarni / Reuters

This is it run through filter conv2/3x3.

This is it run through filter conv2/3x3.

Ali Al Qarni / Reuters / BuzzFeed

inception_3b/output

inception_3b/output

Ali Al Qarni / Reuters / BuzzFeed

inception_4b/pool

inception_4b/pool

Ali Al Qarni / Reuters / BuzzFeed

Here is a photo by Beawiharta of ash rising during an eruption from Mount Sinabung volcano in Indonesia.

Here is a photo by Beawiharta of ash rising during an eruption from Mount Sinabung volcano in Indonesia.

Beawiharta / Reuters

This is it run through filter inception_3a/3x3.

This is it run through filter inception_3a/3x3.

Beawiharta / Reuters / BuzzFeed

inception_3b/output

inception_3b/output

Beawiharta / Reuters / BuzzFeed

inception_4b/pool

inception_4b/pool

Beawiharta / Reuters / BuzzFeed

inception_5a/pool_proj

inception_5a/pool_proj

Beawiharta / Reuters / BuzzFeed

Here is a photo by Warren Little of Pandelela Rinong of Malaysia diving during the semifinal at the diving world series in Dubai, United Arab Emirates.

Here is a photo by Warren Little of Pandelela Rinong of Malaysia diving during the semifinal at the diving world series in Dubai, United Arab Emirates.

Warren Little / Getty

This is it run through filter inception_3a/pool.

This is it run through filter inception_3a/pool.

Warren Little / Getty / BuzzFeed

inception_5a/pool_proj

inception_5a/pool_proj

Warren Little / Getty / BuzzFeed

This is it run through filter conv2/3x3.

This is it run through filter conv2/3x3.

Denis Balibouse / Reuters / BuzzFeed

inception_3b/output

pool3/3x3_s2

pool3/3x3_s2

Denis Balibouse / Reuters / BuzzFeed

inception_4b/pool

inception_4b/pool

Denis Balibouse / Reuters / BuzzFeed

Here's how we did it:

You'll need to be comfortable on the Linux or OS X command line to set this up. We configured deepdream using image-dreamer, then modified the Vagrantfile to let it use all the CPU and RAM the machine was able to give, as we found the size of our input images drastically affected the processing power required.

The shell scripts we used to see which images "dreamed" most effectively (one filter, many images), and which filters in the set were the most interesting (one image, many filters), were very useful. You're welcome to use them as you wish.

This user on Imgur provides a useful reference to the available filters if you'd like to save time!

You can visit the full gallery Google introduced deepdream to the world with here.

NASA / Reuters / BuzzFeed




from BuzzFeed - Tech http://ift.tt/1SrMrBL
via IFTTT

Hiç yorum yok: