📜 ⬆️ ⬇️

How neural networks draw pictures

Smart algorithms already know how to find and recognize faces, determine the main part of the picture, recognize various objects. And neural networks have gone further and can even independently create works of art.

Recently, Google on its blog published an interesting way to use neural networks that recognize images. Further free translation of the publication.

image

')
Each neural network is trained using millions of training pictures. The network has from 10 to 30 nested layers with different levels of abstraction. First, the picture arrives at the input layer, which does its work and transfers information to the next layer, until the expected result is obtained at the output.

It is important to understand what exactly happens at every level of the system. Each subsequent layer extracts new features of the image. Suppose the first level determines the angles and edges in the picture, the second - the form, and it is the last few layers that decide what is shown in the picture.

Recognize the contrary


In order for the neural network to start drawing pictures, a random noise image is fed to its input and the task is to find a specific shape in it and exaggerate it. For example, draw a banana.

image

This is necessary in order to understand whether the neural network has learned to recognize one or another image. For example, she was taught to recognize the plug according to certain characteristics: 2-4 teeth and a handle. In this case, the shape and color of the subject should not affect the decision.

A good way to check if the network really learned to recognize an image is to ask it to draw it.

In some cases, you can identify a clear learning error. The system could not draw the right dumbbell. Most likely, when training, she saw dumbbells only bundled with a hand.

image

Bottom layers

Neural network can and do not specify the final result. If you submit any picture to the input and specify the level that will work with it, then it will improve everything that is within its competence. An example of drawing a picture with the bottom layer responsible for edges:

image

Advanced layers

If you choose a more advanced layer for interpretation, the network will try to find in the picture those images on which you trained.

At the entrance of the neural network, which was trained on pictures of animals filed the image of clouds.

image

All that the network was able to recognize, she made exaggerated. Thus, unusual animals formed in the clouds: a butterfly dog, a snail pig, a camel bird and a dog fish.

image

The same technique can be applied to any other image. The results depend on the type of image, because established properties incline the network to certain interpretations.

For example, the horizon line is replaced by pagodas and towers, the outlines of trees and rocks are buildings, and the leaves are turned into birds and insects.

image

The reverse drawing technique allows developers to evaluate the quality of recognition of a particular layer.

The developers themselves call this technique "Inceptionism" (inticeptionism). More pictures .

Iterations


At the entrance of the neural network, you can submit a slightly larger image from the output and get incredible color spaces. If we start with random noise, then the output picture can be considered solely the creation of a neural network.

image

This technique helps to understand and visualize exactly how the neural network performs the tasks of classification, how to improve the architecture and check what it has learned.

Abstract


  1. The neural network has from 10 to 30 nested layers with different levels of abstraction.
  2. In order for the neural network to start drawing pictures, a picture is supplied at its entrance and the task is to find a specific shape in it and exaggerate it.
  3. The technique of “inceptiveism” helps to understand and visualize how a neural network performs classification tasks.

Source: https://habr.com/ru/post/262267/


All Articles