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 and (C) by Francois Fleuret #
17 # Contact <francois.fleuret@idiap.ch> for comments & bug reports #
18 #########################################################################
20 echo "Parsing the log files"
23 grep ^INFO results/${p}-*/log | grep "FALSE_NEGATIVE_RATE\|PER_VGA" | \
24 sed -e "s/[^0-9A-Z_ .]//g" | \
26 if($2 == "DECIMATED_FALSE_NEGATIVE_RATE") {
31 }' | sort -g > /tmp/${p}
35 if [[ ! -s /tmp/hb ]] || [[ ! -s /tmp/h+b ]]; then
36 echo "Not enough data points." >&2
40 ######################################################################
42 echo "Generating the graph per se"
44 GRAPH_NAME="/tmp/roc.eps"
47 set terminal postscript enhanced eps "Helvetica" 20
49 set output "${GRAPH_NAME}"
51 set xlabel "Number of false alarms per 640x480"
52 set ylabel "True positive rate"
55 plot [1e-3:100][0.0:1.0] \
56 '/tmp/hb' using 2:1 title "HB" pt 7 ps 1.0 lc 1 lw 1,\
57 '/tmp/h+b' using 2:1 title "H+B" pt 7 ps 1.0 lc 3 lw 1
60 ######################################################################
62 echo "Graph saved in ${GRAPH_NAME}"