initial
This commit is contained in:
23
test.sh
Executable file
23
test.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
[ -d dataset ] || exit 1
|
||||
|
||||
correct=0
|
||||
count=0
|
||||
total=$(printf '%s\n' dataset/* | wc -l)
|
||||
|
||||
for i in dataset/*.png ; do
|
||||
res=$(bash ./gotcha "$i")
|
||||
i=${i#dataset/}
|
||||
if [ "$res" = "${i%.png}" ] ; then
|
||||
correct=$((correct + 1))
|
||||
status=SUCCESS
|
||||
else
|
||||
status=FAIL
|
||||
fi
|
||||
printf '%s\n' "$status: [count: $count | correct: $correct/$total] - ANS: ${i%.png} RES: $res"
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
echo
|
||||
echo 'Done!'
|
||||
Reference in New Issue
Block a user