Basic Recognition and Authentication at eNtrance
A Facial recognition based identification & authentication system at KI labs.
The BRAN medium article contains more information about this project.
- About
- Introduction
- Installation
- Directory Structure
- Usage
- Encode Faces
- Detect Faces - PI mode
- Detect Faces - Local mode
- Contribution
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.
- Clone this repository
Run the following commands to:
- To navigate the root of the repository
- Install all dependent libraries and packages
$ cd BRAN
$ make setup
Add a file structure here with the basic details about files, below is an example.
.
├── Makefile
├── README.md
├── assets
│ └── logo.png
├── bran
│ ├── __init__.py
│ ├── __main__.py
│ ├── blink
│ │ ├── __init__.py
│ │ └── blink_detection.py
│ ├── cross_validation
│ │ ├── __init__.py
│ │ ├── cross_val.py
│ │ └── plot.py
│ ├── detect
│ │ ├── __init__.py
│ │ └── face_detection.py
│ ├── encode
│ │ ├── __init__.py
│ │ └── encode_faces.py
│ └── models
│ ├── __init__.py
│ ├── distances.py
│ └── train_and_save_custom.py
├── dataset
│ └── M\ S\ Shankar
├── encodings.pickle
├── haarcascade_frontalface_default.xml
├── models
│ ├── log.pickle
│ └── mlp.pickle
├── requirements.txt
├── setup.py
└── shape_predictor_68_face_landmarks.dat
bran encode --dataset dataset --encodings encodings.pickle --detection-method hog
bran encode --dataset dataset --encodings encodings.pickle --detection-method cnn
bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_vote -t 0.5 -f
bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_avg -t 0.5 -f
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
bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_vote -t 0.5
bran detect -c haarcascade_frontalface_default.xml -e encodings.pickle -p shape_predictor_68_face_landmarks.dat -m dist_avg -t 0.5
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
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.
-
Report a bug
If you think you have encountered a bug, and we should know about it, feel free to report it here. -
Request a feature
You could also request for a feature here. -
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.