-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdetect_all.sh
executable file
·59 lines (59 loc) · 1.44 KB
/
detect_all.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
#!/usr/bin/env bash
if [ $# != 1 ]; then
echo "Usage: $0 [dir]"
exit 1
fi
dir=$1
if [ ! -d ${dir} ]; then
echo "${dir} not found"
exit 1
fi
datanames=(${dir//\// })
dataname=${datanames[${#datanames[@]}-1]}
models=(
"yolov3-tiny" "yolov3" "yolov3-spp" "yolov4-tiny" "yolov4"
)
frames=(
"tf" "tf_onnx"
)
modelsv5=(
"yolov5s" "yolov5m" "yolov5l" "yolov5x"
)
framesv5=(
"torch" "torch_onnx" "onnx_vino" "onnx_tf" "tf" "tf_onnx"
)
quants=(
"fp32" "fp16"
)
for frame in ${frames[@]} ; do
for model in ${models[@]} ; do
rdir="results/${dataname}/${model}_${frame}"
if [ ! -d ${rdir} ] ; then
./detect.py -m ${model} -f ${frame} -d ${dir}
fi
done
done
for quant in ${quants[@]} ; do
for model in ${models[@]} ; do
rdir="results/${dataname}/${model}_tflite_${quant}"
if [ ! -d ${rdir} ] ; then
./detect.py -m ${model} -f tflite -q ${quant} -d ${dir}
fi
done
done
for frame in ${framesv5[@]} ; do
for model in ${modelsv5[@]} ; do
rdir="results/${dataname}/${model}_${frame}"
if [ ! -d ${rdir} ] ; then
./detect.py -m ${model} -f ${frame} -d ${dir}
fi
done
done
for quant in ${quants[@]} ; do
for model in ${modelsv5[@]} ; do
rdir="results/${dataname}/${model}_tflite_${quant}"
if [ ! -d ${rdir} ] ; then
./detect.py -m ${model} -f tflite -q ${quant} -d ${dir}
fi
done
done