How it works
The app tries to imitate how people would rate attractiveness of faces. It was created as part of a student project about computer vision and AI. In this short post, we describe the technical details how the model generates attractiveness scores from images.
The prediction model consists of a face extractor component and 2 Neural Networks of which one predicts age and gender and the other one estimates attractiveness.
The open-source tool OpenCV is used to locate and extract the face. If multiple faces are detected, one is randomly picked (We might improve this in the future). Black bars are added to the sides to make the result a squared image of the size 224 x 224 pixels.
Predict Age and Gender
For this component, we created a customized Deep Neural Network, inspired by this open-source project. Output is the estimated age and a label that indicates whether the person is male or female. Our experiments showed that first predicting age and gender improves the accuracy of the attractiveness score.
This Component is a self-created Deep Neural Network (based on the ResNet architecture). It takes as input the extracted face and previously predicted age and gender to perform the attractiveness prediction.
The model is trained with a dataset consisting of images with faces that are annotated with labels for age, gender and attractiveness score. An optimization algorithm ensures that the model learns to generalize, meaning that it also learns to predict the attractiveness of images that are not part of the dataset (supervised learing).
This chart shows the results of 100.000 predictions from real people. See more statistics with explainations here.
Check out our attractiveness testStart the test