Skip to content
Switch branches/tags


Failed to load latest commit information.

Facial Recognition πŸ§” πŸ”

This code helps in facial recognition using facenets ( The concept of facenets was originally presented in a research paper. The main concepts talked about triplet loss function to compare images of different person. This concept uses inception network which has been taken from source and is taken from for reference. I have added several functionalities of my own for providing stability and better detection.

Code Requirements πŸ¦„

You can install Conda for python which resolves all the dependencies for machine learning.

pip install requirements.txt

Description πŸ•΅οΈβ€β™‚οΈ

A facial recognition system is a technology capable of identifying or verifying a person from a digital image or a video frame from a video source. There are multiples methods in which facial recognition systems work, but in general, they work by comparing selected facial features from given image with faces within a database.

Functionalities added 🧟

  1. Detecting face only when your eyes are opened. (Security measure)
  2. Using face align functionality from dlib to predict effectively while live streaming.

Python Implementation πŸ‘¨β€πŸ”¬

  1. Network Used- Inception Network
  2. Original Paper - Facenet by Google

If you face any problem, kindly raise an issue

File Organization πŸ—„οΈ

β”œβ”€β”€ Facial-Recognition-using-Facenet (Current Directory)
    β”œβ”€β”€ models : Saved Models
        β”œβ”€β”€ face-rec_Google.h5 : Facenet Model 
        └── shape_predictor_68_face_landmarks.dat : Facial Keypoints Model
    β”œβ”€β”€ utils : Utils Folder
    β”œβ”€β”€ : Store the faces for module
    β”œβ”€β”€ - Main Application
    β”œβ”€β”€ : Model Trainer
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ requirements.txt

Setup πŸ–₯️

  1. If you want to train the network , run, however you don't need to do that since I have already trained the model and saved it as face-rec_Google.h5 file which gets loaded at runtime.
  2. Now you need to have images in your database. The code check /images folder for that. You can either paste your pictures there or you can click it using web cam. For doing that, run the images get stored in /incept folder. You have to manually paste them in /images folder
  3. Run for running the application.

Execution πŸ‰


Results πŸ“Š

References πŸ”±


A simple implementation of facial recognition using facenets for humans πŸ§” πŸ”








No releases published


No packages published