Skip to content

This work in progress is a Tinder bot which utilizes a neural network to rate the conventional beauty of Tinder photos and swipe accordingly.

Notifications You must be signed in to change notification settings

BFD91/facial-beauty-rating-tinder-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facial beauty rating Tinder bot

Disclaimer: This project is intended for my personal learning purposes only. I claim no originality and take no responsibility for any consequences incurred by others through its use.

This work in progress is a Tinder bot which utilizes a neural network to rate the conventional beauty of Tinder photos and swipes accordingly.

More precisely, I drew inspiration and some code from https://github.com/dishagarg/TinderBot, from https://towardsdatascience.com/how-attractive-are-you-in-the-eyes-of-deep-neural-network-3d71c0755ccc, and from https://github.com/JeeveshN/Face-Detect, to do the following. First I trained the Keras ResNet50 (all layers but the final one were in turn pretrained on ImageNet) on the SCUT-FBP5500 dataset, cf. https://arxiv.org/abs/1801.06345. This dataset consists of 5500 images of a mix of male and female (Asian and caucasian) faces, with each face given an aggregate beauty rating 1-5 by 60 volunteers. Using a split with 4400 train images and 1100 test images, I achieved a mean absolute error of 0.29 on the test set. Training proceeded for 60 epochs in total, with the first 30 only training a final dense layer of the ResNet50. The resulting model can be downloaded from: https://drive.google.com/open?id=1SZDdaQ2f-ZR69c75Sex-G0jXNwLzwirY but is very much to be regarded as a placeholder model for now (see discussion of improvements below).

The neural network is applied to a bot for the dating app Tinder. The bot scans the photos of each suggested profile and extracts any face it can find. The neural network rates the faces, and a maximum score of at least 3 results in a "like". Since the Tinder photos are unlabelled and come from a different distribution than the training data it is difficult to evaluate the performance objectively. My impression is, however, that the bot does a half-decent job of distinguishing between conventionally attractive and conventionally unattractive profiles, but certainly fails to capture any finer nuances. As a by-product of the bot's operating, all the photos of the retrieved profiles are downloaded and additional preprocessed images of faces are extracted. These images may be labelled and then readily used to try to improve the neural network's performance on Tinder photos (and fine-tune in accordance with the individual user's preferences). Other improvements that lie close at hand is data augmentation (e.g. cropping, color shifts and horizontal reflections) and using a model pretrained for facial recognition.

Note: While the Tinder API contains the tools for retrieving an authentication token using Facebook login info, this methods seems to be unreliable and may result in a temporary suspension of your Facebook account. This bot therefore instead requires the input of a manually retrieved Tinder authentication key. This key can be found as follows: Log in on your Tinder account via Chrome. Right click in the browser and pick Inspect. Navigate to Network and select a Name starting with "profile...", then go to Headers. The correct key is named X-Auth-Token. Copy and paste this key into the corresponding value in the dictionary Header in the Tinder API file. Using this method, I've had no issues.

About

This work in progress is a Tinder bot which utilizes a neural network to rate the conventional beauty of Tinder photos and swipe accordingly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages