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 as published #
16 # by the Free Software Foundation, either version 3 of the License, #
17 # or (at your option) any later version. #
19 # folded-ctf is distributed in the hope that it will be useful, but #
20 # WITHOUT ANY WARRANTY; without even the implied warranty of #
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
22 # General Public License for more details. #
24 # You should have received a copy of the GNU General Public License #
25 # along with folded-ctf. If not, see <http://www.gnu.org/licenses/>. #
27 ########################################################################
29 GRAPH_NAME="/tmp/roc.eps"
31 #########################################################################
33 echo "Parsing the log files."
36 grep ^INFO results/${p}-*/log | \
38 if($2 == "DECIMATED_FALSE_NEGATIVE_RATE") {
40 } else if($2 == "DECIMATED_NB_FALSE_POSITIVES_PER_VGA") {
43 }' | sort -g > /tmp/${p}
45 if [[ ! -s /tmp/${p} ]]; then
46 echo "Not enough data points for ${p}." >&2
51 ######################################################################
53 echo "Generating the graph per se."
56 set terminal postscript enhanced eps "Helvetica" 20
58 set output "${GRAPH_NAME}"
60 set xlabel "Number of false alarms per 640x480"
61 set ylabel "True positive rate"
64 plot [1e-3:100][0.0:1.0] \
65 '/tmp/hb' using 2:1 title "HB" pt 7 ps 1.0 lc 1 lw 1,\
66 '/tmp/h+b' using 2:1 title "H+B" pt 7 ps 1.0 lc 3 lw 1
69 ######################################################################
71 echo "Graph saved in ${GRAPH_NAME}"