-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.sh
105 lines (77 loc) · 2.67 KB
/
test.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
#!/usr/bin/env bash
PYTHON=${PYTHON:-"python"}
GPUS="4"
# DATASET="HRSC2016"
# DATASET="UCAS_AOD"
# DATASET="ICDAR2015"
DATASET="DOTA"
# DATASET="MSRA_TD500"
CHECKPOINT="epoch_12"
#### HRSC20116
# CONFIG="s2anet_r50_fpn_416_hungarian_hrsc2016"
# CONFIG="cascade_retinanet_obb_r50_fpn_416_hrsc2016"
# CONFIG="cascade_retinanet_obb_r50_fpn_mr_416_hrsc2016"
# CONFIG="cascade_retinanet_obb_r50_fpn_gwd_416_hrsc2016"
# CONFIG="cascade_retinanet_obb_r50_fpn_iou_smooth_416_hrsc2016"
# CONFIG="cascade_retinanet_obb_r50_fpn_hungarian_416_hrsc2016"
# CONFIG="cascade_retinanet_quad_r50_fpn_416_hrsc2016"
# CONFIG="cascade_retinanet_quad_r50_fpn_mr_416_hrsc2016"
# CONFIG="cascade_retinanet_quad_r50_fpn_sbd_416_hrsc2016"
# CONFIG="cascade_retinanet_quad_r50_fpn_gwd_416_hrsc2016"
# CONFIG="cascade_retinanet_quad_r50_fpn_hungarian_416_hrsc2016"
# CONFIG="cascade_retinanet_quad_r50_fpn_glidvertex_416_hrsc2016"
# CONFIG="cascade_retinanet_obb_r101_fpn_hungarian_800_hrsc2016"
# CONFIG="cascade_retinanet_quad_r101_fpn_hungarian_800_hrsc2016"
#### UCAS-AOD
# CONFIG="cascade_retinanet_obb_r50_fpn_hungarian_800_ucas_aod"
# CONFIG="cascade_retinanet_quad_r50_fpn_hungarian_800_ucas_aod"
#### IC15
# CONFIG="cascade_retinanet_quad_r101_fpn_hungarian_800_ic15"
#### MSRA-TD500
# CONFIG="cascade_retinanet_obb_r50_fpn_hungarian_800_msra_td500"
#### DOTA
# CONFIG="s2anet_r50_fpn_hungarian_800_dota"
# CONFIG="cascade_retinanet_obb_r101_fpn_hungarian_800_dota"
CONFIG="cascade_retinanet_quad_r101_fpn_hungarian_800_dota"
if [ $DATASET = "HRSC2016" ]; then
DATASET="hrsc2016"
ROOT="HRSC2016"
EVAL="hrsc2016_evaluation"
elif [ $DATASET = "UCAS_AOD" ]; then
DATASET="hrsc2016"
ROOT="UCAS_AOD"
EVAL="ucas_evaluation"
elif [ $DATASET = "VOC" ]; then
DATASET="voc"
EVAL="tools/voc_eval"
elif [ $DATASET = "ICDAR2015" ]; then
DATASET="ic15"
ROOT="ICDAR2015"
EVAL="IC15_evaluation"
elif [ $DATASET = "DOTA" ]; then
DATASET="dota"
ROOT="DOTA"
elif [ $DATASET = "MSRA_TD500" ]; then
DATASET="msra_td500"
ROOT="MSRA_TD500"
EVAL="MSRA_TD500_evaluation"
fi
## single-GPU
# python tools/test.py configs/$ROOT/$CONFIG.py \
# work_dirs/$CONFIG/$CHECKPOINT.pth \
# --out work_dirs/$CONFIG/results.pkl \
# --data $DATASET
# Mul-GPus
./tools/dist_test.sh configs/$ROOT/$CONFIG.py \
work_dirs/$CONFIG/$CHECKPOINT.pth $GPUS \
--out work_dirs/$CONFIG/results.pkl \
--data $DATASET
if [ $DATASET = "dota" ]; then
zip -j Task1.zip work_dirs/$CONFIG/result_merge/*
elif [ $DATASET = "voc" ]; then
python $EVAL.py \
configs/$ROOT/$CONFIG.py
else
python DOTA_devkit/$ROOT/$EVAL.py \
configs/$ROOT/$CONFIG.py
fi