Abi-Humanoid / Face_ID

Facial detection neural network to detect specific faces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Face recognition

This example demonstrates the Gen2 Pipeline Builder running face detection network, head posture estimation network and face recognition network

Usage

usage: main.py [-name NAME]

optional arguments:
  -name, --name     Name of the person for database saving [Optional]

Before this example works, you have to "teach" it what face to associate with which name:

  1. Run python3 main.py --name JohnDoe. Then you should face the camera to JohnDoe from different angles, so he will later be recognized from different angles as well. This will just save (his) face vectors to the person's databse (in this case JohnDoe.npz).
  2. Repeat step 1 for other people you would like to recognize
  3. Run python3 main.py for face recognition demo. Whenever the device sees a new face, it will calculate the face vector (arcface NN model) and it will get compared with other vectors from the databases (.npz) using cosine distance.

How it works:

1. Run the face detection model

Run the face-detection-retail-0004 model to detect the face in the image and intercept the facial image.

detection_face

2. Run head-pose-estimation model

Run the head-pose-estimation-adas-0001 model to Detect head tilt angle and adjust head posture.

face_corr

3. Run face recognition model

Run the face-recognition-mobilefacenet-arcface.blob model to Recognize the face.

face_reg


Pre-requisites

Install requirements

python3 -m pip install -r requirements.txt

About

Facial detection neural network to detect specific faces


Languages

Language:Python 100.0%