All Projects → johnwmillr → Facer

johnwmillr / Facer

Simple (🤞) face averaging (🙂) in Python (🐍)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Facer

Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (+116.33%)
Mutual labels:  opencv, face-detection, dlib
Attendance Using Face
Face-recognition using Siamese network
Stars: ✭ 174 (+255.1%)
Mutual labels:  opencv, face-detection, dlib
Catt
Detecting the temperature from an infrared image
Stars: ✭ 60 (+22.45%)
Mutual labels:  opencv, face-detection, image-processing
Opencv Face Filters
Snapchat-like Face Filters in OpenCV
Stars: ✭ 51 (+4.08%)
Mutual labels:  opencv, face-detection, image-processing
Facemoji
😆 A voice chatbot that can imitate your expression. OpenCV+Dlib+Live2D+Moments Recorder+Turing Robot+Iflytek IAT+Iflytek TTS
Stars: ✭ 320 (+553.06%)
Mutual labels:  opencv, face-detection, dlib
Marvel
Marvel - Face Recognition With Android & OpenCV
Stars: ✭ 199 (+306.12%)
Mutual labels:  opencv, face-detection, image-processing
Proctoring Ai
Creating a software for automatic monitoring in online proctoring
Stars: ✭ 155 (+216.33%)
Mutual labels:  opencv, face-detection, dlib
Predict Facial Attractiveness
Using OpenCV and Dlib to predict facial attractiveness.
Stars: ✭ 41 (-16.33%)
Mutual labels:  opencv, face-detection, dlib
Add Christmas Hat
Add Christmas hat on one's head based on OpneCV and Dlib
Stars: ✭ 251 (+412.24%)
Mutual labels:  opencv, face-detection, dlib
Thug Memes
Command line Thug Meme generator written in Python
Stars: ✭ 224 (+357.14%)
Mutual labels:  opencv, dlib, image-processing
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (+622.45%)
Mutual labels:  opencv, face-detection, dlib
Android Hpe
Android native application to perform head pose estimation using images coming from the front camera.
Stars: ✭ 46 (-6.12%)
Mutual labels:  opencv, face-detection, dlib
Prlib
Pre-Recognition Library - library with algorithms for improving OCR quality.
Stars: ✭ 18 (-63.27%)
Mutual labels:  opencv, image-processing
Road Detection And Tracking
Involves the OpenCV based C++ implementation to detect and track roads for almost realtime performance
Stars: ✭ 17 (-65.31%)
Mutual labels:  opencv, image-processing
Realtimefaceapi
This is a demo project showing how to use Face API in Cognitive Services with OpenCV
Stars: ✭ 44 (-10.2%)
Mutual labels:  opencv, face-detection
Brfv4 mac examples
macOS C++ examples utilizing OpenCV for camera access and drawing the face tracking results.
Stars: ✭ 25 (-48.98%)
Mutual labels:  opencv, face-detection
Facepixeler
A simple C# program that can automatically detect and blur faces in images. Uses OpenCV and EmguCV.
Stars: ✭ 5 (-89.8%)
Mutual labels:  opencv, face-detection
Mocr
Meaningful Optical Character Recognition from identity cards with Deep Learning.
Stars: ✭ 19 (-61.22%)
Mutual labels:  opencv, face-detection
Anonymize Video
Replace faces in a video with imaginary persons generated by a progressive GAN deep neural network
Stars: ✭ 15 (-69.39%)
Mutual labels:  opencv, dlib
Graph Based Image Segmentation
Implementation of efficient graph-based image segmentation as proposed by Felzenswalb and Huttenlocher [1] that can be used to generate oversegmentations.
Stars: ✭ 31 (-36.73%)
Mutual labels:  opencv, image-processing

Facer

Face detection, alignment, and averaging using OpenCV and dlib.

Facer draws heavily on this tutorial from Satya Mallick. I had to update the code pretty heavily to get the project to work, so I thought I'd share my modifications.

Average faces of rap, rock, and country music

Installation

You have my 100% money-back guarantee that the most difficult part of using this package is installing its requirements. Once you've got OpenCV installed, the rest will be smooth sailing.

OpenCV

On Mac, use homebrew to install OpenCV. On Windows, I have no clue. Sorry.

brew install opencv

Using brew to install OpenCV did actually work for me, but it also broke my previous Python installation and all my virtual environments. So uhh, good luck with that.

Python packages

After installing OpenCV, use pip to install dlib, matplotlib, and numpy from the requirements.txt file.

pip install -r requirements.txt

Pre-trained detection model

The face landmark detection relies on a pre-trained model that must be downloaded separately from the dlib package itself.

wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2

Unzip the compressed file after it finishes downloading and move it into the ./Facer/dlib directory.

Usage

from facer import facer

# Load face images
path_to_images = "./face_images"
images = facer.load_images(path_to_images)

# Detect landmarks for each face
landmarks, faces = facer.detect_face_landmarks(images)

# Use  the detected landmarks to create an average face
average_face = facer.create_average_face(faces, landmarks, save_image=True)

# View the composite image
plt.imshow(average_face)
plt.show()

Facer also supports creating animated GIFs of the averaging process:

from facer import facer

path_to_images = "./face_images"
gif, average_face = facer.create_animated_gif(path_to_images)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].