Coder Social home page Coder Social logo

ajunlonglive / face-recognition-using-deep-learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aakashjhawar/face-recognition-using-deep-learning

0.0 0.0 0.0 81.72 MB

Identify faces from video and images using OpenCV and Deep Learning

License: MIT License

Python 100.00%

face-recognition-using-deep-learning's Introduction

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

face-recognition-using-deep-learning's People

Contributors

aakashjhawar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.