Como funciona o Google Deep Dream

Sep 01 2015
Será que os Andróides sonham com ovelhas elétricas? O Deep Dream do Google certamente evoca muitas imagens de animais. Mas isso é realmente IA e por que tudo parece tão estranho?
De longe, as imagens do Deep Dream parecem quase normais, mas então você percebe que todas as formas são compostas de elementos compostos estranhos.

Os milhões de computadores em nosso planeta nunca precisam dormir. Mas isso não os impede de sonhar. Enquanto nós, humanos, trabalhamos, brincamos e descansamos, nossas máquinas estão incessantemente reinterpretando dados antigos e até cuspindo todo tipo de material novo e estranho, em parte graças ao Google Deep Dream.

Deep Dream é um programa de computador que localiza e altera padrões que identifica em imagens digitais. Em seguida, ele exibe essas imagens radicalmente ajustadas para os olhos humanos verem. Os resultados variam de bobos a artísticos a pesadelos, dependendo dos dados de entrada e dos parâmetros específicos definidos pela orientação dos funcionários do Google.

Uma das melhores maneiras de entender o que é o Deep Dream é tentar você mesmo. O Google tornou públicos seus computadores sonhadores para entender melhor como o Deep Dream consegue classificar e indexar certos tipos de imagens. Você pode fazer upload de qualquer imagem que desejar para o programa do Google e, segundos depois, verá uma renderização fantástica baseada em sua fotografia.

Os resultados são tipicamente uma imagem digital híbrida bizarra que parece que Salvador Dali teve uma festa de pintura a noite toda com Hieronymus Bosch e Vincent van Gogh. Folhas, rochas e montanhas se transformam em redemoinhos coloridos, retângulos repetitivos e graciosas linhas destacadas.

Onde antes havia uma paisagem vazia, Deep Dream cria pagodes, carros, pontes e partes do corpo humano. E o Deep Dream vê animais... muitos e muitos animais. Carregue um retrato de Tom Cruise, e o programa do Google irá retrabalhar vincos e espaços como cabeças de cachorro, peixes e outras criaturas familiares. Só que estes não são animais de aparência normal – são recriações fantásticas que parecem cruzadas com um caleidoscópio tingido de LSD. Eles são assustadoramente evocativos e muitas vezes mais do que um pouco aterrorizantes.

Claramente, o Google não está lançando raves noturnas e alimentando seus computadores com substâncias químicas alucinatórias. De alguma forma, a empresa está orientando esses servidores a analisar imagens e depois regurgitá-las como novas representações do nosso mundo.

Como tudo funciona fala da natureza da maneira como construímos nossos dispositivos digitais e da maneira como essas máquinas digerem a quantidade inimaginável de dados que existe em nosso mundo obcecado por tecnologia.

Conteúdo
  1. Neurônios em bits
  2. Cérebros de computador e bicicletas
  3. Escuridão na borda

Neurônios em bits

Essas queridas fotos de férias se transformam em combustível de pesadelo quando o algoritmo do Deep Dream é aplicado.

Computadores são produtos inorgânicos, então parece improvável que eles sonhem no mesmo sentido que as pessoas sonham. No entanto, o Deep Dream é um exemplo isolado de como os programas de computador se tornam complexos quando combinados com dados do mundo humano.

Os desenvolvedores de software do Google originalmente conceberam e construíram o Deep Dream para o ImageNet Large Scale Visual Recognition Challenge , um concurso anual que começou em 2010. A cada ano, dezenas de organizações competem para encontrar as formas mais eficazes de detectar e classificar automaticamente milhões de imagens. Após cada evento, os programadores reavaliam seus métodos e trabalham para aprimorar suas técnicas.

O reconhecimento de imagem é um componente vital que está faltando em nossa caixa de ferramentas da Internet. Nossos mecanismos de pesquisa são voltados principalmente para a compreensão de palavras-chave e frases digitadas em vez de imagens. Essa é uma das razões pelas quais você precisa marcar suas coleções de imagens com palavras-chave como "gato", "casa" e "Tommy". Os computadores simplesmente lutam para identificar o conteúdo das imagens com precisão confiável. Os dados visuais são confusos, confusos e desconhecidos, o que dificulta a compreensão dos computadores.

Graças a projetos como o Deep Dream, nossas máquinas estão cada vez melhores em ver o mundo visual ao seu redor. Para fazer o Deep Dream funcionar, os programadores do Google criaram uma rede neural artificial (ANN), um tipo de sistema de computador que pode aprender por conta própria. Essas redes neurais são modeladas de acordo com a funcionalidade do cérebro humano, que usa mais de 100 bilhões de neurônios (células nervosas) que transmitem os impulsos nervosos permitindo todos os nossos processos corporais.

Em uma rede neural, os neurônios artificiais substituem os biológicos, filtrando dados de várias maneiras, repetidamente, até que o sistema chegue a algum tipo de resultado. No caso do Deep Dream, que normalmente tem entre 10 e 30 camadas de neurônios artificiais, esse resultado final é uma imagem.

