Update docs with new align-dlib interface.
This commit is contained in:
parent
b9c848c8a2
commit
af575bdb72
|
@ -21,10 +21,10 @@ in `./data/lfw/raw` and `./data/lfw/deepfunneled`.
|
|||
1. Install prerequisites as below.
|
||||
2. Preprocess the raw `lfw` images, change `8` to however many
|
||||
separate processes you want to run:
|
||||
`for N in {1..8}; do ./util/align-dlib.py data/lfw/raw align affine data/lfw/dlib-affine-sz:96 --size 96 & done`.
|
||||
`for N in {1..8}; do ./util/align-dlib.py data/lfw/raw align innerEyesAndBottomLip data/lfw/dlib-affine-sz:96 --size 96 & done`.
|
||||
Fallback to deep funneled versions for images that dlib failed
|
||||
to align:
|
||||
`./util/align-dlib.py data/lfw/raw align affine data/lfw/dlib-affine-sz:96 --size 96 --fallbackLfw data/lfw/deepfunneled`
|
||||
`./util/align-dlib.py data/lfw/raw align innerEyesAndBottomLip data/lfw/dlib-affine-sz:96 --size 96 --fallbackLfw data/lfw/deepfunneled`
|
||||
3. Generate representations with `./batch-represent/main.lua -outDir evaluation/lfw.nn4.v1.reps -model models/openface/nn4.v1.t7 -data data/lfw/dlib-affine-sz:96`
|
||||
4. Generate the ROC curve from the `evaluation` directory with `./lfw-roc.py --workDir lfw.nn4.v1.reps`.
|
||||
This creates `roc.pdf` in the `lfw.nn4.v1.reps` directory.
|
||||
|
|
|
@ -41,7 +41,7 @@ person-m
|
|||
### 2. Preprocess the raw images
|
||||
Change `8` to however many
|
||||
separate processes you want to run:
|
||||
`for N in {1..8}; do ./util/align-dlib.py <path-to-raw-data> align affine <path-to-aligned-data> --size 96 & done`.
|
||||
`for N in {1..8}; do ./util/align-dlib.py <path-to-raw-data> align innerEyesAndBottomLip <path-to-aligned-data> --size 96 & done`.
|
||||
|
||||
### 3. Generate Representations
|
||||
`./batch-represent/main.lua -outDir <feature-directory> -data <path-to-aligned-data>`
|
||||
|
@ -92,3 +92,16 @@ Run the classifier on your images with:
|
|||
| Adams | <img src='https://raw.githubusercontent.com/cmusatyalab/openface/master/images/examples/adams.jpg' width='200px'></img> | AmyAdams | 0.98 |
|
||||
| Lennon 1 (Unknown) | <img src='https://raw.githubusercontent.com/cmusatyalab/openface/master/images/examples/lennon-1.jpg' width='200px'></img> | DavidBoreanaz | 0.27 |
|
||||
| Lennon 2 (Unknown) | <img src='https://raw.githubusercontent.com/cmusatyalab/openface/master/images/examples/lennon-2.jpg' width='200px'></img> | DavidBoreanaz | 0.43 |
|
||||
|
||||
# Minimal Working Example to Extract Features
|
||||
|
||||
```
|
||||
openface(master*)$ mkdir -p classify-test/raw/{lennon,clapton}
|
||||
openface(master*)$ cp images/examples/lennon-* classify-test/raw/lennon
|
||||
openface(master*)$ cp images/examples/clapton-* classify-test/raw/clapton
|
||||
openface(master*)$ ./util/align-dlib.py classify-test/raw align innerEyesAndBottomLip classify-test/aligned --size 96
|
||||
openface(master*)$ ./batch-represent/main.lua -outDir classify-test/features -data classify-test/aligned
|
||||
...
|
||||
nImgs: 4
|
||||
Represent: 4/4
|
||||
```
|
||||
|
|
|
@ -46,7 +46,7 @@ person-m
|
|||
## 2. Preprocess the raw images
|
||||
Change `8` to however many
|
||||
separate processes you want to run:
|
||||
`for N in {1..8}; do ./util/align-dlib.py <path-to-raw-data> align affine <path-to-aligned-data> --size 96 & done`.
|
||||
`for N in {1..8}; do ./util/align-dlib.py <path-to-raw-data> align innerEyesAndBottomLip <path-to-aligned-data> --size 96 & done`.
|
||||
Prune out directories with less than N (I use 10) images
|
||||
per class with `./util/prune-dataset.py <path-to-aligned-data> --numImagesThreshold <N>` and
|
||||
then split the dataset into `train` and `val` subdirectories
|
||||
|
|
|
@ -46,7 +46,7 @@ person-m
|
|||
## 2. Preprocess the raw images
|
||||
Change `8` to however many
|
||||
separate processes you want to run:
|
||||
`for N in {1..8}; do ./util/align-dlib.py <path-to-raw-data> align affine <path-to-aligned-data> --size 96 & done`.
|
||||
`for N in {1..8}; do ./util/align-dlib.py <path-to-raw-data> align innerEyesAndBottomLip <path-to-aligned-data> --size 96 & done`.
|
||||
|
||||
## 3. Generate Representations
|
||||
`./batch-represent/main.lua -outDir <feature-directory> -data <path-to-aligned-data>`
|
||||
|
|
Loading…
Reference in New Issue