2023 Author: Bryan Walter | [email protected]. Last modified: 2023-05-21 22:24
Queen - I want to break free
Developer David Garcia has created a neural network that turns male faces into female faces, and vice versa. He talks about this in a post published on the Github site.
The programmer used deep convolutional generative adversarial networks. This architecture combines elements of two types of neural networks - convolutional and generative adversarial. Convolutional neural networks are a class of neural networks that do a good job of recognizing images, sounds, and other similar tasks (we wrote about this in more detail). The generative adversarial model, in turn, consists of two systems - generative and discriminating, which are "at war" with each other. The principle of its operation is quite simple: the "generator" tries to deceive the discriminating component, creating such samples (in this case, images) that its "rival" will not be able to distinguish from some real, reference samples. The result is a kind of competition between the two systems: one learns to make high-quality "fakes", and the other - to find them, which allows you to achieve a good end result.
A picture with a resolution of 80 × 100 pixels is fed to the input of the neural network. The program processes it so that it looks like some target image: for example, if the user has uploaded a photo of a man's face, the neural network will give him feminine features. For training, the programmer used a small database, from which he selected photographs of the faces of only attractive people. Garia justified this selection by the fact that “there are few ways to be attractive and many ways to be ugly,” implying that the algorithm will converge faster with a small database.
An example of turning a female face into a masculine, and vice versa
As a result, the developer managed to turn male faces into female ones, and vice versa, while retaining the facial features of the people in the original images.
A similar, but much simpler function was presented by the FaceApp application a few days ago. Artificial intelligence analyzes photos of users' faces, and then puts a mask on them. So, in the application, you can make yourself older, younger, man, woman, more attractive, as well as add a smile.