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
cd /root/openface
Make a folder called /training-images/
somewhere on your computer.
Make a subfolder for each person you want to recognize. For example:
/training-images/will-ferrell/
/training-images/chad-smith/
/training-images/jimmy-fallon/
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.
guys i am getting this error help me out
home/pi/torch/install/bin/luajit: cannot open </home/pi/openface/models/openface/nn4.small2.v1.t7> in mode r at /home/pi/torch/pkg/torch/lib/TH/THDiskFile.c:670
stack traceback:
[C]: at 0x76a23230
[C]: in function 'DiskFile'
/home/pi/torch/install/share/lua/5.1/torch/File.lua:405: in function 'load'
./batch-represent/main.lua:33: in main chunk
[C]: in function 'dofile'
...e/pi/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00014fa8