Giter Site home page Giter Site logo

webstorage119 / windows-hello-feature-using-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mohak-acharya/windows-hello-feature-using-python

0.0 0.0 0.0 13.97 MB

Unlocking PC using face recognition using opencv (a python library)

Python 98.04% Batchfile 1.96%

windows-hello-feature-using-python's Introduction

Windows Hello feature using Python

Unlock your PC using your face

This project is developed for those PC and laptops which are not compatible for Windows Hello because they lack proper IR camera.

After properly setting all the requirements your laptop will be able to recognize difference between you and any other person and will unlock/lock itself accordingly. It will also greet you after your authorization.

Requirements

  • Proper Web camera
  • Python 3 or any higher version
  • Python Modules
    • OpenCV
    • Numpy
    • Pillow
    • pyautogui
    • Some other requirements are mentioned in requirements.txt

Working

Program has been divided into three scripts :

  • database.py - This script will create a dataset of your face by capturing your 300 photos and will store them in dataset folder.

    Note:-Make sure you give different facial expressions so that model can be trained efficiently.

  • training.py - From previously created dataset folder this python script will train your model so that next time your laptop/PC can recognize you. This is acheived by using train() function from opencv library.

  • recognizer.py - This is the main script that identifies your face in real-time. It will check whether the model is trained for this face and if the face seems to be unknown then it will lock your machine.

  • script_runner.bat - This is a bat file that will run your script through cmd, provided path to your python interpreter is properly set.

Note:- In all these python scripts and script_runner.bat, make sure that you set the path according to your PC.(i.e. Changing address of python.exe in bat file as path may differ in your machine)

How to Setup?

  • Download the files to fixed location.
  • Install the requirements using pip install -r requirements.txt
  • Compile database.py and make sure that dataset folder is created.
  • Now compile training.py and check whether .yml file is created.
  • Change script's name in .bat file to recognizer.py and run .bat file. This will run recognizer.py as mentioned above.
  • In order to make this file run everytime on log on you need to set up a task using Windows Task Scheduler. For this create a task, click on New in Triggers Tab and select 'On workstation Unlock', now select 'Start a Program' from Action Tab and browse for your .bat file.
  • If done properly your PC would have now a custom Windows Hello feature.

windows-hello-feature-using-python's People

Contributors

mohak-acharya 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.