Como o Deep Dream reimagina suas fotografias, convertendo-as de cenas familiares em renderizações de arte de computador que podem assombrar seus pesadelos nos próximos anos?

Cérebros de computador e bicicletas

Você pode ver que o Deep Dream tirou uma imagem de um besouro e usou seus dados sobre criaturas semelhantes para reconstruir o assunto e o plano de fundo da foto original.

As redes neurais não definem automaticamente a identificação de dados. Eles realmente exigem um pouco de treinamento – eles precisam ser alimentados com conjuntos de dados para usar como pontos de referência. Caso contrário, eles simplesmente vasculhariam os dados cegamente, incapazes de entendê-los.

According to Google's official blog, the training process is based on repetition and analysis. For example, if you want to train an ANN to identify a bicycle, you'd show it many millions of bicycles. In addition, you'd clearly specify — in computer code, of course — what a bicycle looks like, with two wheels, a seat and handlebars.

Then researchers turn the network loose to see what results it can find. There will be errors. The program might, for instance, return a series of images including motorcycles and mopeds. In those cases, programmers can tweak the code to clarify to the computer that bicycles don't include engines and exhaust systems. Then they run the program, again and again, fine-tuning the software until it returns satisfactory results.

The Deep Dream team realized that once a network can identify certain objects, it could then also recreate those objects on its own. So a network that knows bicycles on sight can then reproduce an image of bicycles without further input. The idea is that the network is generating creative new imagery thanks to its ability to classify and sort images.

Interestingly, even after sifting through millions of bicycle pictures, computers still make critical mistakes when generating their own pictures of bikes. They might include partial human hands on the handlebars or feet on the pedals. This happens because so many of the test images include people, too, and the computer eventually can't discern where the bike parts end and the people parts begin.

These kinds of mistakes happen for numerous reasons, and even software engineers don't fully understand every aspect of the neural networks they build. But by knowing how neural networks work you can begin to comprehend how these flaws occur.

The artificial neurons in the network operate in stacks. Deep Dream may use as few as 10 or as many as 30. Each layer picks up on various details of an image. The initial layers might detect basics such as the borders and edges within a picture. Another might identify specific colors and orientation. Other layers may look for specific shapes that resemble objects like a chair or light bulb. The final layers may react only to more sophisticated objects such as cars, leaves or buildings.

Google's developers call this process inceptionism in reference to this particular neural network architecture. They even posted a public gallery to show examples of Deep Dream's work.

Once the network has pinpointed various aspects of an image, any number of things can occur. With Deep Dream, Google decided to tell the network to make new images.

Darkness on the Edge

When Deep Dream creates its own images, the results are fascinating but not exactly realistic.

Google's engineers actually let Deep Dream pick which parts of an image to identify. Then they essentially tell the computers to take those aspects of the picture and emphasize them. If Deep Dream sees a dog shape in the fabric pattern on your couch, it accentuates the details of that dog.

Each layer adds more to the dog look, from the fur to the eyes to the nose. What was once harmless paisley on your couch becomes a canine figure complete with teeth and eyes. Deep Dream zooms in a bit with each iteration of its creation, adding more and more complexity to the picture. Think dog within dog within dog.

A feedback loops begins as Deep Dream over-interprets and overemphasizes every detail of a picture. A sky full of clouds morphs from an idyllic scene into one filled with space grasshoppers, psychedelic shapes and rainbow-colored cars. And dogs. There is a reason for the overabundance of dogs in Deep Dream's results. When developers selected a database to train this neural network, they picked one that included 120 dog subclasses, all expertly classified. So when Deep Dream goes off looking for details, it is simply overly likely to see puppy faces and paws everywhere it searches.

Deep Dream doesn't even need a real image to create pictures. If you feed it a blank white image or one filled with static, it will still "see" parts of the image, using those as building blocks for weirder and weirder pictures.

It's the program's attempt to reveal meaning and form from otherwise formless data. That speaks to the idea behind the entire project — trying to find better ways to identify and contextualize the content of images strewn on computers all over the globe.

So can computers ever really dream? Are they getting too smart for their own good? Or is Deep Dream just a fanciful way for us to imagine the way our technology processes data?

It's hard to know exactly what is in control of Deep Dream's output. No one is specifically guiding the software to complete preprogrammed tasks. It's taking some rather vague instructions (find details and accentuate them, over and over again) and completing the jobs without overt human guidance.

The resulting images are a representation of that work. Perhaps those representations are machine-created artwork. Maybe it's a manifestation of digital dreams, born of silicon and circuitry. And maybe it's the beginning of a kind of artificial intelligence that will make our computers less reliant on people.

You may fear the rise of sentient computers that take over the world. But for now, these kinds of projects are directly benefiting anyone who uses the Web. In the span of just a few years, image recognition has improved dramatically, helping people more quickly sift through images and graphics to find the information they need. At the current pace of advancement, you can expect major leaps in image recognition soon, in part thanks to Google's dreaming computers.

