All Projects → sashacmc → face-rec-tools

sashacmc / face-rec-tools

Licence: GPL-3.0 license
Media library face recognition tools

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to face-rec-tools

ofFaceRecognition
simple example face recognition with deep metric learning to dlib
Stars: ✭ 20 (+42.86%)
Mutual labels:  face-recognition, dlib
Dlib face recognition from camera
Detect and recognize the faces from camera / 调用摄像头进行人脸识别,支持多张人脸同时识别
Stars: ✭ 719 (+5035.71%)
Mutual labels:  face-recognition, dlib
Get Me Through
A Free, Offline, Real-Time, Open-source web-app to assist organisers of any event in allowing only authorised/invited people using Face-Recognition Technology or QR Code.
Stars: ✭ 255 (+1721.43%)
Mutual labels:  face-recognition, dlib
avatar-facial-landmark-detection
A method about optimizing the facial landmark detection based on Kalman Filter, Optical Flow and Dlib
Stars: ✭ 87 (+521.43%)
Mutual labels:  face-recognition, dlib
Dlib Face Recognition Android
Android app to demo dlib face recognition
Stars: ✭ 115 (+721.43%)
Mutual labels:  face-recognition, dlib
PyRecognizer
"A neural network to rule them all, a neural network to find them, a neural network to bring them all and verify if is you !!" (Face recognition tool)
Stars: ✭ 28 (+100%)
Mutual labels:  face-recognition, cuda-support
Go Face
🔍 Face recognition with Go
Stars: ✭ 650 (+4542.86%)
Mutual labels:  face-recognition, dlib
facenet-darknet-inference
Face recognition using facenet
Stars: ✭ 29 (+107.14%)
Mutual labels:  face-recognition, dlib
Face-Recognition-Attendance-System
A simple python script that recognises faces and mark attendance for the recognised faces in an excel sheet.
Stars: ✭ 57 (+307.14%)
Mutual labels:  face-recognition, dlib
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (+657.14%)
Mutual labels:  face-recognition, dlib
T System
the moving objects tracking system via two axis camera motion (and as optionally n joint robotic arm) for raspberry pi distributions
Stars: ✭ 17 (+21.43%)
Mutual labels:  face-recognition, dlib
Face recognition py
基于OpenCV的视频人脸识别
Stars: ✭ 215 (+1435.71%)
Mutual labels:  face-recognition, dlib
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 (+2428.57%)
Mutual labels:  face-recognition, dlib
Deepface
A Lightweight Deep Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Framework for Python
Stars: ✭ 1,150 (+8114.29%)
Mutual labels:  face-recognition, dlib
Attendance Using Face
Face-recognition using Siamese network
Stars: ✭ 174 (+1142.86%)
Mutual labels:  face-recognition, dlib
Facerecognition
Nextcloud app that implement a basic facial recognition system.
Stars: ✭ 226 (+1514.29%)
Mutual labels:  face-recognition, dlib
ofxDlib
An openFrameworks wrapper for dlib. http://dlib.net/
Stars: ✭ 52 (+271.43%)
Mutual labels:  dlib
SphereFace-TensorFlow
A TensorFlow implementation for SphereFace!The code can be trained on LFW.
Stars: ✭ 17 (+21.43%)
Mutual labels:  face-recognition
FaceRecognition PyTorch
Implement Face Recognition Code in PyTorch. Such as SphereFace with A-Softmax.
Stars: ✭ 29 (+107.14%)
Mutual labels:  face-recognition
LBCNN
Local Binary Convolutional Neural Network for Facial Expression Recognition of Basic Emotions in Python using the TensorFlow framework
Stars: ✭ 21 (+50%)
Mutual labels:  face-recognition

Face Rec Tools

Total alerts Language grade: JavaScript Language grade: Python

Media library face recognition tools

Features

  • Detect faces in photo/video files
  • Match faces to face patterns
  • Patterns manipulation
  • Face database search
  • Tagging faces in the Plex Media Server library

Requirements

  • Debian based Linux (Other Linux versions not officially supported, but might work)
  • Python 3.6+
  • NVIDIA GPU (optional)
  • Plex Media Server (optional)

Dependencies

  • OpenCV + python3 bindings (better with CUDA support)
  • DLib + python3 bindings (better with CUDA support)
  • TensorFlow + python3 binding (optional)
  • deepface python3 library (optional)
  • numpy python3 library
  • face_alignment python3 library
  • face_recognition python3 library
  • python3-piexif python3 library

Installation

Dependencies installation

Build tools and install tools

For building dlib and others

sudo apt-get install build-essential cmake python3-pip

