3 ########################################################################
5 # folded-ctf is an implementation of the folded hierarchy of #
6 # classifiers for object detection, developed by Francois Fleuret #
9 # Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/ #
10 # Written by Francois Fleuret <francois.fleuret@idiap.ch> #
12 # This file is part of folded-ctf. #
14 # folded-ctf is free software: you can redistribute it and/or modify #
15 # it under the terms of the GNU General Public License version 3 as #
16 # published by the Free Software Foundation. #
18 # folded-ctf is distributed in the hope that it will be useful, but #
19 # WITHOUT ANY WARRANTY; without even the implied warranty of #
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
21 # General Public License for more details. #
23 # You should have received a copy of the GNU General Public License #
24 # along with folded-ctf. If not, see <http://www.gnu.org/licenses/>. #
26 ########################################################################
28 GRAPH_NAME="/tmp/roc.eps"
30 #########################################################################
32 echo "Parsing the log files."
35 grep ^INFO results/${p}-*/log | \
37 if($2 == "DECIMATED_FALSE_NEGATIVE_RATE") {
39 } else if($2 == "DECIMATED_NB_FALSE_POSITIVES_PER_VGA") {
42 }' | sort -g > /tmp/${p}
44 if [[ ! -s /tmp/${p} ]]; then
45 echo "Not enough data points for ${p}." >&2
50 ######################################################################
52 echo "Generating the graph per se."
55 set terminal postscript enhanced eps "Helvetica" 20
57 set output "${GRAPH_NAME}"
59 set xlabel "Number of false alarms per 640x480"
60 set ylabel "True positive rate"
63 plot [1e-3:100][0.0:1.0] \
64 '/tmp/hb' using 2:1 title "HB" pt 7 ps 1.0 lc 1 lw 1,\
65 '/tmp/h+b' using 2:1 title "H+B" pt 7 ps 1.0 lc 3 lw 1
68 ######################################################################
70 echo "Graph saved in ${GRAPH_NAME}"