Facial Recognition with OpenCV

Installing Requirements

It is recommended that you create a new virtualenv when you install these packages

To install the required packages, do pip install -r requirements.txt

Extracting Facial Data

To extract facial data, create a folder called Datasets, and create individual folders inside them with the names corresponding to the facial data labels

Create another folder called output to save the pickle files with the embeddings

Run the extract_embeddings.py file to extract Facial data

python extract_embeddings.py

Training the Model

Once you've extracted the features, run the train_model.py to train your model to the dataset.

python train_model.py

Recognising Faces

After the model training, to detect faces from video, run the recognise_video.py to recognise from video

pyth0n recognise_video.py

Node Modules

To imprement this following program as a RESTFul api, cd into nodebase, follow all the steps until `Recognise faces`. Instead, first install the dependencies i.e

npm i express

then do

npm index.js

to start your API