aibi10 / snapchat-filter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project: Snapchat Filter!

snapchat.filter.mp4

Who does not know about Snapchat Filters. But did you ever wonder how do they put the filter on live streaming video exactly at the required spot.

The idea here is to detetct the top left corner of the face and also get the height and width of the face, i.e, (x, y, w, h).

With certain adjustments in these values one can easily detect the various facial features and then with the help of opencv library overlayPNG another image is put over the live stream video.

Isn't it amazing?

The only thing that one needs to take care of in this project is that the overlaying png image must have an alpha channel.

I used some filters but you can play along with your filters as well.

Also, the other interesting part of this project is I created an API usinh Kivy which is a Pythonic GUI for all the OS.

STEPS:

Clone the repository

https://github.com/aibi10/snapchat-filter.git

STEP 01- Create a conda environment after opening the repository

conda create -n snapchatfilter python=3.7.10 -y
conda activate snapchatfilter

STEP 02- install the requirements

pip install -r requirements.txt

STEP 03- create environment specification in conda.yaml

conda env export > conda.yaml

STEP 04 - run this command to genrate pickle files

python main.py
Author: Abhishek Singh
Data Scientist
Email: isingh.abhishek10@gmail.com

About


Languages

Language:Python 89.0%Language:kvlang 11.0%