-
Notifications
You must be signed in to change notification settings - Fork 139
/
enet_culane.py
72 lines (63 loc) · 1.79 KB
/
enet_culane.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
from importmagician import import_from
with import_from('./'):
# Data pipeline
from configs.lane_detection.common.datasets.culane_seg import dataset
from configs.lane_detection.common.datasets.train_level0_288 import train_augmentation
from configs.lane_detection.common.datasets.test_288 import test_augmentation
# Optimization pipeline
from configs.lane_detection.common.optims.segloss_5class import loss
from configs.lane_detection.common.optims.sgd05 import optimizer
from configs.lane_detection.common.optims.ep12_poly_warmup200 import lr_scheduler
train = dict(
exp_name='enet_baseline_culane',
workers=10,
batch_size=20,
checkpoint=None,
# Device args
world_size=0,
dist_url='env://',
device='cuda',
val_num_steps=0, # Seg IoU validation (mostly useless)
save_dir='./checkpoints',
input_size=(288, 800),
original_size=(590, 1640),
num_classes=5,
num_epochs=12,
collate_fn=None, # 'dict_collate_fn' for LSTR
seg=True, # Seg-based method or not
)
test = dict(
exp_name='enet_baseline_culane',
workers=10,
batch_size=80,
checkpoint='./checkpoints/enet_baseline_culane/model.pt',
# Device args
device='cuda',
save_dir='./checkpoints',
seg=True,
gap=20,
ppl=18,
thresh=0.3,
collate_fn=None, # 'dict_collate_fn' for LSTR
input_size=(288, 800),
original_size=(590, 1640),
max_lane=4,
dataset_name='culane'
)
model = dict(
name='ENet',
num_classes=5,
encoder_relu=False,
decoder_relu=True,
dropout_1=0.01,
dropout_2=0.1,
encoder_only=False,
pretrained_weights=None,
lane_classifier_cfg=dict(
name='EDLaneExist',
num_output=5 - 1,
flattened_size=4500,
dropout=0.1,
pool='avg'
)
)