All Projects → rodrigobressan → Face2data

rodrigobressan / Face2data

Licence: mit
Face2Data: Extract meaningful information from a person face in less than a second. Powered by Keras and Flask.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Face2data

Leetcode Country Ranking
Find Leetcode ranking by country, username.
Stars: ✭ 98 (-8.41%)
Mutual labels:  flask
Weeklyreport
基于Flask的开源周报系统,快速docker部署
Stars: ✭ 102 (-4.67%)
Mutual labels:  flask
Face Classification
Face model to classify gender and race. Trained on LFWA+ Dataset.
Stars: ✭ 104 (-2.8%)
Mutual labels:  face-recognition
Flask bestpractices
Flask最佳实践
Stars: ✭ 100 (-6.54%)
Mutual labels:  flask
Stock Market Prediction Web App Using Machine Learning And Sentiment Analysis
Stock Market Prediction Web App based on Machine Learning and Sentiment Analysis of Tweets (API keys included in code). The front end of the Web App is based on Flask and Wordpress. The App forecasts stock prices of the next seven days for any given stock under NASDAQ or NSE as input by the user. Predictions are made using three algorithms: ARIMA, LSTM, Linear Regression. The Web App combines the predicted prices of the next seven days with the sentiment analysis of tweets to give recommendation whether the price is going to rise or fall
Stars: ✭ 101 (-5.61%)
Mutual labels:  flask
Repo 2016
R, Python and Mathematica Codes in Machine Learning, Deep Learning, Artificial Intelligence, NLP and Geolocation
Stars: ✭ 103 (-3.74%)
Mutual labels:  face-recognition
Awslambdaface
Perform deep neural network based face detection and recognition in the cloud (via AWS lambda) with zero model configuration or tuning.
Stars: ✭ 98 (-8.41%)
Mutual labels:  face-recognition
Indian Paper Currency Prediction
Source code of Indian Paper Currency Prediction 🔥
Stars: ✭ 106 (-0.93%)
Mutual labels:  flask
Grest
Build REST APIs with Neo4j and Flask, as quickly as possible!
Stars: ✭ 102 (-4.67%)
Mutual labels:  flask
React Redux Flask
Boilerplate application for a Python/Flask JWT Backend and a Javascript/React/Redux Front-End with Material UI.
Stars: ✭ 1,431 (+1237.38%)
Mutual labels:  flask
Votr
🌟 A polling application built with Flask and React
Stars: ✭ 100 (-6.54%)
Mutual labels:  flask
Python Examples
Python examples from my answers on Stackoverflow and other short scripts.
Stars: ✭ 101 (-5.61%)
Mutual labels:  flask
Imagegonord
A tool that can convert your rgb images to nordtheme palette
Stars: ✭ 105 (-1.87%)
Mutual labels:  flask
Pyflask 2k18
A workshop organised by ACM VIT every year, during Gravitas (VIT University, Tech Fest), Having sessions on python programming and website creation using flask.
Stars: ✭ 99 (-7.48%)
Mutual labels:  flask
Get Started Python
A Python application and tutorial that use Flask framework to provide a REST API to receive requests from the UI. The API then persists the data to a Cloudant database.
Stars: ✭ 104 (-2.8%)
Mutual labels:  flask
Booklibrary
📚Simple Book library application written on flask with SQLite database.
Stars: ✭ 98 (-8.41%)
Mutual labels:  flask
Mdwiki
markdown wiki by python
Stars: ✭ 102 (-4.67%)
Mutual labels:  flask
Hiitpi
A workout trainer Dash/Flask app that helps track your HIIT workouts by analyzing real-time video streaming from your sweet Pi using machine learning and Edge TPU..
Stars: ✭ 106 (-0.93%)
Mutual labels:  flask
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (-0.93%)
Mutual labels:  face-recognition
Multivisor
Centralized supervisor WebUI and CLI
Stars: ✭ 104 (-2.8%)
Mutual labels:  flask

Face2Data

Python 3.6 Build Status Coverage Status GitHub license

Deploy

Extract information from a person face in less than a second

This project is intended to showcase the usage of a Keras multi-output model to predict age, gender and ethnicity from a given persons face. The generated model is served through a REST API provided by Flask running on Python 3.6.

Running the project

Using Docker

If you want to quickly build and run the server, you can use Docker. First, install docker for your architecture. Then build the container:

$ docker build -t face2data .

The container will use gunicorn to deploy the application on port 5000. You thus should run the container and map this port to your host:

$ docker run -p 5000:5000 face2data

You can then open your browser to http://127.0.0.1:5000/ to see the interface.

static/docker-server.png

From Source

A live demo of application is available on the https://face2data.herokuapp.com/ address (it may take some time to load due to Heroku's free plan), but if you instead would like to run it locally, below are the needed steps:

In order to run this project locally, you first need to clone this repository into our machine and then install the required dependencies. The project dependencies are located in the requirements.txt file. You can install them by using PiP, as below:

pip install -r requirements.txt

After this, navigate to the project root directory and run the following command on the terminal to start the application:

flask run

This should start a new server on the port 5000. You can then access the applicaton by opening the address http://localhost:5000/ on the browser.

The dataset

The UTKFace dataset is a large dataset composed of over 20 thousand face images with their respective annotations of age, gender and ethnicity. The images are properly cropped into the face region, but display some variations in pose, illumination, resolution, etc. If you want to know more about this dataset, please check their website.


Training phase

Our Neural Network is composed of three major branches, one for each of the features we are trying to predict. We have used a default set of hidden layers, based on the stacking of several Conv2D with ReLU activation, followed by a Batch Normalization, then a MaxPooling and finally a Dropout layer.

We performed our training phase by adopting an Adam optimizer with a learning rate of 1e-4 and a decay based on the initial learning rate divided by the number of epochs. A hundred epochs were used to train our model, in which we have seen that we had an efficient learning process, asserted by plotting both the accuracy and loss curves, as shown below:

Accuracy for gender feature

Accuracy for race feature

Mean Absolute Error for age feature

Overall loss

TODO

  • Add unit tests for both Flask application and model predictions
  • Setup Continuous Integration and Deployment to automatically deploy on Heroku upon a new commit
  • Add SHAP model explanations

References

UTK Face Dataset: http://aicip.eecs.utk.edu/wiki/UTKFace

Keras Multi-output documentation: https://keras.io/getting-started/functional-api-guide/

SanjayaSubedi post on multi-output model: https://sanjayasubedi.com.np/deeplearning/multioutput-keras/

PyImageSearch post on FashionNet: https://www.pyimagesearch.com/2018/06/04/keras-multiple-outputs-and-multiple-losses/

Plotly: https://plot.ly/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].