]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blobdiff - print-test-results
Add NVTX markers to the code
[hercules2020/kcf.git] / print-test-results
index 57aefbc59d8a5c5bfc3149d76f99ec516a964e55..4b9b1953926d3454c769ab30c3689aa6ff077070 100755 (executable)
@@ -3,7 +3,7 @@ set -e
 
 declare -A expected_accuracy
 
-expected_accuracy=([bag]=0.53 [ball1]=0.70 [car1]=0.35 [book]=0.19
+expected_accuracy=([bag]=0.53 [ball1-correct]=0.70 [ball1]=0.35 [car1]=0.35 [book]=0.19
                   [bmx]=0.45 [crossing]=0.72 [racing]=0.52)
 
 for i in "$@"; do
@@ -12,8 +12,9 @@ for i in "$@"; do
     flags=${BASH_REMATCH[3]}
     seq=${BASH_REMATCH[2]}
 
-    result=$(grep 'Average accuracy:' $i || :)
-    if [[ "$result" =~ Average\ accuracy:\ ([0-9.]+) ]]; then
+    result=$(grep 'Average accuracy:' $i | sed -e 's/Average/Avg./g' -e 's/processing //' || :)
+    if [[ "$result" =~ accuracy:\ ([0-9.]+) ]]; then
+       result+=" >= ${expected_accuracy[$seq]}"
        if [[ $(echo "${BASH_REMATCH[1]} >= ${expected_accuracy[$seq]:-0}"|bc) -eq 1 ]]; then
            status=ok
        else
@@ -22,5 +23,5 @@ for i in "$@"; do
     else
        status=FAILED
     fi
-    echo ! "$seq;$flags;$build;$result >= ${expected_accuracy[$seq]};$status"
-done | sort | column -t -s";"
+    echo ! "$seq;$flags;$build;$result;$status"
+done | sort -t";" $SORT_FLAGS | column -t -s";"