OpenCV (skip if you have NVIDIA GPU)

sudo apt-get install python3-opencv

CUDA, OpenCV and TensorFlow installation (skip if don't have NVIDIA GPU)

Installation of libraries with CUDA is not so easy and may be differ for different OS versions. Some useful links for CUDA setup

https://developer.nvidia.com/cuda-downloads

https://medium.com/@sb.jaduniv/how-to-install-opencv-4-2-0-with-cuda-10-1-on-ubuntu-20-04-lts-focal-fossa-bdc034109df3

https://www.pyimagesearch.com/2019/12/09/how-to-install-tensorflow-2-0-on-ubuntu/

Deep Face library installation (skip if don't use deepface encoding, default)

pip3 install deepface

Face Recognition library

Install my face_recognition clone (there are some modification to support exteranal matched faces)

git clone https://github.com/sashacmc/face_recognition.git; cd face_recognition; pip3 install .; cd ..

Face Rec Tools installation

git clone https://github.com/sashacmc/face-rec-tools.git; cd face-rec-tools; pip3 install .; cd ..

Usage

Config file

Use one from predefined config files or prepare you own.

Predefined config files located in package's cfg folder (e.g. ~/.local/lib/python3.6/site-packages/face_rec_tools/cfg/)

Copy it to default config location (~/.face-rec.cfg) or specify with command line switch "-c"

cp ~/.local/lib/python3.?/site-packages/face_rec_tools/cfg/frontal.cfg ~/.face-rec.cfg

Command-Line Interface

# recognize single image and print output (useful for debug)
face-rec-cli -a recognize_image -i imagefile.jpg

# recognize single video and print summary output (useful for debug)
face-rec-cli -a recognize_video -i videofile.mp4

# recognize folder and store the result in the database
face-rec-cli -a recognize_folder -i /folder/with/images

# remove folder recognition the result from the database
face-rec-cli -a remove_folder -i /folder/with/images

# match/rematch unmatched faces in database
face-rec-cli -a match_unmatched

# match/rematch all faces in database
face-rec-cli -a match_all

# match/rematch faces from folder in database
face-rec-cli -a match_folder -i /folder/with/images

# save faces from folder (must be previously recognized)
# cachedb must be disabled (otherwise they will saved inside cachedb)
face-rec-cli -a save_faces -i /folder/with/images -o /folder/for/faces

# find face from image in database and save them in folder
# cachedb must be disabled (otherwise they will saved inside cachedb)
face-rec-cli -a get_faces_by_face -i image_with_one_face.jpg -o /folder/for/faces

Web Interface

Run the server from the command line

face-rec-server 

Open the browser with you hostname/ip_adress and port 8081

For recognize a new folder click to "Recognition"->"Add new files...". And specify a folder which you want to recognize. face_rec_screen_1

First time the recognition will take a while, because of loading necessary models.

After first recognition you will get all faces as unknown. face_rec_screen_3

Click to the face (or select several with Shift/Ctrl) to add it as a pattern. face_rec_screen_4

Previously added names will be saved, and you don't need to input it again. If you want to change the default face logo you can add it as 0_face.jpg for each person subfolder. face_rec_screen_5

After patterns adding, start the match again (e.g. "Match"->"Rematch folder...") face_rec_screen_6

After matching with patterns you will have matched persons and "weak" matched persons, it means that it not fully matched and will not be used for sync or search. You need to check them and add to patterns. face_rec_screen_7

If you need some additional info about the face you can click the srclink icon to see the source file, or the pattlink to see the pattern which it has been matched to.

If you have a big amount of faces you can simplify patterns separation by mean of clusterization in menu Clustering it will separate near faces to groups and will allow to add it to patterns together.

Plex Media Server synchronisation

Face Recognition Tools allow syncing recognition results with Plex Media Server by means of tags. Recognized files will tagged with tags "person:[PERSON_NAME]"

# set all tags to the Plex database 
face-rec-plexsync -a set_tags

# clear all tags from the Plex database
face-rec-plexsync -a remove_tags

# recognize all files which present in the Plex database
# but not recognized yet and store the result in the database 
face-rec-plexsync -a sync_new

# delete from database all files which not present in the Plex database
face-rec-plexsync -a sync_deleted

Seach in DB without Plex

If you have no Plex, or want to use some more complex search you can use follow command

(it will search all files in folder 2020 which contains faces of persons Name1 and Name2)

face-rec-db -a find_files_by_names -f 2020 -n Name1,Name2

Acknowledgements

Thanks to everyone who tested and gave advice.

Bug reports, suggestions and pull request are welcome!

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].