The database initially had labels only for the detected regions of faces which is not enough for the task of recognition.
Therefore the database has to be labelled manually in a text file before proceeding with face recognition.
The following module obtains a numpy array from the text file annotation of the database.
Loads resnet model, face descriptor and detector from the data folder and return face embedding and num of faces
detected.The python file is used as a helper.
Contains code for a knn model written in Tensorflow. It can function with query descriptor or can operate with
test,train data during training time.
Manages all the tasks of training and checking accuracy for the test/train split. The program has to be run
whenever a new person has been added into the database.The vectors and labels of new person are stored data folder
Helper module that contains most of I/O tasks. This helps keep the code clean and relevant.
Should be run in production mode in a loop. The module can detect faces from given image (provided person is in database)
and manages scenarios of multiple face detections as well.
For example: If the person's images are sanjeev1.jpg,sanjeev2.jpg...
Add the following lines into faceLabels.txt:
............. , .....
sanjeev1.jpg, 25
sanjeev2.jpg, 25
Here sanjeevN.jpg is the name of the image which will be read
25 is the id associated with the person
This will the updated database : Ximages.npy, Ylabels.npy, knnData.npy in [data/]