-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·109 lines (103 loc) · 2.74 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
classifier=2
parallel=0
validation="false"
visualiseFrames="false"
visualisesubFrames="false"
verbose="false"
savefile="false"
Help()
{
echo
echo "Run this script with -r flag to execute all approaches with results validation enabled"
echo
echo "Syntax: Template [-c|p|t|f|s|v]"
echo
echo "options:"
echo
echo "c 0 = Slow SVM, 1 = Fast SVM, 2 = Modified YOLO, 3 = Orginal YOLO"
echo "p 0 = For normal processing, 1 = For parallel processing"
echo "t Validate/test results"
echo "f Visualize/Display Frames"
echo "s Visualize/Display Sub-Frames/Regions"
echo "v Verbose mode."
echo "k Save/keep as file."
echo
echo "Default Option values -c 2 -p 0 -t False -f False -s False -v False"
echo
}
ExecAll()
{
c=0
x=0
p=0
while [ $c -lt 4 ]
do
if [ $c -lt 2 ]
then
p=$(($x+0))
while [ $p -lt 2 ]
do
if [ $c -eq 0 -a $p -eq 0 ]; then echo '===============================Model A without parallel==============================='
elif [ $c -eq 0 -a $p -eq 1 ]; then echo '================================Model A with parallel================================='
elif [ $c -eq 1 -a $p -eq 0 ]; then echo '===============================Model B without parallel==============================='
else
echo '================================Model B with parallel================================='
fi
python3 detectionsystem.py -c=$c -p=$p -t="true"
p=`expr $p + 1`
done
else
if [ $c -eq 2 ]; then echo '====================================Modified YOLOv3===================================='
else echo '====================================Original YOLOv3===================================='
fi
python3 detectionsystem.py -c=$c -p=0 -t="true"
fi
c=`expr $c + 1`
done
}
while getopts ":hrc:p:t:f:s:v:k:" option; do
case $option in
h )
Help
exit;;
r )
ExecAll
exit;;
c ) classifier=${OPTARG:-2}
;;
p ) parallel=${OPTARG:-0}
;;
t ) validation=${OPTARG:-False}
;;
f ) visualiseFrames=${OPTARG:-False}
;;
s ) visualisesubFrames=${OPTARG:-False}
;;
v ) verbose=${OPTARG:-False}
;;
k ) savefile=${OPTARG:-False}
;;
esac
done
PrintValues()
{
echo
echo classifier
echo $classifier
echo parallel
echo $parallel
echo validation
echo $validation
echo visualiseFrames
echo $visualiseFrames
echo visualisesubFrames
echo $visualisesubFrames
echo verbose
echo $verbose
echo savefile
echo $savefile
echo
}
#PrintValues
source dependencies.sh
python3 detectionsystem.py -c $classifier -p $parallel -t $validation -f $visualiseFrames -s $visualisesubFrames -v $verbose -k $savefile