]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blob - print-test-results
cmake: Compile CUDA version without intermediate kcfcuda library
[hercules2020/kcf.git] / print-test-results
1 #!/bin/bash
2 set -e
3
4 declare -A expected_accuracy
5
6 expected_accuracy=([bag]=0.53 [ball1-correct]=0.70 [ball1]=0.35 [car1]=0.35 [book]=0.19
7                    [bmx]=0.45 [crossing]=0.72 [racing]=0.52)
8
9 for i in "$@"; do
10     [[ "$i" =~ build-(.*)/kcf_vot-(.*)-(.*).log ]]
11     build=${BASH_REMATCH[1]}
12     flags=${BASH_REMATCH[3]}
13     seq=${BASH_REMATCH[2]}
14
15     result=$(grep 'Average accuracy:' $i || :)
16     if [[ "$result" =~ Average\ accuracy:\ ([0-9.]+) ]]; then
17         if [[ $(echo "${BASH_REMATCH[1]} >= ${expected_accuracy[$seq]:-0}"|bc) -eq 1 ]]; then
18             status=ok
19         else
20             status=ACCURACY
21         fi
22     else
23         status=FAILED
24     fi
25     echo ! "$seq;$flags;$build;$result >= ${expected_accuracy[$seq]};$status"
26 done | sort | column -t -s";"