How It Works

The Attractiveness Test app aims to replicate how humans perceive attractiveness using cutting-edge technology. Our app leverages advanced machine learning and computer vision algorithms to calculate attractiveness scores from images. Whether you're curious about how our system works or want to understand the magic behind the scenes, this post is for you!

Architecture

The app's architecture is composed of three main components: a face extractor and two Neural Networks. The first network predicts age and gender, while the second estimates attractiveness. Each part plays a crucial role in delivering accurate and meaningful results.

attractiveness test model

Extract Face

The first step in our process is extracting the face from the image using OpenCV, a powerful open-source computer vision tool. This step is essential because it isolates the face, allowing the model to focus on the features that matter most.

If multiple faces are detected, one is randomly selected (a feature we're working on improving). We add black bars to the sides to create a square image, ensuring a consistent size of 224 x 224 pixels for further processing. This standardization helps maintain accuracy and consistency across all images.

cropped image

Predict Age and Gender

Once we have a clean image of the face, the next step involves predicting age and gender. We've developed a custom Deep Neural Network for this task, inspired by this open-source project.

The output includes the estimated age and a gender label (male or female). Our research shows that understanding these characteristics first can significantly improve the accuracy of the attractiveness score. By factoring in age and gender, our app provides a more nuanced and personalized evaluation.

Predict Attractiveness

Now comes the exciting part: predicting attractiveness. This component utilizes a Deep Neural Network based on the ResNet architecture, renowned for its performance in image recognition tasks.

The model takes the extracted face, along with the predicted age and gender, to calculate the attractiveness score. We've trained our model with a diverse dataset of images annotated with age, gender, and attractiveness labels. Through a sophisticated optimization algorithm, our model learns to generalize, allowing it to accurately predict the attractiveness of images not included in the training dataset. This is a prime example of supervised learning in action.

attractiveness test model accuracy

Statistics

attractiveness test model

Curious about how others score? This chart displays the results of 100,000 predictions from real users. The average score is 6.0, with a standard deviation of 1.25. Explore more in-depth statistics here to see where you stand!

Technologies We Use

Our app's backbone is the robust Google Cloud Platform, which powers both the prediction model and the website. We've crafted a containerized API that includes our face extractor, attractiveness detection models, and a web application offering API endpoints. This setup ensures that our app runs smoothly and efficiently.

Based on this Docker container, we deploy a Virtual Machine (VM) within Google Compute Engine, allowing us to seamlessly operate both the website and the Android app. For web hosting, we rely on App Engine, a managed environment that simplifies hosting Flask-based web applications. The Flask app connects directly to our API to provide instant attractiveness scores.

Here's a glimpse of the Python libraries we use to make it all happen: OpenCV, TensorFlow, Keras, Flask, Django, Django-rest, google-cloud-logging, and google-cloud-storage.

attractiveness gcp architecture

Why It Matters

Understanding how our app works is not just about satisfying curiosity. It's about appreciating the technology that enables a fun and engaging experience for users worldwide. By demystifying the process, we hope to build trust and transparency with our users.

Get Involved

We're always looking for feedback and ways to improve. Whether you're a tech enthusiast or just someone interested in the science of attractiveness, your insights are invaluable. Feel free to reach out with your thoughts and suggestions.


By using the Attractiveness Test app, you're engaging with a sophisticated system that combines innovation with everyday fun. Whether you're curious about your own score or interested in the tech behind it, we invite you to explore, enjoy, and get involved in the journey of discovering what makes us attractive. Thank you for using our tool!