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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
auto_scale_lr = dict(base_batch_size=32, enable=False)
|
| 2 |
+
backbone_norm_cfg = dict(requires_grad=True, type='LN')
|
| 3 |
+
backend_args = None
|
| 4 |
+
class_names = [
|
| 5 |
+
'car',
|
| 6 |
+
'truck',
|
| 7 |
+
'construction_vehicle',
|
| 8 |
+
'bus',
|
| 9 |
+
'trailer',
|
| 10 |
+
'barrier',
|
| 11 |
+
'motorcycle',
|
| 12 |
+
'bicycle',
|
| 13 |
+
'pedestrian',
|
| 14 |
+
'traffic_cone',
|
| 15 |
+
]
|
| 16 |
+
custom_imports = dict(imports=[
|
| 17 |
+
'projects.PETR.petr',
|
| 18 |
+
])
|
| 19 |
+
data_prefix = dict(img='', pts='samples/LIDAR_TOP', sweeps='sweeps/LIDAR_TOP')
|
| 20 |
+
data_root = 'data/nuscenes/'
|
| 21 |
+
dataset_type = 'NuScenesDataset'
|
| 22 |
+
db_sampler = dict(
|
| 23 |
+
backend_args=None,
|
| 24 |
+
classes=[
|
| 25 |
+
'car',
|
| 26 |
+
'truck',
|
| 27 |
+
'construction_vehicle',
|
| 28 |
+
'bus',
|
| 29 |
+
'trailer',
|
| 30 |
+
'barrier',
|
| 31 |
+
'motorcycle',
|
| 32 |
+
'bicycle',
|
| 33 |
+
'pedestrian',
|
| 34 |
+
'traffic_cone',
|
| 35 |
+
],
|
| 36 |
+
data_root='data/nuscenes/',
|
| 37 |
+
info_path='data/nuscenes/nuscenes_dbinfos_train.pkl',
|
| 38 |
+
points_loader=dict(
|
| 39 |
+
backend_args=None,
|
| 40 |
+
coord_type='LIDAR',
|
| 41 |
+
load_dim=5,
|
| 42 |
+
type='LoadPointsFromFile',
|
| 43 |
+
use_dim=[
|
| 44 |
+
0,
|
| 45 |
+
1,
|
| 46 |
+
2,
|
| 47 |
+
3,
|
| 48 |
+
4,
|
| 49 |
+
]),
|
| 50 |
+
prepare=dict(
|
| 51 |
+
filter_by_difficulty=[
|
| 52 |
+
-1,
|
| 53 |
+
],
|
| 54 |
+
filter_by_min_points=dict(
|
| 55 |
+
barrier=5,
|
| 56 |
+
bicycle=5,
|
| 57 |
+
bus=5,
|
| 58 |
+
car=5,
|
| 59 |
+
construction_vehicle=5,
|
| 60 |
+
motorcycle=5,
|
| 61 |
+
pedestrian=5,
|
| 62 |
+
traffic_cone=5,
|
| 63 |
+
trailer=5,
|
| 64 |
+
truck=5)),
|
| 65 |
+
rate=1.0,
|
| 66 |
+
sample_groups=dict(
|
| 67 |
+
barrier=2,
|
| 68 |
+
bicycle=6,
|
| 69 |
+
bus=4,
|
| 70 |
+
car=2,
|
| 71 |
+
construction_vehicle=7,
|
| 72 |
+
motorcycle=6,
|
| 73 |
+
pedestrian=2,
|
| 74 |
+
traffic_cone=2,
|
| 75 |
+
trailer=6,
|
| 76 |
+
truck=3))
|
| 77 |
+
default_hooks = dict(
|
| 78 |
+
checkpoint=dict(interval=-1, type='CheckpointHook'),
|
| 79 |
+
logger=dict(interval=50, type='LoggerHook'),
|
| 80 |
+
param_scheduler=dict(type='ParamSchedulerHook'),
|
| 81 |
+
sampler_seed=dict(type='DistSamplerSeedHook'),
|
| 82 |
+
timer=dict(type='IterTimerHook'),
|
| 83 |
+
visualization=dict(type='Det3DVisualizationHook'))
|
| 84 |
+
default_scope = 'mmdet3d'
|
| 85 |
+
env_cfg = dict(
|
| 86 |
+
cudnn_benchmark=False,
|
| 87 |
+
dist_cfg=dict(backend='nccl'),
|
| 88 |
+
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
|
| 89 |
+
eval_pipeline = [
|
| 90 |
+
dict(
|
| 91 |
+
backend_args=None,
|
| 92 |
+
coord_type='LIDAR',
|
| 93 |
+
load_dim=5,
|
| 94 |
+
type='LoadPointsFromFile',
|
| 95 |
+
use_dim=5),
|
| 96 |
+
dict(
|
| 97 |
+
backend_args=None,
|
| 98 |
+
sweeps_num=10,
|
| 99 |
+
test_mode=True,
|
| 100 |
+
type='LoadPointsFromMultiSweeps'),
|
| 101 |
+
dict(keys=[
|
| 102 |
+
'points',
|
| 103 |
+
], type='Pack3DDetInputs'),
|
| 104 |
+
]
|
| 105 |
+
find_unused_parameters = False
|
| 106 |
+
ida_aug_conf = dict(
|
| 107 |
+
H=900,
|
| 108 |
+
W=1600,
|
| 109 |
+
bot_pct_lim=(
|
| 110 |
+
0.0,
|
| 111 |
+
0.0,
|
| 112 |
+
),
|
| 113 |
+
final_dim=(
|
| 114 |
+
320,
|
| 115 |
+
800,
|
| 116 |
+
),
|
| 117 |
+
rand_flip=True,
|
| 118 |
+
resize_lim=(
|
| 119 |
+
0.47,
|
| 120 |
+
0.625,
|
| 121 |
+
),
|
| 122 |
+
rot_lim=(
|
| 123 |
+
0.0,
|
| 124 |
+
0.0,
|
| 125 |
+
))
|
| 126 |
+
img_norm_cfg = dict(
|
| 127 |
+
mean=[
|
| 128 |
+
103.53,
|
| 129 |
+
116.28,
|
| 130 |
+
123.675,
|
| 131 |
+
],
|
| 132 |
+
std=[
|
| 133 |
+
57.375,
|
| 134 |
+
57.12,
|
| 135 |
+
58.395,
|
| 136 |
+
],
|
| 137 |
+
to_rgb=False)
|
| 138 |
+
input_modality = dict(use_camera=True, use_lidar=True)
|
| 139 |
+
launcher = 'none'
|
| 140 |
+
load_from = None
|
| 141 |
+
log_level = 'INFO'
|
| 142 |
+
log_processor = dict(by_epoch=True, type='LogProcessor', window_size=50)
|
| 143 |
+
lr = 0.0001
|
| 144 |
+
metainfo = dict(classes=[
|
| 145 |
+
'car',
|
| 146 |
+
'truck',
|
| 147 |
+
'construction_vehicle',
|
| 148 |
+
'bus',
|
| 149 |
+
'trailer',
|
| 150 |
+
'barrier',
|
| 151 |
+
'motorcycle',
|
| 152 |
+
'bicycle',
|
| 153 |
+
'pedestrian',
|
| 154 |
+
'traffic_cone',
|
| 155 |
+
])
|
| 156 |
+
model = dict(
|
| 157 |
+
data_preprocessor=dict(
|
| 158 |
+
bgr_to_rgb=False,
|
| 159 |
+
mean=[
|
| 160 |
+
103.53,
|
| 161 |
+
116.28,
|
| 162 |
+
123.675,
|
| 163 |
+
],
|
| 164 |
+
pad_size_divisor=32,
|
| 165 |
+
std=[
|
| 166 |
+
57.375,
|
| 167 |
+
57.12,
|
| 168 |
+
58.395,
|
| 169 |
+
],
|
| 170 |
+
type='Det3DDataPreprocessor'),
|
| 171 |
+
img_backbone=dict(
|
| 172 |
+
arch='regnetx_4.0gf',
|
| 173 |
+
init_cfg=dict(
|
| 174 |
+
checkpoint='open-mmlab://regnetx_4.0gf', type='Pretrained'),
|
| 175 |
+
out_indices=(
|
| 176 |
+
2,
|
| 177 |
+
3,
|
| 178 |
+
),
|
| 179 |
+
type='mmdet.RegNet'),
|
| 180 |
+
img_neck=dict(
|
| 181 |
+
in_channels=[
|
| 182 |
+
560,
|
| 183 |
+
1360,
|
| 184 |
+
], num_outs=2, out_channels=256, type='CPFPN'),
|
| 185 |
+
pts_bbox_head=dict(
|
| 186 |
+
LID=True,
|
| 187 |
+
bbox_coder=dict(
|
| 188 |
+
max_num=300,
|
| 189 |
+
num_classes=10,
|
| 190 |
+
pc_range=[
|
| 191 |
+
-51.2,
|
| 192 |
+
-51.2,
|
| 193 |
+
-5.0,
|
| 194 |
+
51.2,
|
| 195 |
+
51.2,
|
| 196 |
+
3.0,
|
| 197 |
+
],
|
| 198 |
+
post_center_range=[
|
| 199 |
+
-61.2,
|
| 200 |
+
-61.2,
|
| 201 |
+
-10.0,
|
| 202 |
+
61.2,
|
| 203 |
+
61.2,
|
| 204 |
+
10.0,
|
| 205 |
+
],
|
| 206 |
+
type='NMSFreeCoder',
|
| 207 |
+
voxel_size=[
|
| 208 |
+
0.2,
|
| 209 |
+
0.2,
|
| 210 |
+
8,
|
| 211 |
+
]),
|
| 212 |
+
in_channels=256,
|
| 213 |
+
loss_bbox=dict(loss_weight=0.25, type='mmdet.L1Loss'),
|
| 214 |
+
loss_cls=dict(
|
| 215 |
+
alpha=0.25,
|
| 216 |
+
gamma=2.0,
|
| 217 |
+
loss_weight=2.0,
|
| 218 |
+
type='mmdet.FocalLoss',
|
| 219 |
+
use_sigmoid=True),
|
| 220 |
+
loss_iou=dict(loss_weight=0.0, type='mmdet.GIoULoss'),
|
| 221 |
+
normedlinear=False,
|
| 222 |
+
num_classes=10,
|
| 223 |
+
num_query=900,
|
| 224 |
+
position_range=[
|
| 225 |
+
-61.2,
|
| 226 |
+
-61.2,
|
| 227 |
+
-10.0,
|
| 228 |
+
61.2,
|
| 229 |
+
61.2,
|
| 230 |
+
10.0,
|
| 231 |
+
],
|
| 232 |
+
positional_encoding=dict(
|
| 233 |
+
normalize=True, num_feats=128, type='SinePositionalEncoding3D'),
|
| 234 |
+
transformer=dict(
|
| 235 |
+
decoder=dict(
|
| 236 |
+
num_layers=6,
|
| 237 |
+
return_intermediate=True,
|
| 238 |
+
transformerlayers=dict(
|
| 239 |
+
attn_cfgs=[
|
| 240 |
+
dict(
|
| 241 |
+
attn_drop=0.1,
|
| 242 |
+
dropout_layer=dict(drop_prob=0.1, type='Dropout'),
|
| 243 |
+
embed_dims=256,
|
| 244 |
+
num_heads=8,
|
| 245 |
+
type='MultiheadAttention'),
|
| 246 |
+
dict(
|
| 247 |
+
attn_drop=0.1,
|
| 248 |
+
dropout_layer=dict(drop_prob=0.1, type='Dropout'),
|
| 249 |
+
embed_dims=256,
|
| 250 |
+
num_heads=8,
|
| 251 |
+
type='PETRMultiheadAttention'),
|
| 252 |
+
],
|
| 253 |
+
feedforward_channels=2048,
|
| 254 |
+
ffn_dropout=0.1,
|
| 255 |
+
operation_order=(
|
| 256 |
+
'self_attn',
|
| 257 |
+
'norm',
|
| 258 |
+
'cross_attn',
|
| 259 |
+
'norm',
|
| 260 |
+
'ffn',
|
| 261 |
+
'norm',
|
| 262 |
+
),
|
| 263 |
+
type='PETRTransformerDecoderLayer'),
|
| 264 |
+
type='PETRTransformerDecoder'),
|
| 265 |
+
type='PETRTransformer'),
|
| 266 |
+
type='PETRHead',
|
| 267 |
+
with_multiview=True,
|
| 268 |
+
with_position=True),
|
| 269 |
+
train_cfg=dict(
|
| 270 |
+
pts=dict(
|
| 271 |
+
assigner=dict(
|
| 272 |
+
cls_cost=dict(type='FocalLossCost', weight=2.0),
|
| 273 |
+
iou_cost=dict(type='IoUCost', weight=0.0),
|
| 274 |
+
pc_range=[
|
| 275 |
+
-51.2,
|
| 276 |
+
-51.2,
|
| 277 |
+
-5.0,
|
| 278 |
+
51.2,
|
| 279 |
+
51.2,
|
| 280 |
+
3.0,
|
| 281 |
+
],
|
| 282 |
+
reg_cost=dict(type='BBox3DL1Cost', weight=0.25),
|
| 283 |
+
type='HungarianAssigner3D'),
|
| 284 |
+
grid_size=[
|
| 285 |
+
512,
|
| 286 |
+
512,
|
| 287 |
+
1,
|
| 288 |
+
],
|
| 289 |
+
out_size_factor=4,
|
| 290 |
+
point_cloud_range=[
|
| 291 |
+
-51.2,
|
| 292 |
+
-51.2,
|
| 293 |
+
-5.0,
|
| 294 |
+
51.2,
|
| 295 |
+
51.2,
|
| 296 |
+
3.0,
|
| 297 |
+
],
|
| 298 |
+
voxel_size=[
|
| 299 |
+
0.2,
|
| 300 |
+
0.2,
|
| 301 |
+
8,
|
| 302 |
+
])),
|
| 303 |
+
type='PETR',
|
| 304 |
+
use_grid_mask=True)
|
| 305 |
+
num_epochs = 30
|
| 306 |
+
optim_wrapper = dict(
|
| 307 |
+
clip_grad=dict(max_norm=35, norm_type=2),
|
| 308 |
+
optimizer=dict(lr=0.0001, type='AdamW', weight_decay=0.01),
|
| 309 |
+
paramwise_cfg=dict(custom_keys=dict(img_backbone=dict(lr_mult=0.1))),
|
| 310 |
+
type='OptimWrapper')
|
| 311 |
+
param_scheduler = [
|
| 312 |
+
dict(
|
| 313 |
+
begin=0,
|
| 314 |
+
by_epoch=False,
|
| 315 |
+
end=1500,
|
| 316 |
+
start_factor=0.3333333333333333,
|
| 317 |
+
type='LinearLR'),
|
| 318 |
+
dict(T_max=30, by_epoch=True, type='CosineAnnealingLR'),
|
| 319 |
+
]
|
| 320 |
+
point_cloud_range = [
|
| 321 |
+
-51.2,
|
| 322 |
+
-51.2,
|
| 323 |
+
-5.0,
|
| 324 |
+
51.2,
|
| 325 |
+
51.2,
|
| 326 |
+
3.0,
|
| 327 |
+
]
|
| 328 |
+
randomness = dict(deterministic=False, diff_rank_seed=False, seed=1)
|
| 329 |
+
resume = False
|
| 330 |
+
test_cfg = dict()
|
| 331 |
+
test_dataloader = dict(
|
| 332 |
+
batch_size=1,
|
| 333 |
+
dataset=dict(
|
| 334 |
+
ann_file='nuscenes_infos_val.pkl',
|
| 335 |
+
backend_args=None,
|
| 336 |
+
box_type_3d='LiDAR',
|
| 337 |
+
data_prefix=dict(
|
| 338 |
+
CAM_BACK='samples/CAM_BACK',
|
| 339 |
+
CAM_BACK_LEFT='samples/CAM_BACK_LEFT',
|
| 340 |
+
CAM_BACK_RIGHT='samples/CAM_BACK_RIGHT',
|
| 341 |
+
CAM_FRONT='samples/CAM_FRONT',
|
| 342 |
+
CAM_FRONT_LEFT='samples/CAM_FRONT_LEFT',
|
| 343 |
+
CAM_FRONT_RIGHT='samples/CAM_FRONT_RIGHT',
|
| 344 |
+
img='',
|
| 345 |
+
pts='samples/LIDAR_TOP',
|
| 346 |
+
sweeps='sweeps/LIDAR_TOP'),
|
| 347 |
+
data_root='data/nuscenes/',
|
| 348 |
+
metainfo=dict(classes=[
|
| 349 |
+
'car',
|
| 350 |
+
'truck',
|
| 351 |
+
'construction_vehicle',
|
| 352 |
+
'bus',
|
| 353 |
+
'trailer',
|
| 354 |
+
'barrier',
|
| 355 |
+
'motorcycle',
|
| 356 |
+
'bicycle',
|
| 357 |
+
'pedestrian',
|
| 358 |
+
'traffic_cone',
|
| 359 |
+
]),
|
| 360 |
+
modality=dict(use_camera=True, use_lidar=True),
|
| 361 |
+
pipeline=[
|
| 362 |
+
dict(
|
| 363 |
+
backend_args=None,
|
| 364 |
+
to_float32=True,
|
| 365 |
+
type='LoadMultiViewImageFromFiles'),
|
| 366 |
+
dict(
|
| 367 |
+
data_aug_conf=dict(
|
| 368 |
+
H=900,
|
| 369 |
+
W=1600,
|
| 370 |
+
bot_pct_lim=(
|
| 371 |
+
0.0,
|
| 372 |
+
0.0,
|
| 373 |
+
),
|
| 374 |
+
final_dim=(
|
| 375 |
+
320,
|
| 376 |
+
800,
|
| 377 |
+
),
|
| 378 |
+
rand_flip=True,
|
| 379 |
+
resize_lim=(
|
| 380 |
+
0.47,
|
| 381 |
+
0.625,
|
| 382 |
+
),
|
| 383 |
+
rot_lim=(
|
| 384 |
+
0.0,
|
| 385 |
+
0.0,
|
| 386 |
+
)),
|
| 387 |
+
training=False,
|
| 388 |
+
type='ResizeCropFlipImage'),
|
| 389 |
+
dict(keys=[
|
| 390 |
+
'img',
|
| 391 |
+
], type='Pack3DDetInputs'),
|
| 392 |
+
],
|
| 393 |
+
test_mode=True,
|
| 394 |
+
type='NuScenesDataset',
|
| 395 |
+
use_valid_flag=True),
|
| 396 |
+
drop_last=False,
|
| 397 |
+
num_workers=1,
|
| 398 |
+
persistent_workers=True,
|
| 399 |
+
sampler=dict(shuffle=False, type='DefaultSampler'))
|
| 400 |
+
test_evaluator = dict(
|
| 401 |
+
ann_file='data/nuscenes/nuscenes_infos_val.pkl',
|
| 402 |
+
backend_args=None,
|
| 403 |
+
data_root='data/nuscenes/',
|
| 404 |
+
metric='bbox',
|
| 405 |
+
type='NuScenesMetric')
|
| 406 |
+
test_pipeline = [
|
| 407 |
+
dict(
|
| 408 |
+
backend_args=None, to_float32=True,
|
| 409 |
+
type='LoadMultiViewImageFromFiles'),
|
| 410 |
+
dict(
|
| 411 |
+
data_aug_conf=dict(
|
| 412 |
+
H=900,
|
| 413 |
+
W=1600,
|
| 414 |
+
bot_pct_lim=(
|
| 415 |
+
0.0,
|
| 416 |
+
0.0,
|
| 417 |
+
),
|
| 418 |
+
final_dim=(
|
| 419 |
+
320,
|
| 420 |
+
800,
|
| 421 |
+
),
|
| 422 |
+
rand_flip=True,
|
| 423 |
+
resize_lim=(
|
| 424 |
+
0.47,
|
| 425 |
+
0.625,
|
| 426 |
+
),
|
| 427 |
+
rot_lim=(
|
| 428 |
+
0.0,
|
| 429 |
+
0.0,
|
| 430 |
+
)),
|
| 431 |
+
training=False,
|
| 432 |
+
type='ResizeCropFlipImage'),
|
| 433 |
+
dict(keys=[
|
| 434 |
+
'img',
|
| 435 |
+
], type='Pack3DDetInputs'),
|
| 436 |
+
]
|
| 437 |
+
train_cfg = dict(by_epoch=True, max_epochs=30, val_interval=3)
|
| 438 |
+
train_dataloader = dict(
|
| 439 |
+
batch_size=1,
|
| 440 |
+
dataset=dict(
|
| 441 |
+
ann_file='nuscenes_infos_train.pkl',
|
| 442 |
+
backend_args=None,
|
| 443 |
+
box_type_3d='LiDAR',
|
| 444 |
+
data_prefix=dict(
|
| 445 |
+
CAM_BACK='samples/CAM_BACK',
|
| 446 |
+
CAM_BACK_LEFT='samples/CAM_BACK_LEFT',
|
| 447 |
+
CAM_BACK_RIGHT='samples/CAM_BACK_RIGHT',
|
| 448 |
+
CAM_FRONT='samples/CAM_FRONT',
|
| 449 |
+
CAM_FRONT_LEFT='samples/CAM_FRONT_LEFT',
|
| 450 |
+
CAM_FRONT_RIGHT='samples/CAM_FRONT_RIGHT',
|
| 451 |
+
img='',
|
| 452 |
+
pts='samples/LIDAR_TOP',
|
| 453 |
+
sweeps='sweeps/LIDAR_TOP'),
|
| 454 |
+
data_root='data/nuscenes/',
|
| 455 |
+
metainfo=dict(classes=[
|
| 456 |
+
'car',
|
| 457 |
+
'truck',
|
| 458 |
+
'construction_vehicle',
|
| 459 |
+
'bus',
|
| 460 |
+
'trailer',
|
| 461 |
+
'barrier',
|
| 462 |
+
'motorcycle',
|
| 463 |
+
'bicycle',
|
| 464 |
+
'pedestrian',
|
| 465 |
+
'traffic_cone',
|
| 466 |
+
]),
|
| 467 |
+
modality=dict(use_camera=True, use_lidar=True),
|
| 468 |
+
pipeline=[
|
| 469 |
+
dict(
|
| 470 |
+
backend_args=None,
|
| 471 |
+
to_float32=True,
|
| 472 |
+
type='LoadMultiViewImageFromFiles'),
|
| 473 |
+
dict(
|
| 474 |
+
type='LoadAnnotations3D',
|
| 475 |
+
with_attr_label=False,
|
| 476 |
+
with_bbox_3d=True,
|
| 477 |
+
with_label_3d=True),
|
| 478 |
+
dict(
|
| 479 |
+
point_cloud_range=[
|
| 480 |
+
-51.2,
|
| 481 |
+
-51.2,
|
| 482 |
+
-5.0,
|
| 483 |
+
51.2,
|
| 484 |
+
51.2,
|
| 485 |
+
3.0,
|
| 486 |
+
],
|
| 487 |
+
type='ObjectRangeFilter'),
|
| 488 |
+
dict(
|
| 489 |
+
classes=[
|
| 490 |
+
'car',
|
| 491 |
+
'truck',
|
| 492 |
+
'construction_vehicle',
|
| 493 |
+
'bus',
|
| 494 |
+
'trailer',
|
| 495 |
+
'barrier',
|
| 496 |
+
'motorcycle',
|
| 497 |
+
'bicycle',
|
| 498 |
+
'pedestrian',
|
| 499 |
+
'traffic_cone',
|
| 500 |
+
],
|
| 501 |
+
type='ObjectNameFilter'),
|
| 502 |
+
dict(
|
| 503 |
+
data_aug_conf=dict(
|
| 504 |
+
H=900,
|
| 505 |
+
W=1600,
|
| 506 |
+
bot_pct_lim=(
|
| 507 |
+
0.0,
|
| 508 |
+
0.0,
|
| 509 |
+
),
|
| 510 |
+
final_dim=(
|
| 511 |
+
320,
|
| 512 |
+
800,
|
| 513 |
+
),
|
| 514 |
+
rand_flip=True,
|
| 515 |
+
resize_lim=(
|
| 516 |
+
0.47,
|
| 517 |
+
0.625,
|
| 518 |
+
),
|
| 519 |
+
rot_lim=(
|
| 520 |
+
0.0,
|
| 521 |
+
0.0,
|
| 522 |
+
)),
|
| 523 |
+
training=True,
|
| 524 |
+
type='ResizeCropFlipImage'),
|
| 525 |
+
dict(
|
| 526 |
+
reverse_angle=False,
|
| 527 |
+
rot_range=[
|
| 528 |
+
-0.3925,
|
| 529 |
+
0.3925,
|
| 530 |
+
],
|
| 531 |
+
scale_ratio_range=[
|
| 532 |
+
0.95,
|
| 533 |
+
1.05,
|
| 534 |
+
],
|
| 535 |
+
training=True,
|
| 536 |
+
translation_std=[
|
| 537 |
+
0,
|
| 538 |
+
0,
|
| 539 |
+
0,
|
| 540 |
+
],
|
| 541 |
+
type='GlobalRotScaleTransImage'),
|
| 542 |
+
dict(
|
| 543 |
+
keys=[
|
| 544 |
+
'img',
|
| 545 |
+
'gt_bboxes',
|
| 546 |
+
'gt_bboxes_labels',
|
| 547 |
+
'attr_labels',
|
| 548 |
+
'gt_bboxes_3d',
|
| 549 |
+
'gt_labels_3d',
|
| 550 |
+
'centers_2d',
|
| 551 |
+
'depths',
|
| 552 |
+
],
|
| 553 |
+
type='Pack3DDetInputs'),
|
| 554 |
+
],
|
| 555 |
+
test_mode=False,
|
| 556 |
+
type='NuScenesDataset',
|
| 557 |
+
use_valid_flag=True),
|
| 558 |
+
num_workers=4,
|
| 559 |
+
persistent_workers=True,
|
| 560 |
+
sampler=dict(shuffle=True, type='DefaultSampler'))
|
| 561 |
+
train_pipeline = [
|
| 562 |
+
dict(
|
| 563 |
+
backend_args=None, to_float32=True,
|
| 564 |
+
type='LoadMultiViewImageFromFiles'),
|
| 565 |
+
dict(
|
| 566 |
+
type='LoadAnnotations3D',
|
| 567 |
+
with_attr_label=False,
|
| 568 |
+
with_bbox_3d=True,
|
| 569 |
+
with_label_3d=True),
|
| 570 |
+
dict(
|
| 571 |
+
point_cloud_range=[
|
| 572 |
+
-51.2,
|
| 573 |
+
-51.2,
|
| 574 |
+
-5.0,
|
| 575 |
+
51.2,
|
| 576 |
+
51.2,
|
| 577 |
+
3.0,
|
| 578 |
+
],
|
| 579 |
+
type='ObjectRangeFilter'),
|
| 580 |
+
dict(
|
| 581 |
+
classes=[
|
| 582 |
+
'car',
|
| 583 |
+
'truck',
|
| 584 |
+
'construction_vehicle',
|
| 585 |
+
'bus',
|
| 586 |
+
'trailer',
|
| 587 |
+
'barrier',
|
| 588 |
+
'motorcycle',
|
| 589 |
+
'bicycle',
|
| 590 |
+
'pedestrian',
|
| 591 |
+
'traffic_cone',
|
| 592 |
+
],
|
| 593 |
+
type='ObjectNameFilter'),
|
| 594 |
+
dict(
|
| 595 |
+
data_aug_conf=dict(
|
| 596 |
+
H=900,
|
| 597 |
+
W=1600,
|
| 598 |
+
bot_pct_lim=(
|
| 599 |
+
0.0,
|
| 600 |
+
0.0,
|
| 601 |
+
),
|
| 602 |
+
final_dim=(
|
| 603 |
+
320,
|
| 604 |
+
800,
|
| 605 |
+
),
|
| 606 |
+
rand_flip=True,
|
| 607 |
+
resize_lim=(
|
| 608 |
+
0.47,
|
| 609 |
+
0.625,
|
| 610 |
+
),
|
| 611 |
+
rot_lim=(
|
| 612 |
+
0.0,
|
| 613 |
+
0.0,
|
| 614 |
+
)),
|
| 615 |
+
training=True,
|
| 616 |
+
type='ResizeCropFlipImage'),
|
| 617 |
+
dict(
|
| 618 |
+
reverse_angle=False,
|
| 619 |
+
rot_range=[
|
| 620 |
+
-0.3925,
|
| 621 |
+
0.3925,
|
| 622 |
+
],
|
| 623 |
+
scale_ratio_range=[
|
| 624 |
+
0.95,
|
| 625 |
+
1.05,
|
| 626 |
+
],
|
| 627 |
+
training=True,
|
| 628 |
+
translation_std=[
|
| 629 |
+
0,
|
| 630 |
+
0,
|
| 631 |
+
0,
|
| 632 |
+
],
|
| 633 |
+
type='GlobalRotScaleTransImage'),
|
| 634 |
+
dict(
|
| 635 |
+
keys=[
|
| 636 |
+
'img',
|
| 637 |
+
'gt_bboxes',
|
| 638 |
+
'gt_bboxes_labels',
|
| 639 |
+
'attr_labels',
|
| 640 |
+
'gt_bboxes_3d',
|
| 641 |
+
'gt_labels_3d',
|
| 642 |
+
'centers_2d',
|
| 643 |
+
'depths',
|
| 644 |
+
],
|
| 645 |
+
type='Pack3DDetInputs'),
|
| 646 |
+
]
|
| 647 |
+
val_cfg = dict()
|
| 648 |
+
val_dataloader = dict(
|
| 649 |
+
batch_size=1,
|
| 650 |
+
dataset=dict(
|
| 651 |
+
ann_file='nuscenes_infos_val.pkl',
|
| 652 |
+
backend_args=None,
|
| 653 |
+
box_type_3d='LiDAR',
|
| 654 |
+
data_prefix=dict(
|
| 655 |
+
CAM_BACK='samples/CAM_BACK',
|
| 656 |
+
CAM_BACK_LEFT='samples/CAM_BACK_LEFT',
|
| 657 |
+
CAM_BACK_RIGHT='samples/CAM_BACK_RIGHT',
|
| 658 |
+
CAM_FRONT='samples/CAM_FRONT',
|
| 659 |
+
CAM_FRONT_LEFT='samples/CAM_FRONT_LEFT',
|
| 660 |
+
CAM_FRONT_RIGHT='samples/CAM_FRONT_RIGHT',
|
| 661 |
+
img='',
|
| 662 |
+
pts='samples/LIDAR_TOP',
|
| 663 |
+
sweeps='sweeps/LIDAR_TOP'),
|
| 664 |
+
data_root='data/nuscenes/',
|
| 665 |
+
metainfo=dict(classes=[
|
| 666 |
+
'car',
|
| 667 |
+
'truck',
|
| 668 |
+
'construction_vehicle',
|
| 669 |
+
'bus',
|
| 670 |
+
'trailer',
|
| 671 |
+
'barrier',
|
| 672 |
+
'motorcycle',
|
| 673 |
+
'bicycle',
|
| 674 |
+
'pedestrian',
|
| 675 |
+
'traffic_cone',
|
| 676 |
+
]),
|
| 677 |
+
modality=dict(use_camera=True, use_lidar=True),
|
| 678 |
+
pipeline=[
|
| 679 |
+
dict(
|
| 680 |
+
backend_args=None,
|
| 681 |
+
to_float32=True,
|
| 682 |
+
type='LoadMultiViewImageFromFiles'),
|
| 683 |
+
dict(
|
| 684 |
+
data_aug_conf=dict(
|
| 685 |
+
H=900,
|
| 686 |
+
W=1600,
|
| 687 |
+
bot_pct_lim=(
|
| 688 |
+
0.0,
|
| 689 |
+
0.0,
|
| 690 |
+
),
|
| 691 |
+
final_dim=(
|
| 692 |
+
320,
|
| 693 |
+
800,
|
| 694 |
+
),
|
| 695 |
+
rand_flip=True,
|
| 696 |
+
resize_lim=(
|
| 697 |
+
0.47,
|
| 698 |
+
0.625,
|
| 699 |
+
),
|
| 700 |
+
rot_lim=(
|
| 701 |
+
0.0,
|
| 702 |
+
0.0,
|
| 703 |
+
)),
|
| 704 |
+
training=False,
|
| 705 |
+
type='ResizeCropFlipImage'),
|
| 706 |
+
dict(keys=[
|
| 707 |
+
'img',
|
| 708 |
+
], type='Pack3DDetInputs'),
|
| 709 |
+
],
|
| 710 |
+
test_mode=True,
|
| 711 |
+
type='NuScenesDataset',
|
| 712 |
+
use_valid_flag=True),
|
| 713 |
+
drop_last=False,
|
| 714 |
+
num_workers=1,
|
| 715 |
+
persistent_workers=True,
|
| 716 |
+
sampler=dict(shuffle=False, type='DefaultSampler'))
|
| 717 |
+
val_evaluator = dict(
|
| 718 |
+
ann_file='data/nuscenes/nuscenes_infos_val.pkl',
|
| 719 |
+
backend_args=None,
|
| 720 |
+
data_root='data/nuscenes/',
|
| 721 |
+
metric='bbox',
|
| 722 |
+
type='NuScenesMetric')
|
| 723 |
+
vis_backends = [
|
| 724 |
+
dict(type='LocalVisBackend'),
|
| 725 |
+
]
|
| 726 |
+
visualizer = dict(
|
| 727 |
+
name='visualizer',
|
| 728 |
+
type='Det3DLocalVisualizer',
|
| 729 |
+
vis_backends=[
|
| 730 |
+
dict(type='LocalVisBackend'),
|
| 731 |
+
])
|
| 732 |
+
voxel_size = [
|
| 733 |
+
0.2,
|
| 734 |
+
0.2,
|
| 735 |
+
8,
|
| 736 |
+
]
|
| 737 |
+
work_dir = 'work_dirs/detr3d_nuscenes'
|