Skip to content

A Flask app that detects how many (if any) faces are there and their respective emotions using my TensorFlow model in the image.

License

Notifications You must be signed in to change notification settings

PradyumnaKrishna/Facial-AI

Repository files navigation

Logo

Facial-AI Version Build Status Coverage License: MIT


THIS REPOSITORY IS LICENSED UNDER MIT LICENSE


This is a very simple Flask app that let the user upload an image and detects how many (if any) faces are there and their respective emotions in the picture.

Haarcascade is used to detect the faces in the image, which is allowed to use my TensorFlow model to predict the emotion of human. I trained it in my repository FER.

Get Started

Use Docker or Virtual Environment to run this web application. To get started:

  1. Clone the repository
    git clone https://github.com/PradyumnaKrishna/Facial-AI
  2. Install Dependencies
    pip3 install -r requirements.txt
  3. Run the flask server
    python3 main.py

Read more information or instructions about the setup at docs.

API Reference

Recently, Created an API /FER/api/v1/. Send a request using curl, postman or you favoraite language sdk containing upload a file, and get a json response with face coordiantes, emotion predicted, and probability of guessed emotion. Read more about this api at docs.

Hosted on Azure App Service

Google App Engine Flexible isn't free that's why I moved to Azure App Service. Again it gave the ability to run it and work fine* under their free tier.

Give a try at http://facial-ai.azurewebsites.net, use some test cases and rate our accuracy.

*I used Docker Image to for deployment last time, I was using git but due to some problem I switched over it.

CI/CD using Travis-CI

Recently, I learned about Travis-CI and want to configure it for this repository. Now whenever I commit it test my code using test.py and deploy it to Google App Service and Azure App Service when I push tagged commit. Read more

Docs and References

Issues & Suggestions

If any issues and suggestions to me, you can create an issue.

Donate

Why Donate? GCP or Google App Engine isn't free