-
Notifications
You must be signed in to change notification settings - Fork 6
/
trailer.py
76 lines (70 loc) · 1.75 KB
/
trailer.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
_base_ = '../default_runtime.py'
data_dir = '' # the root of the dataset
category_name = 'Trailer'
batch_size = 128
point_cloud_range = [-9.6, -9.6, -3., 9.6, 9.6, 3.]
model = dict(
type='BEVTrack',
backbone=dict(type='VoxelNet',
point_cloud_range=point_cloud_range,
voxel_size=[0.15, 0.15, 0.3],
grid_size=[21, 128, 128],
),
fuser=dict(type='BEVFuser'),
head=dict(type='SimpleHead'),
cfg=dict(
point_cloud_range=point_cloud_range
)
)
train_dataset = dict(
type='TrainSampler',
dataset=dict(
type='NuScenesDataset',
path=data_dir,
split='train_track',
category_name=category_name,
preloading=True,
preload_offset=10,
),
cfg=dict(
num_candidates=2,
target_thr=None,
search_thr=5,
point_cloud_range=point_cloud_range,
time_flip=True,
flip=True
)
)
test_dataset = dict(
type='TestSampler',
dataset=dict(
type='NuScenesDataset',
path=data_dir,
split='val',
category_name=category_name,
preloading=False
),
)
train_dataloader = dict(
dataset=train_dataset,
batch_size=batch_size,
num_workers=4,
persistent_workers=True,
drop_last=True,
sampler=dict(type='DefaultSampler', shuffle=True))
val_dataloader = dict(
dataset=test_dataset,
batch_size=1,
num_workers=4,
persistent_workers=True,
sampler=dict(type='DefaultSampler', shuffle=False),
collate_fn=lambda x: x,
)
test_dataloader = dict(
dataset=test_dataset,
batch_size=1,
num_workers=4,
persistent_workers=True,
sampler=dict(type='DefaultSampler', shuffle=False),
collate_fn=lambda x: x,
)