-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathrun_cityscapes_eval.sh
executable file
·55 lines (50 loc) · 1.33 KB
/
run_cityscapes_eval.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
SPLIT=$1
CSPLIT=""
MODEL_ID=$2
PACK=true
RENDER_GT=""
NOIOU="--no_iou"
if [[ $SPLIT = "valid" ]]; then
CSPLIT="val"
RUN_EVAL=true
elif [[ $SPLIT = "test" ]]; then
CSPLIT="test"
RUN_EVAL=false
else
echo "UNKNOWN SPLIT, EXITING."
exit 1
fi
# Change the cityscapes data path here.
export RESULTS_FOLDER="results"
export CITYSCAPES_RESULTS="$RESULTS_FOLDER"/"$MODEL_ID"/output_"$SPLIT"/cityscapes/
export CITYSCAPES_DATASET="data/cityscapes"
export CITYSCAPES_SPLIT=$CSPLIT
if [[ $CSPLIT ]]; then
# Pack the network outputs into the HDF5 file.
./full_model_pack.py \
--dataset cityscapes \
--split "$SPLIT" \
--model_id "$MODEL_ID" \
--results "$RESULTS_FOLDER" \
--batch_size 4
if [[ $? -eq 0 ]]; then
# Run evaluation script, upsample the output to original size.
./cityscapes_eval.py \
--dataset "cityscapes" \
--split "$SPLIT" \
--model_id $MODEL_ID \
--results "$RESULTS_FOLDER" \
--threshold_list 0.6 \
--analyzers "" \
--remove_tiny 1200 \
--no_iou \
--lrr_seg \
--lrr_filename "pretrained/LRR/{}/{}/{}_ss.mat"
if [[ $? -eq 0 ]]; then
if [[ $RUN_EVAL = true ]]; then
# Run Cityscapes dataset provided evaluation.
python data_api/cityscapes_scripts/evaluation/evalInstanceLevelSemanticLabeling.py
fi
fi
fi
fi