We were inspired by popular Instagram and Snapchat filters and wanted to see if we could create a makeshift version of them in only two days for the 2020 Winter Hacklympics Hackathon hosted by MLH.
Face Filter uses live facial detection and image processing operations and places a filter onto each face detected by the device camera. Through a number of calculations, it determines the optimal placement, scale, and angle of the filter mask dependent on each individual face.
Use the package manager pip to install cv2, numpy 1.19.13, and scipy in command prompt.
pip install opencv-contrib-python
pip uninstall numpy
pip install numpy==1.19.3
pip install scipy
coming soon...
- Open the
filter.pyfile to edit - Change these lines to include the name of the image and the respective filter that you want to use.
#read images
img = cv2.imread('assets/image_name.jpg')
fltr = cv2.imread('assets/filter_name.png')- Run the
filter.pyfile - Press any keyboard button to exit
- Open the
live_filter.pyfile to edit - Change this line to include the name of the filter that you want to use.
#read images
fltr = cv2.imread('assets/filter_name.png')- Run the
live_filter.pyfile - Press any keyboard button to exit
Sooren Ghodsi, Ethan Li, Seth Eshraghi, Joseph Gong, and Mitchell Kireger
MIT © Sooren Ghodsi




