-
Notifications
You must be signed in to change notification settings - Fork 0
/
dvc.yaml
173 lines (166 loc) · 5.69 KB
/
dvc.yaml
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
stages:
# Localization model
prepare_localize:
cmd: python3 -m ${src_path}.${localize_model_folder}.prepare
deps:
- ${dataset_path}
- ${src_path}/${localize_model_folder}/prepare.py
- ${src_path}/generators/swiss_license_plates_generator.py
- ${src_path}/datasets/swiss_license_plates_dataset.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/dataset.py
params:
- params.py:
- BATCH_SIZE
- LocalizeParams
- PrepareLocalizeParams
outs:
- ${prepared_data_path}/${localize_model_folder}
plots:
- ${out_path}/${out_prepared_folder}/${localize_model_folder}/plots/images:
cache: false
train_localize:
cmd: python3 -m ${src_path}.${localize_model_folder}.train
deps:
- ${prepared_data_path}/${localize_model_folder}
- ${src_path}/${localize_model_folder}/train.py
- ${src_path}/models/cnn_localizer_model.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/model.py
- ${src_path}/utils/train.py
params:
- params.py:
- BATCH_SIZE
- LocalizeParams
- LocalizeModelParams
- TrainLocalizeParams
outs:
- ${out_path}/${out_log_folder}/${localize_model_folder}/tensorboard
- ${out_path}/${out_checkpoint_folder}/${localize_model_folder}
- ${out_path}/${out_save_folder}/${localize_model_folder}
metrics:
- ${out_path}/${out_log_folder}/${localize_model_folder}/metrics.json:
cache: false
plots:
- ${out_path}/${out_log_folder}/${localize_model_folder}/plots/metrics:
cache: false
x: step
evaluate_localize:
cmd: python3 -m ${src_path}.${localize_model_folder}.evaluate
deps:
- ${out_path}/${out_save_folder}/${localize_model_folder}
- ${src_path}/${localize_model_folder}/evaluate.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/model.py
- ${src_path}/utils/preview.py
params:
- params.py:
- LocalizeParams
- LocalizeModelParams
plots:
- ${out_path}/${out_evaluation_folder}/${localize_model_folder}/plots/images:
cache: false
# OCR model
prepare_ocr:
cmd: python3 -m ${src_path}.${ocr_model_folder}.prepare
deps:
- ${dataset_path}
- ${src_path}/${ocr_model_folder}/prepare.py
- ${src_path}/generators/swiss_license_plates_generator.py
# Note: This is a different dataset than the one used for the localization model
- ${src_path}/datasets/swiss_license_plates_dataset.py
- ${src_path}/datasets/swiss_license_plates_ocr_dataset.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/dataset.py
params:
- params.py:
- BATCH_SIZE
- OCRParams
- PrepareOCRParams
outs:
- ${prepared_data_path}/${ocr_model_folder}
plots:
- ${out_path}/${out_prepared_folder}/${ocr_model_folder}/plots/images:
cache: false
train_ocr:
cmd: python3 -m ${src_path}.${ocr_model_folder}.train
deps:
- ${prepared_data_path}/${ocr_model_folder}
- ${src_path}/${ocr_model_folder}/train.py
- ${src_path}/models/cnn_ocr_model.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/model.py
- ${src_path}/utils/train.py
params:
- params.py:
- BATCH_SIZE
- OCRParams
- OCRModelParams
- TrainOCRParams
outs:
- ${out_path}/${out_log_folder}/${ocr_model_folder}/tensorboard
- ${out_path}/${out_checkpoint_folder}/${ocr_model_folder}
- ${out_path}/${out_save_folder}/${ocr_model_folder}
metrics:
- ${out_path}/${out_log_folder}/${ocr_model_folder}/metrics.json:
cache: false
plots:
- ${out_path}/${out_log_folder}/${ocr_model_folder}/plots/metrics:
cache: false
x: step
evaluate_ocr:
cmd: python3 -m ${src_path}.${ocr_model_folder}.evaluate
deps:
- ${out_path}/${out_save_folder}/${ocr_model_folder}
- ${src_path}/${ocr_model_folder}/evaluate.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/model.py
- ${src_path}/utils/evaluation.py
params:
- params.py:
- OCRParams
- OCRModelParams
plots:
- ${out_path}/${out_evaluation_folder}/${ocr_model_folder}/plots/images:
cache: false
# Evaluate the model stack
prepare_stack:
cmd: python3 -m ${src_path}.${stack_model_folder}.prepare
deps:
- ${dataset_path}
- ${src_path}/${stack_model_folder}/prepare.py
- ${src_path}/generators/swiss_license_plates_generator.py
- ${src_path}/datasets/swiss_license_plates_dataset.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/dataset.py
params:
- params.py:
- BATCH_SIZE
- LocalizeParams
- PrepareOCRParams
- PrepareStackParams
outs:
- ${prepared_data_path}/${stack_model_folder}
evaluate_stack:
cmd: python3 -m ${src_path}.${stack_model_folder}.evaluate
deps:
- ${prepared_data_path}/${stack_model_folder}
- ${out_path}/${out_save_folder}/${localize_model_folder}
- ${out_path}/${out_save_folder}/${ocr_model_folder}
- ${src_path}/${stack_model_folder}/evaluate.py
- ${src_path}/utils/seed.py
- ${src_path}/utils/model.py
- ${src_path}/utils/evaluation.py
- ${src_path}/utils/preview.py
params:
- params.py:
- LocalizeParams
- LocalizeModelParams
- OCRParams
- OCRModelParams
metrics:
- ${out_path}/${out_evaluation_folder}/${stack_model_folder}/metrics.json:
cache: false
plots:
- ${out_path}/${out_evaluation_folder}/${stack_model_folder}/plots/images:
cache: false