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 GRAPH_NAME="/tmp/roc.eps"
24 #########################################################################
26 echo "Parsing the log files."
29 grep ^INFO results/${p}-*/log | \
31 if($2 == "DECIMATED_FALSE_NEGATIVE_RATE") {
33 } else if($2 == "DECIMATED_NB_FALSE_POSITIVES_PER_VGA") {
36 }' | sort -g > /tmp/${p}
38 if [[ ! -s /tmp/${p} ]]; then
39 echo "Not enough data points for ${p}." >&2
44 ######################################################################
46 echo "Generating the graph per se."
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}"