Giter VIP home page Giter VIP logo

facial_attractiveness_prediction's Introduction

Hotness and Age Prediction using Medical Facial Images

This repository provide the code to assess the attraciveness and age of medical images. The attractiveness models are: BLINQ- trained on a private dataset obtained from the BLINQ dating app and MEDICAL- the further fine-tuned model using the Chicago Face Dataset. The age models are: WikiIMDB trained and further fine-tuned using the APPA Real Dataset. We provide the pretrained and the fine-tuned models in order to predict the attractiveness and age given a facial image.

The maximal attractiveness score is 10 and the minimal 1. However, in BLINQ the assigned scores tend to be lower than on CFD such that 10s are very rare in the former. Age is reported in the interval 0 to 100.

Requirements

Python 3
pytorch>=1.3
torchvision
pillow

Setup

Please download the CNN pytorch model weight including the folders here and copy them into the checkpoints folder.

Running the Hotness Scripts

python predict_hotness.py predict_bins_hotness_densenet201_blinq path_to_img

or

python predict_hotness.py predict_bins_hotness_densenet201_medical path_to_img

Running the Age Scripts

python predict_age.py predict_bins_age_densenet201_wikiimdb path_to_img

or

python predict_age.py predict_bins_age_densenet201_appareal path_to_img

Examples

We run our model for demonstration purposes here on two publicly available images from the Web (downloaded from Wikipedia).

alt text

This picture of Angela Merkel achieves an attractiveness score of

2.829862910516840 with a standard deviation of 0.0877247232573163 (BLINQ) and

3.557292120774966 with a standard deviation of 0.2021892417092418 (MEDICAL).

and an age estimation of

57.4361633341181 with a standard deviation of 1.709792667712001 (WikiIMDB) and

60.83877001864456 with a standard deviation of 1.1122933985426469 (APPA Real).

Note, that we feed the image 20 times through the CNN with random augmentations to compute the mean and standard deviation.

alt text

This picture of Katheryn Winnick achieves an attractiveness score of

6.378340877147275 with a standard deviation of 0.13951626876974346 (BLINQ) and

7.932078346675053 with a standard deviation of 0.03819095674717804 (MEDICAL).

and an age estimation of

37.45339674973202 with a standard deviation of 2.8794594430390483 (WikiIMDB) and

31.53677092714849 with a standard deviation of 1.6105625494518505 (APPA Real).

facial_attractiveness_prediction's People

Contributors

2006pmach avatar

Stargazers

Allie Ellis avatar Daniel Albohn avatar Tyler Champagne avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

willy-chan

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.