Face Beauty Recognition

    “My light, a mirror! tell
    Yes, tell the whole truth:
    Am I the dearest in the world,
    All blush and whiter? ”

    A.S. Pushkin

    Magic things from fairy tales are gradually realized in real reality through the use of new technologies and scientific discoveries. Such devices as carpet-plane (aviation), boots-walkers (cars), an apple on a silver platter (netbook with Internet), a glomerulus that shows the road (GPS-navigator) and other necessary things have already been implemented and are actively used. We tried to implement the system for assessing the beauty of a person’s face using the methods of artificial intelligence and machine vision, mentioned in the “Tale of the Dead Princess and the Seven Knights”, since we believe that the author of the epigraph actually meant a tablet with a front camera and special software installed.

    The question of what exactly makes a person's face attractive is a topic of research for a long time by physiologists, biologists, philosophers, art historians, and plastic surgery specialists. Currently, it is considered established that people, in addition to individual preferences, are affected by general biologically-motivated principles of beauty assessment [1-2]. Among possible candidates for typical signs, physiologists highlight the symmetry of facial features [3], the difference between facial images and the average images of faces of a large number of people [4], the correspondence of facial proportions to the “golden section” [5], etc. For example, in [4] it was shown that, on the one hand, symmetrical facial features correspond to genes less susceptible to mutations and therefore people with such facial features are more resistant to mutations and diseases,

    In recent years, several pioneering works on computer systems for recognizing beauty based on the use of machine vision systems [6–8] and trained classifiers have appeared. These works can be seen as an attempt to give the robotic systems the ability to "see the beautiful." In [6], the proportions of facial features are used as signs, with the key points on the face being manually selected. In [7], in addition to proportions, the principal component method was used to isolate features. In [8], deep neural networks were used for the task of recognizing beauty .

    We have developed an automatic beauty assessment system that works on the basis of the method of highlighting key points on the face using OpenCV machine vision library tools anda neural network trained in a target task based on expert estimates and conducted an experimental assessment of the quality of its work.

    Database of images for training

    We have compiled our own database of images, consisting of 180 photographs of the faces of young women, the images were taken from open sources. Photographs of faces in a frontal projection with a neutral facial expression, without glasses and jewelry were selected. To give representativeness to the sample, we tried to include examples of both beautiful and ugly faces in the database (Fig. 1).

    Fig. 1. An example of a photo of persons from the image database

    Unlike the work [7], the collected base includes photographs of women of different races, skin colors, and their age ranges from 18 to 35 years. After the images were collected, the expert group was asked to set subjective aesthetic attractiveness ratings for each of the photographs on a scale of 1 to 7. In total, 8 experts, 4 men and 4 women aged 16 to 63, were involved in marking the photos. ratings were set independently. According to the conditions of the experiment, before the start of the grading process, each expert was presented with all the photographs for initial familiarization. To check the consistency of the sample, a correlation analysis was carried out, its results are presented in table. 1.

    Table 1. Pairwise correlations of estimates of various experts

    The average correlation of the sample turned out to be at the level of 0.7, which makes it possible to train the neural network on such data and approximately corresponds to the results of other researchers [4.7].

    The general scheme of the algorithm

    The beauty recognition system receives at the input an image containing a frontal photo of a person’s face (Fig. 2).

    Fig. 2. Scheme of the face recognition recognition algorithm

    Before starting the algorithm, we assume that the face in the image has already been selected and occupies most of the image area. Then, using the standard Viola-Jones classifier of boosting , which is part of the OpenCV library of machine vision tools, areas on the face corresponding to the right and left eye, nose and mouth are selected.
    Based on these coordinates, the basic proportions of the face are calculated, which are then used as a feature vector for the neural network. The neural network is first trained on this input using expert estimates as a target sample, and then can be used for recognition on new data not previously seen by the network.

    Feature Highlighting

    We conditionally divided the features we distinguished into two groups: the ratio of the distances between the selected key points and the ratio of the found face sizes.

    Group of signs 1 is shown in fig. 3, left: AB / CD, AC / BC, AD / BD, EC / ED, EC / AB, AC / AD, BC / BD. Characteristic group 2 is shown in Fig. 3, right: L / R, Mw / Mh, Nw / Nh, Mw / Nw, Mh / Nh. The resulting feature vector consists of the combined features of both groups. Before applying to the neural network, the data were brought to the range [1; 1].

    Fig. 3. Calculation of feature vectors by selected key points on the face

    Neural network training

    As a trained neural network, we used a standard multilayer perceptron [10, p. 219] with one hidden layer containing 5 neurons in the hidden layer. The function of hyperbolic tangent was used as activation functions of neurons of the hidden and output layer. The neural network was trained using the extended Kalman filter method [10, p. 219], [11], which is today one of the most effective second-order training methods for neural networks. Before training, the sample was divided into 2 parts: training (110 examples, 60% of the sample) and examination (70 examples, 40% of the sample). The learning outcomes are presented in table. 2.

    Table 2. The results of training the neural network on the problem of recognition of beauty

    We believe that the result of a correlation of 0.5 on an examination sample that was not used in training is very good for that small amount of information supplied to the neural network as signs. In fact, the neural network makes a decision based on the analysis of the structure of the skull bones, ignoring other data that a person takes into account when solving a similar problem.
    In the future, we plan to improve the algorithm by expanding the database of images for training, highlighting new key points on the face and including a skin smoothness detector in it.

    Original article (ours):Chernodub A.N., Pashchenko Yu.A., Golovchenko K.A. Neural network system for determining the attractiveness of a person’s face // XV All-Russian scientific and technical conference “Neuroinformatics-2013”, Moscow, January 21-25, 2013, p. 254 - 259.

    List of references

    1. Kovach, FJ Philosophy of beauty // Norman: University of Oklahoma Press. 1974.
    2. Grammer K, Thornhill R. Human (Homo sapiens) facial attractiveness and sexual selection: the role of symmetry and averageness. // J Comp Psychol, 1994. V. 108. No. 3. P. 233-242.
    3. Rhodes G. The Evolutionary Psychology of Facial Beauty // Annu. Rev. Psychol. 2006. V. 57. P. 199-226.
    4. Sheib JE, Gangestad SW, Thornhill R. Facial attractiveness, symmetry and cues of good genes // Proc Biol Sci. 1999 September 22; 266 (1431). R. 1913-1917.
    5. Holland E. Marquardt's Phi Mask: Pitfalls of Relying on Fashion Models and the Golden Ratio to Describe a Beautiful Face // Aesthetic Plastic Surgery, 2008. V. 32, No. 2. P. 200-208.
    6. Aarabi, P., Hughes, D., Mohajer, K., Emami, M. The automatic measurement of facial beauty // IEEE International Conference on Systems, Man, and Cybernetics, 710 October 2001, Tucson, USA. V. 4. P. 2644-2647.
    7. Eisenthal Y., Dror G., Ruppin E. Facial Attractiveness: Beauty and the Machine // Neural Computation, 2006. V. 18. No. 1. P. 119-142.
    8. Gan J., Li L., Zhai Y. Deep self-taught learning for facial beauty prediction // Neurocomputing. DOI: 10.1016 / j.neucom.2014.05.05.028
    9. Gray D., Yu K., Xu W., Gong Y. Predicting Facial Beauty without Landmarks // Computer Vision - ECCV 2010, Lecture Notes in Computer Science, 2010, V. 6316/2010. P. 434-447.
    10. Khaikin S. Neural networks: a full course. M .: Williams, 2006.
    11. Chernodub AN Training Neural Networks for classification using the Extended Kalman Filter: A comparative study // Optical Memory and Neural Networks, 2014. Vol. 23, Issue 2, pp 96-103.

    Also popular now: