forked from InterDigitalInc/CompressAI-Vision
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault_vision_performances.sh
More file actions
executable file
·223 lines (209 loc) · 8.46 KB
/
default_vision_performances.sh
File metadata and controls
executable file
·223 lines (209 loc) · 8.46 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#!/usr/bin/env bash
#
# This runs the evaluation of original models, whitout compression
# make sure you sourced the virtual environment that contains up-to-date installed compressai-vision
# see provided installation scripts
set -eu
ENTRY_CMD=$1
TESTDATA_DIR=$2
DEVICE=$3
# List of entry cmds
CMD_OPTS=("compressai-split-inference", "compressai-remote-inference")
if [[ "${CMD_OPTS[@]}" =~ ${ENTRY_CMD} ]]; then
echo "Run ${ENTRY_CMD} ........"
else
echo : "${ENTRY_CMD} does not exist in the options."
echo : "Please choose one out of these options: ${CMD_OPTS[@]}"
exit 1
fi
declare -A configs
configs["compressai-split-inference"]="eval_split_inference_example"
configs["compressai-remote-inference"]="eval_remote_inference_example"
CONF_NAME=${configs[${ENTRY_CMD}]}
if [ $# == 2 ]; then
TESTDATA_DIR=$2
fi
if [ ! -d "${TESTDATA_DIR}" ]; then
echo "${TESTDATA_DIR} does not exist, please select dataset folder, e.g.
$ bash default_vision_performances.sh [etnry_cmd] [/path/to/dataset]"
exit
fi
MPEG_OIV6_SRC="${TESTDATA_DIR}/mpeg-oiv6"
SFU_HW_SRC="${TESTDATA_DIR}/SFU_HW_Obj"
HIEVE_SRC="${TESTDATA_DIR}/HiEve_pngs"
TVD_SRC="${TESTDATA_DIR}/tvd_tracking"
PANDASET_SRC="${TESTDATA_DIR}/PandaSet"
# MPEGOIV6 - Detection with Faster RCNN
${ENTRY_CMD} --config-name=${CONF_NAME}.yaml \
++pipeline.type=image \
++pipeline.conformance.save_conformance_files=True \
++pipeline.conformance.subsample_ratio=9 \
++vision_model.arch=faster_rcnn_X_101_32x8d_FPN_3x \
++dataset.type=Detectron2Dataset \
++dataset.datacatalog=MPEGOIV6 \
++dataset.config.root=${MPEG_OIV6_SRC} \
++dataset.config.annotation_file=annotations/mpeg-oiv6-detection-coco.json \
++dataset.config.dataset_name=mpeg-oiv6-detection \
++evaluator.type=OIC-EVAL \
++pipeline.nn_task_part1.load_features=False \
++pipeline.nn_task_part1.dump_features=False \
++pipeline.nn_task_part2.dump_features=False \
++misc.device.nn_parts=${DEVICE}
# MPEGOIV6 - Segmentation with Mask RCNN
${ENTRY_CMD} --config-name=${CONF_NAME}.yaml \
++pipeline.type=image \
++pipeline.conformance.save_conformance_files=True \
++pipeline.conformance.subsample_ratio=9 \
++vision_model.arch=mask_rcnn_X_101_32x8d_FPN_3x \
++dataset.type=Detectron2Dataset \
++dataset.datacatalog=MPEGOIV6 \
++dataset.config.root=${MPEG_OIV6_SRC} \
++dataset.config.annotation_file=annotations/mpeg-oiv6-segmentation-coco.json \
++dataset.config.dataset_name=mpeg-oiv6-segmentation \
++evaluator.type=OIC-EVAL \
++pipeline.nn_task_part1.load_features=False \
++pipeline.nn_task_part1.dump_features=False \
++pipeline.nn_task_part2.dump_features=False \
++misc.device.nn_parts=${DEVICE}
# SFU - Detection with Faster RCNN
for SEQ in \
'Traffic_2560x1600_30_val' \
'Kimono_1920x1080_24_val' \
'ParkScene_1920x1080_24_val' \
'Cactus_1920x1080_50_val' \
'BasketballDrive_1920x1080_50_val' \
'BQTerrace_1920x1080_60_val' \
'BasketballDrill_832x480_50_val' \
'BQMall_832x480_60_val' \
'PartyScene_832x480_50_val' \
'RaceHorses_832x480_30_val' \
'BasketballPass_416x240_50_val' \
'BQSquare_416x240_60_val' \
'BlowingBubbles_416x240_50_val' \
'RaceHorses_416x240_30_val'
do
${ENTRY_CMD} --config-name=${CONF_NAME}.yaml \
++pipeline.type=video \
++pipeline.conformance.save_conformance_files=True \
++pipeline.conformance.subsample_ratio=9 \
++vision_model.arch=faster_rcnn_X_101_32x8d_FPN_3x \
++dataset.type=Detectron2Dataset \
++dataset.datacatalog=SFUHW \
++dataset.config.root=${SFU_HW_SRC}/${SEQ} \
++dataset.config.annotation_file=annotations/${SEQ}.json \
++dataset.config.dataset_name=${SEQ} \
++evaluator.type=COCO-EVAL \
++pipeline.nn_task_part1.load_features=False \
++pipeline.nn_task_part1.dump_features=False \
++pipeline.nn_task_part2.dump_features=False \
++misc.device.nn_parts=${DEVICE}
done
# TVD - Object Tracking with JDE
for SEQ in \
'TVD-01' \
'TVD-02' \
'TVD-03'
do
${ENTRY_CMD} --config-name=${CONF_NAME}.yaml \
++pipeline.type=video \
++pipeline.conformance.save_conformance_files=True \
++pipeline.conformance.subsample_ratio=9 \
++vision_model.arch=jde_1088x608 \
++vision_model.jde_1088x608.splits="[36, 61, 74]" \
++dataset.type=TrackingDataset \
++dataset.settings.patch_size="[608, 1088]" \
++dataset.datacatalog=MPEGTVDTRACKING \
++dataset.config.root=${TVD_SRC}/${SEQ} \
++dataset.config.imgs_folder=img1 \
++dataset.config.annotation_file=gt/gt.txt \
++dataset.config.dataset_name=${SEQ} \
++evaluator.type=MOT-TVD-EVAL \
++pipeline.nn_task_part1.load_features=False \
++pipeline.nn_task_part1.dump_features=False \
++pipeline.nn_task_part2.dump_features=False \
++misc.device.nn_parts=${DEVICE}
done
# HIEVE - Object Tracking with JDE
for SEQ in \
'13' \
'16' \
'2' \
'17' \
'18'
do
${ENTRY_CMD} --config-name=${CONF_NAME}.yaml \
++pipeline.type=video \
++pipeline.conformance.save_conformance_files=True \
++pipeline.conformance.subsample_ratio=90 \
++vision_model.arch=jde_1088x608 \
++vision_model.jde_1088x608.splits="[105, 90, 75]" \
++dataset.type=TrackingDataset \
++dataset.settings.patch_size="[608, 1088]" \
++dataset.datacatalog=MPEGHIEVE \
++dataset.config.root=${HIEVE_SRC}/${SEQ} \
++dataset.config.imgs_folder=img1 \
++dataset.config.annotation_file=gt/gt.txt \
++dataset.config.dataset_name=${SEQ} \
++evaluator.type=MOT-HIEVE-EVAL \
++pipeline.nn_task_part1.load_features=False \
++pipeline.nn_task_part1.dump_features=False \
++pipeline.nn_task_part2.dump_features=False \
++misc.device.nn_parts=${DEVICE}
done
# PANDASET - Semantic Segmentation with Pandaset
for SEQ in \
'003' \
'011' \
'016' \
'017' \
'021' \
'023' \
'027' \
'029' \
'030' \
'033' \
'035' \
'037' \
'039' \
'043' \
'053' \
'056' \
'057' \
'058' \
'069' \
'070' \
'072' \
'073' \
'077' \
'088' \
'089' \
'090' \
'095' \
'097' \
'109' \
'112' \
'113' \
'115' \
'117' \
'119' \
'122' \
'124'
do
${ENTRY_CMD} --config-name=${CONF_NAME}.yaml \
++pipeline.type=video \
++pipeline.conformance.save_conformance_files=True \
++pipeline.conformance.subsample_ratio=9 \
++vision_model.arch=panoptic_rcnn_R_101_FPN_3x \
++dataset.type=Detectron2Dataset \
++dataset.datacatalog=PANDASET \
++dataset.config.root=${PANDASET_SRC}/${SEQ} \
++dataset.config.imgs_folder=camera/front_camera \
++dataset.config.ext=jpg \
++dataset.config.annotation_file=annotations/${SEQ}.npz \
++dataset.config.dataset_name=pandaset-${SEQ} \
++evaluator.type=SEMANTICSEG-EVAL \
++pipeline.nn_task_part1.load_features=False \
++pipeline.nn_task_part1.dump_features=False \
++pipeline.nn_task_part2.dump_features=False \
++misc.device.nn_parts=${DEVICE}
done