-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfig.py
84 lines (63 loc) · 1.9 KB
/
config.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
74
75
76
77
78
79
80
81
82
83
84
import numpy as np
class GridParameters:
x_min = 0.0
x_max = 80.64
x_step = 0.16
y_min = -40.32
y_max = 40.32
y_step = 0.16
z_min = -1.0
z_max = 3.0
# derived parameters
Xn_f = float(x_max - x_min) / x_step
Yn_f = float(y_max - y_min) / y_step
Xn = int(Xn_f)
Yn = int(Yn_f)
def __init__(self):
super(GridParameters, self).__init__()
class DataParameters:
classes = {"Car": 0,
"Pedestrian": 1,
"Person_sitting": 1,
"Cyclist": 2,
"Truck": 3,
"Van": 3,
"Tram": 3,
"Misc": 3,
}
nb_classes = len(np.unique(list(classes.values())))
def __init__(self):
super(DataParameters, self).__init__()
class NetworkParameters:
max_points_per_pillar = 100
max_pillars = 12000
nb_features = 7
nb_channels = 64
downscaling_factor = 2
# length, width, height, z-center, orientation
anchor_dims = np.array([[3.9, 1.6, 1.56, -1, 0],
[3.9, 1.6, 1.56, -1, 1.5708],
[0.8, 0.6, 1.73, -0.6, 0],
[0.8, 0.6, 1.73, -0.6, 1.5708],
], dtype=np.float32).tolist()
positive_iou_threshold = 0.6
negative_iou_threshold = 0.3
batch_size = 4
total_training_epochs = 160
learning_rate = 2e-4
decay_rate = 1e-8
L1 = 0
L2 = 0
alpha = 0.25
gamma = 2.0
focal_weight = 1.0
loc_weight = 2.0
size_weight = 2.0
angle_weight = 2.0
heading_weight = 0.2
class_weight = 0.2
def __init__(self):
super(NetworkParameters, self).__init__()
class Parameters(GridParameters, DataParameters, NetworkParameters):
def __init__(self):
super(Parameters, self).__init__()