Skip to main content

Pix2pix to draw online people



As you know, progress does not stand still. Science moves forward by leaps and bounds. Judging by the changes that have occurred in the world of technology over the past 50 years, we can confidently say that in this respect, exponential growth is clearly observed. It is even possible that the technological singularity, the onset of which was again actively discussed in 2012 by reputable scientists at the Summit devoted to this topic, soon will not seem just a hypothesis. By the way, even now we are witnessing the development trends of intelligent computer systems, expressed in the gradual complication of neural networks, which are the basis of AI (artificial intelligence), in expanding the range of tasks performed by them. But let's move on to a specific example.

Not so long ago, American programmers pleased users with another successful project in the field of AI - an image processor called Pix2pix, which allows you to convert drawing sketches you create into realistic images, that is, to draw people online. The neural network system was placed on a special server and framed with an unobtrusive and user-friendly interface. Therefore, each user can take advantage of their capabilities online. Learn more about how Pix2pix works and how to use this service.


Форма редактирования Pix2pix и конечный результат
As you can see, my awkward drawing Pix2pix could make as realistic as possible.

The content of the article:

How Pix2pix Works

The basis of the work of the photo processing application of people's faces is the so-called GAN system (generative-contention networks), which uses the loss function, designed to estimate losses when the true image parameters differ from the predicted AI structure of pixels. In the process of learning, the machine tries to minimize the loss function with each attempt to guess the broadcast image. This algorithm allows each time to more accurately and accurately guess the content of the object provided by the user. In a simpler language, the functioning of generative-adversary networks can be roughly compared with the adoption of a bill in the Russian Federation, where the law, after its legal adjustment, is passed to the State Duma for reading. Further, if approved by the parliamentary majority, it goes to the Federation Council, where it is once again considered and then signed or rejected by the president. Same here:

The Pix2pix Photo Editor Generator receives an image at the input (input image) - it is the main factor, guided by which, the generator must give the most accurate interpretation of the object to the output;

Here the discriminator comes into play , to which the input image and the image constructed by the generator are passed. The discriminator, using the loss function, which was mentioned above, determines the deviation between the picture received from the user and the image interpreted by the generator. To put it simply, the discriminator decides whether the generated object can be called authentic or not. In the process, a simultaneous training of the generator to the minimization of the loss function occurs.



Thus, the well-coordinated work of the neural networks presented above helps Pix2pix to self-learn and gradually generate the closest to true images relative to those broadcast by users.

схема работы генеративно-состязательной сети
This figure shows a diagram of the work of generative-competitive networks (GAN)

How to draw people with Pix2pix

To use this service you need:

  1. Go to the official website Pix2pix at the link - https://affinelayer.com/pixsrv/ ;
  2. On the page you can watch four modes of building images, each of which is equipped with the following tools:
    • Tool - the “line” tab is located here, which is responsible for drawing the contours of the object and the eraser, that is, the eraser;
    • Under the image editing form is the undo key of the last action “Undo”, the button for clearing the image “Clear”, as well as the interesting tab “Random”, which allows you to generate a random picture;

    Панель инструментов сервиса Pix2pix
    The Pix2pix toolbar is almost identical for all drawing modes. In these two windows are the most necessary actions with images.
  3. Now, in order to give the program a task to make the picture drawn by you realistic, click on “Process”, after which we can see the finished result.

    Кнопка "Process" сервиса Pix2pix
    The “Process” button is designed to convert our sketch into a realistic image. Click on it to use this feature.
  4. To save the final image on the PC, click on the "Save" button.

    Вкладка "Save", предназначенная для сохранения изображения на компьютер.
    Here is the “Save” button, by clicking on which we will be able to save the resulting drawing to your PC

A curious find: the online drawing form Pix2pix is ​​implemented using the HTML5 canvas element. And the open source code of neural networks data says that we can easily insert any image into this form using the drawImage () method and see what the AI ​​will give us at the output. A more detailed description of how to insert a picture into a Canvas can be found in the HTML5 directories.



Conclusion

I would not like the sad ending of this article, but I have to report one unpleasant news regarding Pix2pix. July 3, 2017, the developers reported that they are forced to stop the functioning of the mode of drawing people. The reason was his huge popularity, as a result of which over 2 million unique visitors came to the Pix2pix service. As a result, the server was so loaded that it simply did not have enough resources to cope with such an influx of users. You can read more about this on the official page of drawing people online at Pix2pix - https://dekennisvannu.nl/site/artikel/Fotogenerator-The-End/9232.



How do you rate the article?
Звёзд: 1Звёзд: 2Звёзд: 3Звёзд: 4Звёзд: 5 ( 7 ratings, average: 2.29 out of 5)
Loading...

” 3 Comments “ Pix2pix draw online people

Add a comment

Your email will not be published.