Giter Site home page Giter Site logo

bfd91 / facial-beauty-rating-tinder-bot Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 2.0 207 KB

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

Python 100.00%

facial-beauty-rating-tinder-bot's Introduction

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.

facial-beauty-rating-tinder-bot's People

Contributors

bfd91 avatar

Stargazers

firzaich avatar  avatar  avatar  avatar Pavel Bogdanov avatar

Watchers

James Cloos avatar  avatar paper2code - bot avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.