-
Notifications
You must be signed in to change notification settings - Fork 6
/
van.py
77 lines (71 loc) · 1.76 KB
/
van.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
_base_ = '../default_runtime.py'
data_dir = '' # the root of the dataset
category_name = 'Van'
batch_size = 128
point_cloud_range = [-4.8, -4.8, -1.5, 4.8, 4.8, 1.5]
model = dict(
type='BEVTrack',
backbone=dict(type='VoxelNet',
point_cloud_range=point_cloud_range,
voxel_size=[0.075, 0.075, 0.15],
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='KittiDataset',
path=data_dir,
split='Train',
category_name=category_name,
preloading=True,
preload_offset=10
),
cfg=dict(
num_candidates=4,
target_thr=10,
search_thr=20,
point_cloud_range=point_cloud_range,
time_flip=False,
flip=False
)
)
test_dataset = dict(
type='TestSampler',
dataset=dict(
type='KittiDataset',
path=data_dir,
split='Test',
category_name=category_name,
preloading=True,
preload_offset=-1
),
)
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,
)