• Stars
    star
    102
  • Rank 333,978 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Machine Learning project to recognise faces from an Image just like facebook or video stream

FaceRecognition

Machine Learning project to recognise people from an Image just like facebook.

Built with the help of dlib's state-of-the-art face recognition built with deep learning. The model has an accuracy of 99.38% on the Labeled Faces in the Wild benchmark.

Dependencies:

  • Python 3.x

  • Numpy

  • Scipy

  • Scikit-learn

  • dlib

    Tip: Installing dlib can be a tedious job. On macOS or Linux you may follow this link.

  • Extras:

    • OpenCV (required only in webcam.py for capturing frames from the webcam)

    • For using ./demo-python-files/projecting_faces.py you will need to install Openface.

      To install Openface, follow the below instructions:

          $ git clone https://github.com/cmusatyalab/openface.git
          $ cd openface
          $ pip install -r requirements.txt
          $ sudo python setup.py install

Result:

Procedure:

Training:

  • Make folder training-images.

  • Add images of each person you want to recognise to a folder by their name in training-images.

    Example

    $ mkdir training-images
    $ cd training-images
    $ mkdir Name_Of_Person

    Then copy all the images of that person in ./training-images/Name_Of_Person folder.

  • Run on cmd python create_encodings.py to get the encodings of the images and the labels. This will create encoded-images-data.csv and labels.pkl files.

    Note: There has to be only one face per image otherwise encoding will be for the first face found in the image.

  • Run on cmd python train.py to train and save the face recognition classifier. This will create classifier.pkl file. It will also create classifier.pkl.bak backup file if the classifier with that name already exists.

Prediction:

  • Make folder test-images which contains all the images you want to find people in.

  • Run on cmd python predict.py to predict the faces in each image.

Vote of Thanks

  • Thanks to Adam Geitgey whose blog inspired me to make this project.
  • Thanks to Davis King for creating dlib and for providing the trained facial feature detection and face encoding models used in this project.

More Repositories

1

Data-Structures-Algorithms

My implementation of 85+ popular data structures and algorithms and interview questions in Python 3 and C++
Python
315
star
2

CalculatorApp

scientific calculator basic calculator and unit converter android app
Java
166
star
3

Machine-Learning

The projects I do in Machine Learning with PyTorch, keras, Tensorflow, scikit learn and Python.
Jupyter Notebook
101
star
4

Machine-Learning-Research-Papers

A list of research papers in the domain of machine learning, deep learning and related fields.
54
star
5

Attention-Beam-Image-Captioning

Image captioning using beam search heuristic on top of the encoder-decoder based architecture
Jupyter Notebook
11
star
6

Chess-AI

A Java Project which implements playing chess with the computer which uses Alpha-Beta Pruning.
Java
9
star
7

Reinforcement-Learning

Implementation and Notes of different Reinforcement Learning Algorithms
Jupyter Notebook
8
star
8

Simulated-Self-Driving-Car

Self driving car running over udacity's "unity car simulator" using Convolutional neural networks.
Python
8
star
9

CompetitiveProgrammingInPython

Programs of Competitive Programming practice in python
Python
7
star
10

Quick-Draw

Implementation of Google Quick Draw doodle recognition game in PyTorch and comparing other classifiers and features.
Jupyter Notebook
5
star
11

Neural-Networks-Bike-Sharing-Prediction

Build a Neural Network from scratch to predict bike rentals daily on an hourly basis
Jupyter Notebook
4
star
12

AngularJSPractice

Practice of AngularJS concepts and making Projects on AngularJS
JavaScript
3
star
13

C-and-CPP-Algorithms-DataStructures

Programs made in C or C++ programming language based mostly on data structures and algorithms and competitive programming.
C
3
star
14

SML-Malaria-Detection

Compare Naive Bayes, SVM, XGBoost, Bagging, AdaBoost, K-Nearest Neighbors, Random Forests for classification of Malaria Cells
Jupyter Notebook
3
star
15

CNN-Dog-Breed-Classifier

CNN implementation in PyTorch to identify dog's breed from given image. If supplied an image of a human face, the code will identify the resembling dog breed.
Jupyter Notebook
2
star
16

ProjectBucket_SIH

Building application for social sharing of ideas and question answer forum
TypeScript
2
star
17

GANs-Generate-Faces

Used Generative Adversarial Networks (GANs) to generate new images of human faces.
Jupyter Notebook
2
star
18

Collaboration_Competition_Udacity_DRLND_P3

Project 3: done as part of the Udacity Deep Reinforcement Learning Nanodegree
Jupyter Notebook
2
star
19

CompetitiveProgrammingInJava

Contains codes written on competitive websites in practice and competitions
Java
2
star
20

NodeJS_Practice

Practice on Node.js (Javascript Framework)
JavaScript
2
star
21

IBMCognitiveChatBot

Topcoder coding challenege to build prototype for IBMCognitiveChatBot using angular 4
TypeScript
2
star
22

Amazon-Alexa-Skills

Amazon Alexa Skills made using Alexa Skills Kit and AWS Lambda function
JavaScript
1
star
23

HybridChatApp

A Hybrid Mobile Chat Application made in Ionic Cordova Framework
JavaScript
1
star
24

Continuous_Control_Udacity_DRLND_P2

Project 2: done as part of the Udacity Deep Reinforcement Learning Nanodegree
Jupyter Notebook
1
star
25

MiniTennis

A small game made in Java similar to pong.
Java
1
star
26

InterviewPreparationInJava

Java
1
star
27

Hospital_Patient_Management_System

Infosys Chandigarh Hackathon 2017
JavaScript
1
star
28

BankManagementSystem

A database management system representing features of a bank. Made using core java features such as JFrame, Panels etc.
Java
1
star