• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated 9 months ago

Reviews

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

Repository Details

Identify faces from video and images using OpenCV and Deep Learning

Face Recognition using OpenCV

  • Create dataset of face images
    • Detect faces using deploy.prototxt and res10_300x300_ssd_iter_140000.caffemodel. (Learn more about face detection)
  • Extract face embeddings for each face present in the image using pretrained OpenFace model openface_nn4.small2.v1.t7.
  • Train a SVM model on the face embeddings to recognize faces

Overview of OpenFace for a single input image

  1. Detect faces with a pre-trained models from dlib or OpenCV.
  2. Transform the face for the neural network. This repository uses dlib's real-time pose estimation with OpenCV's affine transformation to try to make the eyes and bottom lip appear in the same location on each image.
  3. Use a deep neural network to represent (or embed) the face on a 128-dimensional unit hypersphere. The embedding is a generic representation for anybody's face. Unlike other face representations, this embedding has the nice property that a larger distance between two face embeddings means that the faces are likely not of the same person. This property makes clustering, similarity detection, and classification tasks easier than other face recognition techniques where the Euclidean distance between features is not meaningful.
  4. Apply clustering or classification techniques to the features to complete the face recognition task.

Read more about OpenFace Working of OpenCV Face detector

Getting Started

How to use

git clone https://github.com/aakashjhawar/face-recognition-using-opencv
cd face-recognition-using-opencv
  • Create dataset of face images.
  • Place the face images in dataset folder.
  • Extract facial embeddings. python extract_embeddings.py
  • Train the SVM model python train_model.py
  • Test the model python recognize_video.py

Prerequisites

  • Python 3.5
  • OpenCV
sudo apt-get install python-opencv

Results

Detect and recognize faces from video camera-

Result

More Repositories

1

AvatarGAN

Generate Cartoon Images using Generative Adversarial Network
Jupyter Notebook
61
star
2

SolveSudoku

Extract and solve sudoku from an image using Computer Vision and Deep Learning
Python
55
star
3

dress-pattern-recognition-using-CNN

An image recognition model which is capable of identifying the pattern on a dress image
Jupyter Notebook
18
star
4

hand-gesture-recognition

Detect number of fingers from image or video using OpenCV
Jupyter Notebook
17
star
5

handwritten-digit-recognition

This project demonstrates Handwritten digit recognition using Deep Learning
Jupyter Notebook
16
star
6

AnalyticsVidhya-India-ML-Hiring-Hackathon-2019

Analytics Vidhya India ML Hiring Hackathon 2019
HTML
8
star
7

commercial-centers-using-POI

Identify commercial centers using Points of Interest (POI) data by clustering these points into commercial centers/markets
Jupyter Notebook
8
star
8

traffic-sign-detection

Traffic Sign Detection Training using YOLOv3
C
4
star
9

photo-app

Photo management app using Ruby on Rails framework
Ruby
3
star
10

face-detection

Face Detection with OpenCV and Machine Learning
Python
3
star
11

finance-tracker

A web app to track stock prices using Ruby on Rails
Ruby
3
star
12

aakashjhawar.github.io

My github page based on the Jalpc template.
HTML
1
star
13

fotobox

fotobox
Ruby
1
star
14

chat-app

A group chat web app using Ruby on Rails
Ruby
1
star
15

posts-app

An Angular app to post article and blogs
TypeScript
1
star
16

university-app

A RoR app. Students can enroll themselves in the courses
Ruby
1
star
17

Image-Watermarking

Image Watermarking using Discrete Cosine Tranformation
MATLAB
1
star
18

twitter-sentiment-analysis

Sentiment analysis of tweets to detect negative tweets.
Jupyter Notebook
1
star
19

Tachometer

Developed a device using Arduino which can calculate object’s revolving speed.
C++
1
star
20

ems

Employee Management System using AngularJS
TypeScript
1
star