3 #########################################################################
4 # This program is free software: you can redistribute it and/or modify #
5 # it under the terms of the version 3 of the GNU General Public License #
6 # as published by the Free Software Foundation. #
8 # This program is distributed in the hope that it will be useful, but #
9 # WITHOUT ANY WARRANTY; without even the implied warranty of #
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
11 # General Public License for more details. #
13 # You should have received a copy of the GNU General Public License #
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
16 # Written by Francois Fleuret #
17 # (C) Idiap Research Institute #
19 # Contact <francois.fleuret@idiap.ch> for comments & bug reports #
20 #########################################################################
22 echo "Parsing the log files"
25 grep ^INFO results/${p}-*/log | grep "DECIMATED_FALSE_NEGATIVE_RATE\|DECIMATED_NB_FALSE_POSITIVES_PER_VGA" | \
26 sed -e "s/[^0-9A-Z_ .]//g" | \
28 if($2 == "DECIMATED_FALSE_NEGATIVE_RATE") {
33 }' | sort -g > /tmp/${p}
37 if [[ ! -s /tmp/hb ]] || [[ ! -s /tmp/h+b ]]; then
38 echo "Not enough data points." >&2
42 ######################################################################
44 echo "Generating the graph per se"
46 GRAPH_NAME="/tmp/roc.eps"
49 set terminal postscript enhanced eps "Helvetica" 20
51 set output "${GRAPH_NAME}"
53 set xlabel "Number of false alarms per 640x480"
54 set ylabel "True positive rate"
57 plot [1e-3:100][0.0:1.0] \
58 '/tmp/hb' using 2:1 title "HB" pt 7 ps 1.0 lc 1 lw 1,\
59 '/tmp/h+b' using 2:1 title "H+B" pt 7 ps 1.0 lc 3 lw 1
62 ######################################################################
64 echo "Graph saved in ${GRAPH_NAME}"