• This repository has been archived on 06/Oct/2022
  • Stars
    star
    113
  • Rank 310,115 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

[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 !

More Repositories

1

deep-active-learning-pytorch

A PyTorch toolkit with 8 popular deep active learning query methods implemented.
Python
81
star
2

Alphabet_Recognition_Gestures

This python application recognizes alphabet from real time webcam data. The user is allowed to write the alphabet on the screen using an object-of-interest (a water bottle cap in this case).
Python
79
star
3

image_bbox_slicer

This easy-to-use library is a data transformer sometimes useful in Object Detection and Segmentation tasks. With only a few lines of code, one can slice images and their bounding box annotations into smaller tiles, both into specific sizes and into any arbitrary number of equal parts. The tool also supports resizing of images and their bounding box annotations, both by specific sizes and by a resizing/scaling factor.
Jupyter Notebook
75
star
4

Webcam_Paint_OpenCV

This Python application uses OpenCV library to track an object-of-interest (water bottle cap in my case) and uses the detected object to draw colored lines (Blue, Green, Red and Yellow).
Python
68
star
5

PGDAST

This repo contains study materials, lab records, previous year assignments and question papers, term end exam form, assignment instructions, percentage calculator etc. of the 1-year programme PGDAST, offered by IGNOU. Checkout the programme guide for more details!
50
star
6

wcsac

A PyTorch implementation of "WCSAC: Worst-Case Soft Actor Critic for Safety-Constrained Reinforcement Learning"
Python
39
star
7

Mouse_Cursor_Control_Handsfree

This HCI (Human-Computer Interaction) application in Python(3.6) will allow you to control your mouse cursor with your facial movements, works with just your regular webcam. Its hands-free, no wearable hardware or sensors needed.
Python
22
star
8

Digits_Recognition_RealTime

This python application recognizes digits from real time webcam data. The user is allowed to write the digits on the screen using an object-of-interest (a water bottle cap in this case).
Python
21
star
9

Mimic_Me_CV_Game

This repo hold the code of a simple, fun game built using Affectiva's Emotion-as-a-Service API. An Emoji is shown on the screen and one has to mimic the emoji to score points.
JavaScript
20
star
10

MorseCode_Converter_DeepLearning

This 4-in-1 deep learning application can convert Morse Code signalled in 4 different ways in real time. Namely, flashlight toggles, eye winking, hand gestures and mouse clicks.
Python
10
star
11

batch-gmr

Python
6
star
12

init-pools-dal

This is the official code implementation of our paper, On Initial Pools for Deep Active Learning, accepted at the Pre-registration Workshop at NeurIPS 2020.
Python
6
star