python3 -m virtualenv -p python3 .env
source .env/bin/activate
pip3 install -r requirements.txt
(mkdir -p resources; cd resources; curl | bzip2 -d > shape_predictor_68_face_landmarks.dat)


source .env/bin/activate

# Glasses filter
./ --filter glasses --footage glasses.png
# Moustache filter
./ --filter moustache --footage resources/moustache.png

Research paper

Paper written on this is available here:

3 filters for CS7434 augmented reality - face swap, glasses and moustache

Clone the repo and create a directory in it called "resources". In this, you need the pre-trained face data available here:

In resources, place any images you want to use in it for filters (face swap images, moustache image, glasses image, etc); modify the code as appropriate.

Make sure you have Python 3 installed, see here for easy installation with Brew on OSX

If you want to create bug fixes or extend functionality, feel free to send pull requests.

Snapchat Filter

3 facial filters on a webcam feed using OpenCV & ML - face swap, glasses and moustache

Snapchat Filter Info

⭐ Stars 47
🔗 Source Code
🕒 Last Update 6 months ago
🕒 Created 5 years ago
🐞 Open Issues 0
➗ Star-Issue Ratio Infinity
😎 Author oflynned