Before you start
Make sure you have python, OpenFace and dlib installed. You can either install them manually or use a preconfigured docker image that has everying already installed:
docker pull bamos/openface
docker run -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash
Make a folder called
/training-images/ somewhere on your computer.
Make a subfolder for each person you want to recognize. For example:
Copy all your images of each person into the correct sub-folders
Run the openface scripts from inside the openface root directory:
First, do pose detection and alignment:
./util/align-dlib.py ./training-images/ align outerEyesAndNose ./aligned-images/ --size 96
Second, generate the representations from the aligned images:
./batch-represent/main.lua -outDir ./generated-embeddings/ -data ./aligned-images/
When you are done, the
./generated-embeddings/ folder will contain a csv file with the embeddings for each image.