Coder Social home page Coder Social logo

ashishohri / custom_face_unlock_system Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 69.12 MB

The repository consists of a custom face recognition along with eye blink detector used as a liveliness detector.

Python 100.00%
face-recognition eye-detection opencv python3 face-detection eye-blink

custom_face_unlock_system's Introduction

Custom_Face_Unlock_System

This repository contains code for a custom face recognition implemented in python. Using the code in this repository, one can create a face recognition system having eye blink detector as an anti-spoofing method, that prevents a photo to be used as a measure to detect a face.

This code can be used to create a software as well as a hardware implementation to create a face recognition unlocking system.

Source
Source
Source
Source

Steps Involved

Run the files preferably on the command line.

  • Run pip install -r requirements.txt to install all required libraries. Check out this article to know more about requirements.txt.

  • Run python face_store_data.py. Input the name of the person of whom you are creating the dataset of images. Now, with the face recognition window as the active window, use key 'k' to cature your image when the camera recognizes your face. After capturing a good amount of photos, use key 'q' to exit.
    Advice: The more images the better ๐Ÿ“ท. Try to click atleast 50 to get a good recognition system. Also, if your camera doesn't recognize your face, invest in a better camera ๐Ÿ˜›

  • Run python train.py. Sit tight for a few seconds โ˜•

  • Run python final_code.py and VOILA! You have your own face recognition system.

Understanding and changing the code

One can change the below mentioned variables according to their needs

  • The final_code.py file consists of a variable EYE_AR_THRESHOLD that is set to 0.27 i.e. if the eye blink falls below this threshold, it will be considered as a blink.
  • The above file has variable EYE_AR_CONSEC_FRAMES set to 1 which implies that a blink must last for atleast one frame.
  • Finally, at the end of the same file, an if condition is set to check if blinks are greater than 2. If so, the code breaks out of the loop.

References

A special thanks to https://pyimagesearch.com. Their website helped a lot. Do check out their website.

custom_face_unlock_system's People

Contributors

ashishohri avatar dependabot[bot] avatar

Watchers

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