Skip to content

Latest commit

 

History

History
80 lines (51 loc) · 1.45 KB

Setup.md

File metadata and controls

80 lines (51 loc) · 1.45 KB

Installation

Docker Installation

Openface Installation

[sudo] docker pull bamos/openface

Create a local directory

cd ~

mkdir facenet
cd facenet

git clone https://github.com/cmusatyalab/openface

Creating a Classification Model

Create a directory for your raw images so that images from different people are in different subdirectories

mkdir -p data/raw

In directory raw, structure faces of persons as follows

person-1
├── image-1.jpg
├── image-2.png
...
└── image-p.png

...

person-m
├── image-1.png
├── image-2.jpg
...
└── image-q.png

Start Openface docker container

[sudo] docker run --privileged  -v /home/USERNAME/facenet:/root/openface -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bash

cd root/facenet

Detect, Align and Train

openface/./util/align-dlib.py data/raw align outerEyesAndNose data/aligned --size 96

openface/./batch-represent/main.lua -outDir data/feature -data data/aligned

openface/./demos/classifier.py train data/feature

Test Unknown images

Put unknown images in data/test

openface/./demos/classifier.py infer data/feature/classifier.pkl data/test/*