项目作者: KI-labs

项目描述 :
BRAN (Basic Recognition and Authentication at eNtrance) - A Facial recognition based identification & authentication system mounted at KI labs office entrance in Munich (https://www.ki-labs.com)
高级语言: Python
项目地址: git://github.com/KI-labs/BRAN.git
创建时间: 2019-09-25T14:24:36Z
项目社区:https://github.com/KI-labs/BRAN

开源协议:

下载


BRAN

GitHub license

Basic Recognition and Authentication at eNtrance

alt text

A Facial recognition based identification & authentication system at KI labs.

gif

Index

Introduction

BRAN is an identification and authentication system mounted at the entrance of our cool KI labs office, here in Munich.

BRAN uses some of the popular facial recognition algorithms in order to identify and allow authorized personnel into our office premises.

BRAN in essence, consists of these components:

  • Raspberry Pi Model 3B+
  • Basic Pi Camera Module (5MP) - to stream in the video captured at the entrance
  • OpenCV based facial recognition
  • Hodor - Our existing door opening application

BRAN is also our first attempt at understanding and evaluating simple facial detection algorithms such as Haar Cascade Classifiers to more complex ones such as HOG, Linear SVM and CNNs.

Installation

  • Clone this repository

Run the following commands to:

  • To navigate the root of the repository
  • Install all dependent libraries and packages

Commands

  1. $ cd BRAN
  1. $ make setup

Directory Structure

Add a file structure here with the basic details about files, below is an example.

  1. .
  2. ├── Makefile
  3. ├── README.md
  4. ├── assets
  5. └── logo.png
  6. ├── bran
  7. ├── __init__.py
  8. ├── __main__.py
  9. ├── blink
  10. ├── __init__.py
  11. └── blink_detection.py
  12. ├── cross_validation
  13. ├── __init__.py
  14. ├── cross_val.py
  15. └── plot.py
  16. ├── detect
  17. ├── __init__.py
  18. └── face_detection.py
  19. ├── encode
  20. ├── __init__.py
  21. └── encode_faces.py
  22. └── models
  23. ├── __init__.py
  24. ├── distances.py
  25. └── train_and_save_custom.py
  26. ├── dataset
  27. └── M\ S\ Shankar
  28. ├── encodings.pickle
  29. ├── haarcascade_frontalface_default.xml
  30. ├── models
  31. ├── log.pickle
  32. └── mlp.pickle
  33. ├── requirements.txt
  34. ├── setup.py
  35. └── shape_predictor_68_face_landmarks.dat

Usage

Encode Faces

Hog method

  1. bran encode --dataset dataset --encodings encodings.pickle --detection-method hog

CNN method

  1. bran encode --dataset dataset --encodings encodings.pickle --detection-method cnn

Detect Faces - PI Mode

Euclidean Distance - Maximum Votes

  1. bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_vote -t 0.5 -f

Euclidean Distance - min(Average Euclidean Distance)

  1. bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_avg -t 0.5 -f

Custom Model (Multi-layer perceptrons/ DNNs)

  1. bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m custom -k models/mlp.pickle -t 0.9 -f

Detect Faces - Local Mode

Euclidean Distance - Maximum Votes

  1. bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_vote -t 0.5

Euclidean Distance - min(Average Euclidean Distance)

  1. bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_avg -t 0.5

Custom Model (Multi-layer perceptrons/ DNNs)

  1. bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m custom -k models/mlp.pickle -t 0.9

Contribution

BRAN is only a hackathon project and a brief glimpse of what could be achieved using some of the interesting concepts and algorithms in computer vision.

Therefore, any sort of suggestions, feedbacks and contributions are also always welcome and appreciated.

Please take note of the following things if you wish to contribute to this project.

  1. Report a bug

    If you think you have encountered a bug, and we should know about it, feel free to report it here.

  2. Request a feature

    You could also request for a feature here.

  3. Create a pull request

    It can’t get better then this, your pull request will be appreciated by the community. You can get started by picking up any open issues from here and make a pull request.