-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathparams.h
376 lines (309 loc) · 10.2 KB
/
params.h
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
/*
* SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef PARAMS_H_
#define PARAMS_H_
#define MAX_VOXELS 60000
#define MAX_POINTS 80000
#define MAX_POINTS_PER_VOXEL 5
#define THREADS_FOR_VOXEL 256 // threads number for a block
#define POINTS_PER_VOXEL 32 //depands on "params.h"
#define MAX_NUM_POINTS_PER_VOXEL 5
#define VOXEL_SIZE_X 0.05
#define VOXEL_SIZE_Y 0.05
#define VOXEL_SIZE_Z 0.1
#define X_MIN 0.0
#define X_MAX 70.4
#define Y_MIN -40.0
#define Y_MAX 40.0
#define Z_MIN -3.0
#define Z_MAX 1.0
#define VOXEL_FEATURE_NUM 4
//backbone
#define SUBM_0_MAX_VOXELS 60000
#define SUBM_0_IN_CHANNEL 4
#define SUBM_0_OUT_CHANNEL 16
#define SUBM_0_OUT_SHAPE_X 1408
#define SUBM_0_OUT_SHAPE_Y 1600
#define SUBM_0_OUT_SHAPE_Z 41
#define SUBM_3_MAX_VOXELS 60000
#define SUBM_3_IN_CHANNEL 16
#define SUBM_3_OUT_CHANNEL 16
#define SUBM_3_OUT_SHAPE_X 1408
#define SUBM_3_OUT_SHAPE_Y 1600
#define SUBM_3_OUT_SHAPE_Z 41
#define SPARSE_6_MAX_VOXELS 60000
#define SPARSE_6_IN_CHANNEL 16
#define SPARSE_6_OUT_CHANNEL 32
#define SPARSE_6_OUT_SHAPE_X 704
#define SPARSE_6_OUT_SHAPE_Y 800
#define SPARSE_6_OUT_SHAPE_Z 21
#define SPARSE_6_SPATIAL_SHAPE_X 1408
#define SPARSE_6_SPATIAL_SHAPE_Y 1600
#define SPARSE_6_SPATIAL_SHAPE_Z 41
#define SPARSE_6_KSIZE_0 3
#define SPARSE_6_KSIZE_1 3
#define SPARSE_6_KSIZE_2 3
#define SPARSE_6_STRIDE_0 2
#define SPARSE_6_STRIDE_1 2
#define SPARSE_6_STRIDE_2 2
#define SPARSE_6_PADDING_0 1
#define SPARSE_6_PADDING_1 1
#define SPARSE_6_PADDING_2 1
#define SUBM_9_MAX_VOXELS 60000
#define SUBM_9_IN_CHANNEL 32
#define SUBM_9_OUT_CHANNEL 32
#define SUBM_9_OUT_SHAPE_X 704
#define SUBM_9_OUT_SHAPE_Y 800
#define SUBM_9_OUT_SHAPE_Z 21
#define SUBM_12_MAX_VOXELS 60000
#define SUBM_12_IN_CHANNEL 32
#define SUBM_12_OUT_CHANNEL 32
#define SUBM_12_OUT_SHAPE_X 704
#define SUBM_12_OUT_SHAPE_Y 800
#define SUBM_12_OUT_SHAPE_Z 21
#define SPARSE_15_MAX_VOXELS 60000
#define SPARSE_15_IN_CHANNEL 32
#define SPARSE_15_OUT_CHANNEL 64
#define SPARSE_15_OUT_SHAPE_X 352
#define SPARSE_15_OUT_SHAPE_Y 400
#define SPARSE_15_OUT_SHAPE_Z 11
#define SPARSE_15_SPATIAL_SHAPE_X 704
#define SPARSE_15_SPATIAL_SHAPE_Y 800
#define SPARSE_15_SPATIAL_SHAPE_Z 21
#define SPARSE_15_KSIZE_0 3
#define SPARSE_15_KSIZE_1 3
#define SPARSE_15_KSIZE_2 3
#define SPARSE_15_STRIDE_0 2
#define SPARSE_15_STRIDE_1 2
#define SPARSE_15_STRIDE_2 2
#define SPARSE_15_PADDING_0 1
#define SPARSE_15_PADDING_1 1
#define SPARSE_15_PADDING_2 1
#define SUBM_18_MAX_VOXELS 60000
#define SUBM_18_IN_CHANNEL 64
#define SUBM_18_OUT_CHANNEL 64
#define SUBM_18_OUT_SHAPE_X 352
#define SUBM_18_OUT_SHAPE_Y 400
#define SUBM_18_OUT_SHAPE_Z 11
#define SUBM_21_MAX_VOXELS 60000
#define SUBM_21_IN_CHANNEL 64
#define SUBM_21_OUT_CHANNEL 64
#define SUBM_21_OUT_SHAPE_X 352
#define SUBM_21_OUT_SHAPE_Y 400
#define SUBM_21_OUT_SHAPE_Z 11
#define SUBM_24_MAX_VOXELS 60000
#define SUBM_24_IN_CHANNEL 64
#define SUBM_24_OUT_CHANNEL 64
#define SUBM_24_OUT_SHAPE_X 352
#define SUBM_24_OUT_SHAPE_Y 400
#define SUBM_24_OUT_SHAPE_Z 11
#define SPARSE_27_MAX_VOXELS 60000
#define SPARSE_27_IN_CHANNEL 64
#define SPARSE_27_OUT_CHANNEL 64
#define SPARSE_27_OUT_SHAPE_X 176
#define SPARSE_27_OUT_SHAPE_Y 200
#define SPARSE_27_OUT_SHAPE_Z 5
#define SPARSE_27_SPATIAL_SHAPE_X 352
#define SPARSE_27_SPATIAL_SHAPE_Y 400
#define SPARSE_27_SPATIAL_SHAPE_Z 11
#define SPARSE_27_KSIZE_0 3
#define SPARSE_27_KSIZE_1 3
#define SPARSE_27_KSIZE_2 3
#define SPARSE_27_STRIDE_0 2
#define SPARSE_27_STRIDE_1 2
#define SPARSE_27_STRIDE_2 2
#define SPARSE_27_PADDING_0 0
#define SPARSE_27_PADDING_1 1
#define SPARSE_27_PADDING_2 1
#define SUBM_30_MAX_VOXELS 60000
#define SUBM_30_IN_CHANNEL 64
#define SUBM_30_OUT_CHANNEL 64
#define SUBM_30_OUT_SHAPE_X 176
#define SUBM_30_OUT_SHAPE_Y 200
#define SUBM_30_OUT_SHAPE_Z 5
#define SUBM_33_MAX_VOXELS 60000
#define SUBM_33_IN_CHANNEL 64
#define SUBM_33_OUT_CHANNEL 64
#define SUBM_33_OUT_SHAPE_X 176
#define SUBM_33_OUT_SHAPE_Y 200
#define SUBM_33_OUT_SHAPE_Z 5
#define SUBM_36_MAX_VOXELS 60000
#define SUBM_36_IN_CHANNEL 64
#define SUBM_36_OUT_CHANNEL 64
#define SUBM_36_OUT_SHAPE_X 176
#define SUBM_36_OUT_SHAPE_Y 200
#define SUBM_36_OUT_SHAPE_Z 5
#define SPARSE_39_MAX_VOXELS 60000
#define SPARSE_39_IN_CHANNEL 64
#define SPARSE_39_OUT_CHANNEL 64
#define SPARSE_39_OUT_SHAPE_X 176
#define SPARSE_39_OUT_SHAPE_Y 200
#define SPARSE_39_OUT_SHAPE_Z 2
#define SPARSE_39_SPATIAL_SHAPE_X 176
#define SPARSE_39_SPATIAL_SHAPE_Y 200
#define SPARSE_39_SPATIAL_SHAPE_Z 5
#define SPARSE_39_KSIZE_0 3
#define SPARSE_39_KSIZE_1 1
#define SPARSE_39_KSIZE_2 1
#define SPARSE_39_STRIDE_0 2
#define SPARSE_39_STRIDE_1 1
#define SPARSE_39_STRIDE_2 1
#define SPARSE_39_PADDING_0 0
#define SPARSE_39_PADDING_1 0
#define SPARSE_39_PADDING_2 0
#define BACKBONE_FEATURE_MAP_SIZE_X 176
#define BACKBONE_FEATURE_MAP_SIZE_Y 200
#define BACKBONE_FEATURE_MAP_SIZE_Z 2
#define BACKBONE_FEATURE_MAP_CHANNEL 64
#define ZERO_PADDING_2D_TOP 1
#define ZERO_PADDING_2D_BOTTOM 1
#define ZERO_PADDING_2D_LEFT 1
#define ZERO_PADDING_2D_RIGHT 1
//neck
#define BOTTOM_UP_BLOCK_0_CONV_0_IN_CHANNEL 128
#define BOTTOM_UP_BLOCK_0_CONV_0_OUT_CHANNEL 128
#define BOTTOM_UP_BLOCK_0_CONV_0_KSIZE 3
#define BOTTOM_UP_BLOCK_0_CONV_0_STRIDE 1
#define BOTTOM_UP_BLOCK_0_CONV_0_PADDING 0
#define BOTTOM_UP_BLOCK_0_BATCHNORM2D_0_NUM_FEATURES 128
#define BOTTOM_UP_BLOCK_0_CONV_1_IN_CHANNEL 128
#define BOTTOM_UP_BLOCK_0_CONV_1_OUT_CHANNEL 128
#define BOTTOM_UP_BLOCK_0_CONV_1_KSIZE 3
#define BOTTOM_UP_BLOCK_0_CONV_1_STRIDE 1
#define BOTTOM_UP_BLOCK_0_CONV_1_PADDING 1
#define BOTTOM_UP_BLOCK_0_BATCHNORM2D_1_NUM_FEATURES 128
#define BOTTOM_UP_BLOCK_0_CONV_2_IN_CHANNEL 128
#define BOTTOM_UP_BLOCK_0_CONV_2_OUT_CHANNEL 128
#define BOTTOM_UP_BLOCK_0_CONV_2_KSIZE 3
#define BOTTOM_UP_BLOCK_0_CONV_2_STRIDE 1
#define BOTTOM_UP_BLOCK_0_CONV_2_PADDING 1
#define BOTTOM_UP_BLOCK_0_BATCHNORM2D_2_NUM_FEATURES 128
#define BOTTOM_UP_BLOCK_1_CONV_0_IN_CHANNEL 128
#define BOTTOM_UP_BLOCK_1_CONV_0_OUT_CHANNEL 256
#define BOTTOM_UP_BLOCK_1_CONV_0_KSIZE 3
#define BOTTOM_UP_BLOCK_1_CONV_0_STRIDE 2
#define BOTTOM_UP_BLOCK_1_CONV_0_PADDING 1
#define BOTTOM_UP_BLOCK_1_BATCHNORM2D_0_NUM_FEATURES 256
#define BOTTOM_UP_BLOCK_1_CONV_1_IN_CHANNEL 256
#define BOTTOM_UP_BLOCK_1_CONV_1_OUT_CHANNEL 256
#define BOTTOM_UP_BLOCK_1_CONV_1_KSIZE 3
#define BOTTOM_UP_BLOCK_1_CONV_1_STRIDE 1
#define BOTTOM_UP_BLOCK_1_CONV_1_PADDING 1
#define BOTTOM_UP_BLOCK_1_BATCHNORM2D_1_NUM_FEATURES 256
#define BOTTOM_UP_BLOCK_1_CONV_2_IN_CHANNEL 256
#define BOTTOM_UP_BLOCK_1_CONV_2_OUT_CHANNEL 256
#define BOTTOM_UP_BLOCK_1_CONV_2_KSIZE 3
#define BOTTOM_UP_BLOCK_1_CONV_2_STRIDE 1
#define BOTTOM_UP_BLOCK_1_CONV_2_PADDING 1
#define BOTTOM_UP_BLOCK_1_BATCHNORM2D_2_NUM_FEATURES 256
#define TRANS_0_CONV_IN_CHANNEL 128
#define TRANS_0_CONV_OUT_CHANNEL 128
#define TRANS_0_CONV_KSIZE 1
#define TRANS_0_CONV_STRIDE 1
#define TRANS_0_CONV_PADDING 0
#define TRANS_0_BATCHNORM2D_NUM_FEATURES 128
#define TRANS_1_CONV_IN_CHANNEL 256
#define TRANS_1_CONV_OUT_CHANNEL 256
#define TRANS_1_CONV_KSIZE 1
#define TRANS_1_CONV_STRIDE 1
#define TRANS_1_CONV_PADDING 0
#define TRANS_1_BATCHNORM2D_NUM_FEATURES 256
#define DECONV_BLOCK_0_CONV_IN_CHANNEL 256
#define DECONV_BLOCK_0_CONV_OUT_CHANNEL 128
#define DECONV_BLOCK_0_CONV_KSIZE 3
#define DECONV_BLOCK_0_CONV_STRIDE 2
#define DECONV_BLOCK_0_CONV_PADDING 1
#define DECONV_BLOCK_0_CONV_OUT_PADDING 1
#define DECONV_BLOCK_0_BATCHNORM2D_NUM_FEATURES 128
#define DECONV_BLOCK_1_CONV_IN_CHANNEL 256
#define DECONV_BLOCK_1_CONV_OUT_CHANNEL 128
#define DECONV_BLOCK_1_CONV_KSIZE 3
#define DECONV_BLOCK_1_CONV_STRIDE 2
#define DECONV_BLOCK_1_CONV_PADDING 1
#define DECONV_BLOCK_1_CONV_OUT_PADDING 1
#define DECONV_BLOCK_1_BATCHNORM2D_NUM_FEATURES 128
#define CONV_0_CONV_IN_CHANNEL 128
#define CONV_0_CONV_OUT_CHANNEL 128
#define CONV_0_CONV_KSIZE 3
#define CONV_0_CONV_STRIDE 1
#define CONV_0_CONV_PADDING 1
#define CONV_0_BATCHNORM2D_NUM_FEATURES 128
#define W_0_CONV_IN_CHANNEL 128
#define W_0_CONV_OUT_CHANNEL 1
#define W_0_CONV_KSIZE 1
#define W_0_CONV_STRIDE 1
#define W_0_CONV_PADDING 0
#define W_0_BATCHNORM2D_NUM_FEATURES 1
#define CONV_1_CONV_IN_CHANNEL 128
#define CONV_1_CONV_OUT_CHANNEL 128
#define CONV_1_CONV_KSIZE 3
#define CONV_1_CONV_STRIDE 1
#define CONV_1_CONV_PADDING 1
#define CONV_1_BATCHNORM2D_NUM_FEATURES 128
#define W_1_CONV_IN_CHANNEL 128
#define W_1_CONV_OUT_CHANNEL 1
#define W_1_CONV_KSIZE 1
#define W_1_CONV_STRIDE 1
#define W_1_CONV_PADDING 0
#define W_1_BATCHNORM2D_NUM_FEATURES 1
#define X_WEIGHT_0_HEIGHT 200
#define X_WEIGHT_0_WIDTH 176
#define X_WEIGHT_0_CHANNEL 128
#define X_WEIGHT_0_HEIGHT 200
#define X_WEIGHT_0_WIDTH 176
#define X_WEIGHT_0_CHANNEL 128
//head
#define CONV_BOX_IN_CHANNEL 128
#define CONV_BOX_OUT_CHANNEL 14
#define CONV_BOX_KSIZE 1
#define CONV_BOX_STRIDE 1
#define CONV_BOX_PADDING 0
#define CONV_BOX_DIM_NUM 7
#define CONV_CLS_IN_CHANNEL 128
#define CONV_CLS_OUT_CHANNEL 2
#define CONV_CLS_KSIZE 1
#define CONV_CLS_STRIDE 1
#define CONV_CLS_PADDING 0
#define CONV_CLS_DIM_NUM 1
#define CONV_IOU_IN_CHANNEL 128
#define CONV_IOU_OUT_CHANNEL 2
#define CONV_IOU_KSIZE 1
#define CONV_IOU_STRIDE 1
#define CONV_IOU_PADDING 0
#define CONV_IOU_DIM_NUM 1
#define CONV_DIR_IN_CHANNEL 128
#define CONV_DIR_OUT_CHANNEL 4
#define CONV_DIR_KSIZE 1
#define CONV_DIR_STRIDE 1
#define CONV_DIR_PADDING 0
#define CONV_DIR_DIM_NUM 2
#define FEATURE_MAP_HEIGHT 200
#define FEATURE_MAP_WIDTH 176
#define DIRECTION_ANGLE_0 0.0
#define DIRECTION_ANGLE_1 1.57
#define CAR_LENGTH 3.9
#define CAR_WIDTH 1.6
#define CAR_HEIGHT 1.56
#define DIRECTION_ANGLE_NUM 2
#define MAX_BOX_NUM 500
#define SCORE_THRESHOLD 0.45 //0.3
#define DIRECTION_OFFSET 0.0
#define USE_FP16// comment out this if want to use FP32
#define DEVICE 0 // GPU id
#define NMS_THRESH 0.01
#define LAST_DIMS 9
#endif