-
Notifications
You must be signed in to change notification settings - Fork 6
/
batch_train_cityscape_benchmark.py
73 lines (65 loc) · 2.09 KB
/
batch_train_cityscape_benchmark.py
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
import os
import subprocess
from itertools import product
# v_list = ['dashcam_%d_test' % (i+1) for i in range(4)] + ['trafficcam_%d_test' % (i+1) for i in range(4)]
# v_list = [v_list[0]]
# v_list = ['train_first/trafficcam_%d_train' % (i+1) for i in range(4)] + ['train_first/dashcam_%d_train' % (i+1) for i in range(4)]
# v_list = [v_list[4]]
app = "COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml"
# app = "EfficientDet"
# model_name = f"COCO_full_normalizedsaliency_R_101_FPN_crossthresh_5xdownsample"
architecture = "SSD"
# model_name = "visdrone_R_101_FPN_crossthresh"
filename = "benchmark_fcn"
gt = "pickles/COCO_saliency_EfficientDet_withtestset_withoutclasscheck.pickle"
for compute in [0.5]:
weight = 4
model_name = f"compute_{compute}_weight_{weight}"
print(f"Compute: {compute}, Weight: {weight}")
subprocess.run(
[
"python",
"train_cityscape_benchmark.py",
"--training_set",
"COCO",
"--no_class_check",
"-g",
# f"visdrone_normalizedsaliency_R_101_FPN.pickle",
f"{gt}",
"-p",
f"maskgen_pths/{model_name}.pth",
# "--init",
# f"maskgen_pths/{model_name}.pth.best",
"--tile_size",
"16",
"--batch_size",
"4",
"--log",
f"train_{model_name}.log",
"--maskgen_file",
f"/tank/kuntai/code/video-compression/maskgen/{filename}.py",
"--visualize",
"True",
"--visualize_step_size",
"1000000",
"--app",
# f"Segmentation/fcn_resnet50",
f"{app}",
"--local_rank",
"-1",
"--num_workers",
"10",
"--learning_rate",
"1e-3",
"--test_set",
"object_detection_test_set",
"--confidence_threshold",
"0.3",
"--gt_confidence_threshold",
"0.3",
"--weight",
f"{weight}",
"--compute",
f"{compute}",
]
)