Lots More Information

Author's Note: How Google Deep Dream Works

Computers aren't making art. Not yet, anyway. And they aren't dreaming, either. Both of those processes are distinctly human and are affected profoundly by personal culture, physiology, psychology, life experiences, geography and a whole lot more. Computers may absorb a lot of data regarding those variables, but they don't experience and process them the same way as people. So if you're worried that technology is making your human experiences obsolete, don't fret just yet. Your perception of the world goes a whole lot deeper than that of a computer network.

Related Stories

  • How Image Recognition Software Works
  • How Facial Recognition Machines Work
  • What if there were no Google?
  • 5 Reasons Why You Dream

More Great Links

  • Deep Dream Generator
  • Google Research Blog: Inceptionism

Sources

  • Brownlee, John. "Why Google's Deep Dream A.I. Hallucinates in Dog Faces." FastCoDesign. July 23, 2015. (Aug. 22, 2015) http://www.fastcodesign.com/3048941/why-googles-deep-dream-ai-hallucinates-in-dog-faces
  • Bulkeley, Kelly. "Algorithms of Dreaming: Google and the 'Deep Dream' Project." Psychology Today. July 14, 2015. (Aug. 22, 2015) https://www.psychologytoday.com/blog/dreaming-in-the-digital-age/201507/algorithms-dreaming-google-and-the-deep-dream-project
  • Campbell-Dollaghan, Kelsey. "This Artist is Making Haunting Paintings with Google's Dream Robot." Gizmodo. July 9, 2015. (Aug. 22, 2015) http://gizmodo.com/this-human-artist-is-making-hauting-paintings-with-goog-1716597566
  • Chayka, Kyle. "Why Google's Deep Dream is Future Kitsch." Pacific Standard. July 10, 2015. (Aug. 22, 2015) http://www.psmag.com/nature-and-technology/googles-deep-dream-is-future-kitsch
  • Clark Estes, Adam. "Watch How Google's Artificial Brain Transforms Images in Real Time." Gizmodo. July 10, 2015. (Aug. 22, 2015) http://gizmodo.com/watch-how-googles-artificial-brain-transforms-images-in-1717058258
  • Culpan, Daniel. "These Google 'Deep Dream' Images Are Weirdly Mesmerizing." Wired. July 3, 2015. (Aug. 22, 2015) http://www.wired.co.uk/news/archive/2015-07/03/google-deep-dream
  • Gershgorn, Dave. "These Are What the Google Artificial Intelligence's Dreams Look Like." Popular Science. June 19, 2015. (Aug. 22, 2015) http://www.popsci.com/these-are-what-google-artificial-intelligences-dreams-look
  • Hern, Alex. "Yes, Androids Do Dream of Electric Sheep." The Guardian. June 18, 2015. (Aug. 22, 2015) http://www.theguardian.com/technology/2015/jun/18/google-image-recognition-neural-network-androids-dream-electric-sheep
  • Kay, Alexx. "Artificial Neural Networks." ComputerWorld. Feb. 12, 2001. (Aug. 22, 2015) http://www.computerworld.com/article/2591759/app-development/artificial-neural-networks.html
  • McCormick, Rich. "First Computers Recognized Our Faces, Now They Know What We're Doing." The Verge. July 17, 2015. (Aug. 22, 2015) http://www.theverge.com/2015/7/17/8985699/stanford-neural-networks-image-recognition-google-study
  • Melanson, Don. "Google's Deep Dream Weirdness Goes Mobile with Unofficial Dreamify App." TechTimes. Aug. 10, 2015. (Aug. 22, 2015) http://www.techtimes.com/articles/75574/20150810/googles-deep-dream-weirdness-goes-mobile-unofficial-dreamify-app.htm
  • Mordvintsev, Alexander et al. "Inceptionism: Going Deeper Into Neural Networks." Google Research Blog. June 17, 2015. (Aug. 22, 2015) http://googleresearch.blogspot.co.uk/2015/06/inceptionism-going-deeper-into-neural.html
  • Mordvintsev, Alexander and Mike Tyka. "DeepDream — A Code for Visualizing Neural Networks." Google Research Blog. July 1, 2015. (Aug. 22, 2015) http://googleresearch.blogspot.jp/2015/07/deepdream-code-example-for-visualizing.html
  • Rosenthal, Emerson. "O Sonho Profundo do Google para Leigos." Vice. 3 de agosto de 2015. (22 de agosto de 2015) http://www.vice.com/read/no-they-dream-of-puppy-slugs-0000703-v22n8
  • SUFRIN, Jon. "As imagens dos sonhos profundos do Google são impressionantes, mas são arte?" CBC. 31 de julho de 2015. (22 de agosto de 2015) http://www.cbc.ca/beta/arts/google-s-deep-dream-images-are-eye-popping-but-are-they-art- 1.3163150