Code Monkey home page Code Monkey logo

face-recognition-dlib's Introduction

Face Recognition (Dlib)

built with Python3 ย ย  built with Dlib ย ย  Platforms

Recognizes people from video using dlib's state-of-the-art face recognition built with deep learning. This is revised model of face_recognition which works on live video or live stream from drone. Dlib's accuracy is much more than openCV recognition models. (Almost 98% accurate)

Installation:

1. git clone https://github.com/thirstycode/face-recognition-drone-dlib/
2. cd face-recognition-drone-dlib
3. pip3 install -r requirements.txt
  1. Install dlib
5. pip3 install dlib
6. pip3 install face_recognition

Note:

  • There are two models included in here. 1. Normal model 2. Knn model
    • Normal model : It is normal model that use 1 image of user to train the face recognition.
    • Knn model (Works on Euclidean distance) : Uses as many as images to train the model , so that it can be better in accuracy. This model is 2-4 times slower than normal model.
  • There is status of every person's data . Vip status persons will be shown in green & Blacklisted in red & undetected in white
  • Have a look at error1.txt in errors folder before using normal model.

How to add training data ? :

  • Normal Model : Add new folder in 'train-images' folder and name it as s3 , s4 etc etc (it depends on how much person's data you have added). Add only 1 image of person in respective folder and add name.txt having name and status.txt having status i.e vip/blacklisted.
  • Knn model : Add new folder in 'knn-train' folder , named as the person's name. Add as much as person's photos in respective folder and make status.txt

Execute It:

For normal model
1. python3 webcam.py
2. python3 drone.py
For knn model
1. python3 webcam_knn.py
2. python3 drone_knn.py
To check on image with normal model
Make sure to open image_test and give path to your image
1. python3 image_test.py

Adjustments for best results:

  • Normal model : Edit variables in config.py (All the working of respective variables are given itself in config.py)
  • Knn model : Edit variables in config_knn.py (All the working of respective variables are given itself in config_knn.py)

Live stream :

  • Insert live stream url in config.py/config_knn.py to use drone.py

Reports of images :

  • All checked images are saved in 'reports' folder.

Improvements and futures :

  • Can be used with cuda of nvidia for parallel computation in gpu to have faster processing.
  • Thus we can process whole video as processing will be accompanied by powerful nvidia graphic cards.

Special Thanks To :

  • Adam Geitgey who made face_recognition module to make things connecting with dlib.

Having issues in code? :

  • Feel free to create an issue in repo. I'll be happy to help you ๐Ÿ˜ƒ

face-recognition-dlib's People

Contributors

thirstycode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

bhakunikaran

face-recognition-dlib's Issues

Confusion

Hello I need real time face recognition. SO, how to start run first file i have confused so , please guide me

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.