Download a facetools dataset from http://www.idiap.ch/~marcel/Databases/frontalfaces/main.html

> tar -zxvf datafacetools.tar.gz

#
# Extract frontal faces

> faceExtract -facemodel 3 -postype 2 -oneface -savebin 1001.bindata data/frontal/1001_f_g1_s01_1001_en_1.jpeg data/frontal/1001_f_g1_s01_1001_en_1.pos
> bindata2pgm 1001.bindata 64 80
> ls *.pgm
> binfacenormalize 1001.bindata 64 80 -o 1001.norm.bindata
> bindata2pgm 1001.norm.bindata 64 80
> ls *.pgm

#
# Extract non frontal faces

> faceExtract data/nonfrontal22.5/01_05_02.ppm data/nonfrontal22.5/01_05_02.pos -facemodel 2 -pan 1 -postype 4 -oneface -draw -savebin face.bindata -verbose
> bindata2pgm face.bindata 19 19
> ls *.pgm
> ee output.ppm

> faceExtract data/nonfrontal45/15_N_W_37.ppm  data/nonfrontal45/15_N_W_37.pos  -facemodel 2 -pan 2 -postype 5 -oneface -draw -savebin face.bindata -verbose
> bindata2pgm face.bindata 19 19
> ls *.pgm
> ee output.ppm

> faceExtract data/nonfrontal67.5/15_N_W_02.ppm data/nonfrontal67.5/15_N_W_02.pos -facemodel 2 -pan 3 -postype 5 -oneface -draw -savebin face.bindata -verbose
> bindata2pgm face.bindata 19 19
> ls *.pgm
> ee output.ppm

> faceExtract data/nonfrontal90/21_22_12.ppm data/nonfrontal90/21_22_12.pos -facemodel 2 -pan 4 -postype 6 -oneface -draw -savebin face.bindata -verbose
> bindata2pgm face.bindata 19 19
> ls *.pgm
> ee output.ppm

#
# Compare 2 bounding boxes using Jesorsky measure
testJesorsky ../data/003_1_1.pos 245 254 209 209 -verbose
testJesorsky ../data/003_1_1.pos 240 250 212 212 -verbose

testJesorsky ../data/004_1_1.pos 237 195 229 305 -facemodel 1 -verbose
testJesorsky ../data/012_1_1.pos 270 183 201 268 -facemodel 1 -verbose
testJesorsky ../data/003_1_1.pos 270 183 201 268 -facemodel 1 -jesorsky 0.5 -verbose


#
# Evaluate face detection/localization performance

# compares gt to gt
> jesorsky data/xm2vts/gtpos.list data/xm2vts/gtpos.list -gtoneface -oneface

Final result:
   GT Faces : 5
   Detected Faces : 5.000000
   Percentage of detections : 100.000000
   Number of GT faces non detected (missed) : 0
   Number of non-faces detected as faces (FA) : 0

# compares gt to detections
> jesorsky data/xm2vts/gtpos.list data/xm2vts/pos.list -gtoneface -rect

Final result:
   GT Faces : 5
   Detected Faces : 5.000000
   Percentage of detections : 100.000000
   Number of GT faces non detected (missed) : 0
   Number of non-faces detected as faces (FA) : 0

> jesorsky data/cmu/gtpos.list data/cmu/pos.list -rect

Final result:
   GT Faces : 47
   Detected Faces : 39.000000
   Percentage of detections : 82.978722
   Number of GT faces non detected (missed) : 8
   Number of non-faces detected as faces (FA) : 26

> jesorsky data/cmu/A-gtpos.list data/cmu/A-pos.list -rect

Final result:
   GT Faces : 169
   Detected Faces : 125.000000
   Percentage of detections : 73.964500
   Number of GT faces non detected (missed) : 44
   Number of non-faces detected as faces (FA) : 152

> jesorsky data/cmu/B-gtpos.list data/cmu/B-pos.list -rect

Final result:
   GT Faces : 157
   Detected Faces : 119.000000
   Percentage of detections : 75.796181
   Number of GT faces non detected (missed) : 38
   Number of non-faces detected as faces (FA) : 72