Commit 2ca2ed58611a2c1e0ae8fb16ca7fcc7cfd543507
1 parent
e418200f
Add a script running FaceRecognition using the LFW protocol
Rscript will actually crash partway through writing the output pdf, presumably because the recognition curves are degeenrate in this case.
Showing
1 changed file
with
26 additions
and
0 deletions
scripts/evalFaceRecognition-LFW.sh
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +ALGORITHM=FaceRecognition | ||
| 4 | + | ||
| 5 | +if [ ! -f evalFaceRecognition-LFW.sh ]; then | ||
| 6 | + echo "Run this script from the scripts folder!" | ||
| 7 | + exit | ||
| 8 | +fi | ||
| 9 | + | ||
| 10 | +if ! hash br 2>/dev/null; then | ||
| 11 | + echo "Can't find 'br'. Did you forget to build and install OpenBR? Here's some help: http://openbiometrics.org/doxygen/latest/installation.html" | ||
| 12 | + exit | ||
| 13 | +fi | ||
| 14 | + | ||
| 15 | +# Get the data | ||
| 16 | +./downloadDatasets.sh | ||
| 17 | + | ||
| 18 | +if [ ! -e Algorithm_Dataset ]; then | ||
| 19 | + mkdir Algorithm_Dataset | ||
| 20 | +fi | ||
| 21 | + | ||
| 22 | +# Run the LFW test protocol | ||
| 23 | +br -useGui 0 -algorithm $ALGORITHM -path ../data/LFW/img/ -crossValidate 10 -pairwiseCompare ../data/LFW/sigset/test_image_restricted_target.xml ../data/LFW/sigset/test_image_restricted_query.xml ${ALGORITHM}_LFW.mtx -convert Output ${ALGORITHM}_lfw.mtx Algorithm_Dataset/${ALGORITHM}_LFW%1.eval | ||
| 24 | + | ||
| 25 | +# Plot results | ||
| 26 | +br -useGui 0 -plot Algorithm_Dataset/* 'lfw_results.pdf[smooth=Dataset,rocOptions[yLimits=(0,1)]]' |