Coder Social home page Coder Social logo

dalalsunil1986 / selfie_filters_opencv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acl21/selfie_filters_opencv

0.0 0.0 0.0 31.48 MB

This deep learning application can detect Facial Keypoints (15 unique points). They mark important areas of the face - the eyes, corners of the mouth, the nose, etc.

License: MIT License

Python 100.00%

selfie_filters_opencv's Introduction

[UPDATE]: I will not be responding to issues or emails related to this repo anymore as I am currently occupied with other research commitments. Also, the libraries used are pretty old and outdated. Thank you.

Selfie Filters Using Facial Landmarks

This deep learning application in python can put various sunglasses on a detected face (I am calling them 'Selfie Filters') by finding the Facial Keypoints (15 unique points). These keypoints mark important areas of the face - the eyes, corners of the mouth, the nose, etc.

Working Example

Data Description

OpenCV is often used in practice with other machine learning and deep learning libraries to produce interesting results. Employing Convolutional Neural Networks (CNN) in Keras along with OpenCV - I built a couple of selfie filters (very boring ones).

Facial keypoints can be used in a variety of machine learning applications from face and emotion recognition to commercial applications like the image filters popularized by Snapchat.

Facial keypoints (also called facial landmarks) are the small blue-green dots shown on each of the faces in the image above - there are 15 keypoints marked in each image.

I used this dataset from Kaggle to train a decent CNN model to predict the facial keypoints given a face and used the keypoints to place the desired filters on the face (as shown below).

Code Requirements

The code is in Python (version 3.6 or higher). You also need to install OpenCV and Keras libraries.

Execution

Order of Execution is as follows:

Step 0 - Download the 'training.zip' file from here and extract it into the 'data' folder.

Step 1 - Execute python model_builder.py

Step 2 - This could take a while, so feel free to take a break.

Step 3 - Execute python shades.py

Step 4 - Choose filters of your choice.

Step 5 - And don't forget to SMILE !

selfie_filters_opencv's People

Contributors

acl21 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.