Release MapQR + MapGR nuScenes 24ep checkpoint
Browse files- README.md +56 -0
- mapqr_mapgr_nusc_r50_24ep.pth +3 -0
- mapqr_mapgr_nusc_r50_24ep_config.py +485 -0
README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- autonomous-driving
|
| 5 |
+
- hd-map
|
| 6 |
+
- vectorized-map
|
| 7 |
+
- nuscenes
|
| 8 |
+
- mmdetection3d
|
| 9 |
+
datasets:
|
| 10 |
+
- nuscenes
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# MapGR: MapQR + MapGR checkpoint (nuScenes, ResNet-50, 24 epochs)
|
| 14 |
+
|
| 15 |
+
This repository hosts the released weights for **Learning Global Representation from Queries for Vectorized HD Map Construction** (ICML 2026, [arXiv:2510.06969](https://arxiv.org/abs/2510.06969), [project page](https://xr-lee.github.io/mapgr-demo/)).
|
| 16 |
+
|
| 17 |
+
Training and evaluation code, installation and data preparation are in the GitHub repository (`mapqr/` sub-project).
|
| 18 |
+
|
| 19 |
+
| File | Description |
|
| 20 |
+
|---|---|
|
| 21 |
+
| `mapqr_mapgr_nusc_r50_24ep.pth` | Model weights: `state_dict` plus minimal `meta`, no optimizer state. |
|
| 22 |
+
| `mapqr_mapgr_nusc_r50_24ep_config.py` | Fully resolved config, for reference. Train and evaluate with `mapqr/projects/configs/mapgr/mapqr_mapgr_nusc_r50_24ep.py` from the code repository. |
|
| 23 |
+
|
| 24 |
+
## Results (nuScenes val)
|
| 25 |
+
|
| 26 |
+
| | mAP<sub>1</sub> | mAP<sub>2</sub> | AP<sub>div</sub> / AP<sub>ped</sub> / AP<sub>bou</sub> (mAP<sub>2</sub> thresholds) |
|
| 27 |
+
|---|---|---|---|
|
| 28 |
+
| Paper (MapQR + MapGR, 24 ep) | 45.3 | 68.1 | 69.8 / 65.8 / 68.8 |
|
| 29 |
+
| This checkpoint | 44.87 | 67.96 | 69.35 / 64.95 / 69.57 |
|
| 30 |
+
|
| 31 |
+
mAP<sub>2</sub> averages Chamfer AP over the {0.5, 1.0, 1.5} m thresholds; mAP<sub>1</sub> averages over {0.2, 0.5, 1.0} m.
|
| 32 |
+
|
| 33 |
+
This checkpoint was **re-trained with the released code**. It is not the run reported in the paper.
|
| 34 |
+
|
| 35 |
+
- Training: 8 GPUs × 4 samples, fp16.
|
| 36 |
+
- The numbers above come from evaluating this exact file with the released `tools/test.py`.
|
| 37 |
+
- Repeated runs of this setting vary by roughly ±0.4 mAP<sub>2</sub>.
|
| 38 |
+
|
| 39 |
+
```shell
|
| 40 |
+
# inside mapqr/ of the code repository
|
| 41 |
+
wget -P ckpts https://huggingface.co/Lee1413/MapGR/resolve/main/mapqr_mapgr_nusc_r50_24ep.pth
|
| 42 |
+
./tools/dist_test_map.sh projects/configs/mapgr/mapqr_mapgr_nusc_r50_24ep.py ckpts/mapqr_mapgr_nusc_r50_24ep.pth 1
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
SHA-256 of `mapqr_mapgr_nusc_r50_24ep.pth`: `d4f868312234806b5c0a97ea2c7edf71173de3fac1d510742a99317e1c6f6916`
|
| 46 |
+
|
| 47 |
+
## Citation
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@inproceedings{qiu2026mapgr,
|
| 51 |
+
title = {Learning Global Representation from Queries for Vectorized {HD} Map Construction},
|
| 52 |
+
author = {Qiu, Shoumeng and Li, Xinrun and Long, Yang and Xue, Xiangyang and Ojha, Varun and Pu, Jian},
|
| 53 |
+
booktitle = {International Conference on Machine Learning (ICML)},
|
| 54 |
+
year = {2026}
|
| 55 |
+
}
|
| 56 |
+
```
|
mapqr_mapgr_nusc_r50_24ep.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4f868312234806b5c0a97ea2c7edf71173de3fac1d510742a99317e1c6f6916
|
| 3 |
+
size 658832805
|
mapqr_mapgr_nusc_r50_24ep_config.py
ADDED
|
@@ -0,0 +1,485 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
point_cloud_range = [-15.0, -30.0, -2.0, 15.0, 30.0, 2.0]
|
| 2 |
+
class_names = [
|
| 3 |
+
'car', 'truck', 'construction_vehicle', 'bus', 'trailer', 'barrier',
|
| 4 |
+
'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone'
|
| 5 |
+
]
|
| 6 |
+
dataset_type = 'CustomNuScenesOfflineLocalMapDataset'
|
| 7 |
+
data_root = 'data/nuscenes/'
|
| 8 |
+
input_modality = dict(
|
| 9 |
+
use_lidar=False,
|
| 10 |
+
use_camera=True,
|
| 11 |
+
use_radar=False,
|
| 12 |
+
use_map=False,
|
| 13 |
+
use_external=True)
|
| 14 |
+
file_client_args = dict(backend='disk')
|
| 15 |
+
train_pipeline = [
|
| 16 |
+
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
|
| 17 |
+
dict(type='RandomScaleImageMultiViewImage', scales=[0.5]),
|
| 18 |
+
dict(type='PhotoMetricDistortionMultiViewImage'),
|
| 19 |
+
dict(
|
| 20 |
+
type='NormalizeMultiviewImage',
|
| 21 |
+
mean=[123.675, 116.28, 103.53],
|
| 22 |
+
std=[58.395, 57.12, 57.375],
|
| 23 |
+
to_rgb=True),
|
| 24 |
+
dict(
|
| 25 |
+
type='LoadPointsFromFile',
|
| 26 |
+
coord_type='LIDAR',
|
| 27 |
+
load_dim=5,
|
| 28 |
+
use_dim=5,
|
| 29 |
+
file_client_args=dict(backend='disk')),
|
| 30 |
+
dict(
|
| 31 |
+
type='CustomPointToMultiViewDepth',
|
| 32 |
+
downsample=1,
|
| 33 |
+
grid_config=dict(
|
| 34 |
+
x=[-30.0, -30.0, 0.15],
|
| 35 |
+
y=[-15.0, -15.0, 0.15],
|
| 36 |
+
z=[-10, 10, 20],
|
| 37 |
+
depth=[1.0, 35.0, 0.5])),
|
| 38 |
+
dict(type='PadMultiViewImageDepth', size_divisor=32),
|
| 39 |
+
dict(
|
| 40 |
+
type='DefaultFormatBundle3D',
|
| 41 |
+
with_gt=False,
|
| 42 |
+
with_label=False,
|
| 43 |
+
class_names=['divider', 'ped_crossing', 'boundary']),
|
| 44 |
+
dict(type='CustomCollect3D', keys=['img', 'gt_depth'])
|
| 45 |
+
]
|
| 46 |
+
test_pipeline = [
|
| 47 |
+
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
|
| 48 |
+
dict(type='RandomScaleImageMultiViewImage', scales=[0.5]),
|
| 49 |
+
dict(
|
| 50 |
+
type='NormalizeMultiviewImage',
|
| 51 |
+
mean=[123.675, 116.28, 103.53],
|
| 52 |
+
std=[58.395, 57.12, 57.375],
|
| 53 |
+
to_rgb=True),
|
| 54 |
+
dict(
|
| 55 |
+
type='MultiScaleFlipAug3D',
|
| 56 |
+
img_scale=(1600, 900),
|
| 57 |
+
pts_scale_ratio=1,
|
| 58 |
+
flip=False,
|
| 59 |
+
transforms=[
|
| 60 |
+
dict(type='PadMultiViewImage', size_divisor=32),
|
| 61 |
+
dict(
|
| 62 |
+
type='DefaultFormatBundle3D',
|
| 63 |
+
with_gt=False,
|
| 64 |
+
with_label=False,
|
| 65 |
+
class_names=['divider', 'ped_crossing', 'boundary']),
|
| 66 |
+
dict(type='CustomCollect3D', keys=['img'])
|
| 67 |
+
])
|
| 68 |
+
]
|
| 69 |
+
eval_pipeline = [
|
| 70 |
+
dict(
|
| 71 |
+
type='LoadPointsFromFile',
|
| 72 |
+
coord_type='LIDAR',
|
| 73 |
+
load_dim=5,
|
| 74 |
+
use_dim=5,
|
| 75 |
+
file_client_args=dict(backend='disk')),
|
| 76 |
+
dict(
|
| 77 |
+
type='LoadPointsFromMultiSweeps',
|
| 78 |
+
sweeps_num=10,
|
| 79 |
+
file_client_args=dict(backend='disk')),
|
| 80 |
+
dict(
|
| 81 |
+
type='DefaultFormatBundle3D',
|
| 82 |
+
class_names=[
|
| 83 |
+
'car', 'truck', 'trailer', 'bus', 'construction_vehicle',
|
| 84 |
+
'bicycle', 'motorcycle', 'pedestrian', 'traffic_cone', 'barrier'
|
| 85 |
+
],
|
| 86 |
+
with_label=False),
|
| 87 |
+
dict(type='Collect3D', keys=['points'])
|
| 88 |
+
]
|
| 89 |
+
data = dict(
|
| 90 |
+
samples_per_gpu=4,
|
| 91 |
+
workers_per_gpu=8,
|
| 92 |
+
train=dict(
|
| 93 |
+
type='CustomNuScenesOfflineLocalMapDataset',
|
| 94 |
+
data_root='data/nuscenes/',
|
| 95 |
+
ann_file='data/nuscenes/nuscenes_map_infos_temporal_train.pkl',
|
| 96 |
+
pipeline=[
|
| 97 |
+
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
|
| 98 |
+
dict(type='RandomScaleImageMultiViewImage', scales=[0.5]),
|
| 99 |
+
dict(type='PhotoMetricDistortionMultiViewImage'),
|
| 100 |
+
dict(
|
| 101 |
+
type='NormalizeMultiviewImage',
|
| 102 |
+
mean=[123.675, 116.28, 103.53],
|
| 103 |
+
std=[58.395, 57.12, 57.375],
|
| 104 |
+
to_rgb=True),
|
| 105 |
+
dict(
|
| 106 |
+
type='LoadPointsFromFile',
|
| 107 |
+
coord_type='LIDAR',
|
| 108 |
+
load_dim=5,
|
| 109 |
+
use_dim=5,
|
| 110 |
+
file_client_args=dict(backend='disk')),
|
| 111 |
+
dict(
|
| 112 |
+
type='CustomPointToMultiViewDepth',
|
| 113 |
+
downsample=1,
|
| 114 |
+
grid_config=dict(
|
| 115 |
+
x=[-30.0, -30.0, 0.15],
|
| 116 |
+
y=[-15.0, -15.0, 0.15],
|
| 117 |
+
z=[-10, 10, 20],
|
| 118 |
+
depth=[1.0, 35.0, 0.5])),
|
| 119 |
+
dict(type='PadMultiViewImageDepth', size_divisor=32),
|
| 120 |
+
dict(
|
| 121 |
+
type='DefaultFormatBundle3D',
|
| 122 |
+
with_gt=False,
|
| 123 |
+
with_label=False,
|
| 124 |
+
class_names=['divider', 'ped_crossing', 'boundary']),
|
| 125 |
+
dict(type='CustomCollect3D', keys=['img', 'gt_depth'])
|
| 126 |
+
],
|
| 127 |
+
classes=[
|
| 128 |
+
'car', 'truck', 'construction_vehicle', 'bus', 'trailer',
|
| 129 |
+
'barrier', 'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone'
|
| 130 |
+
],
|
| 131 |
+
modality=dict(
|
| 132 |
+
use_lidar=False,
|
| 133 |
+
use_camera=True,
|
| 134 |
+
use_radar=False,
|
| 135 |
+
use_map=False,
|
| 136 |
+
use_external=True),
|
| 137 |
+
test_mode=False,
|
| 138 |
+
box_type_3d='LiDAR',
|
| 139 |
+
aux_seg=dict(
|
| 140 |
+
use_aux_seg=True,
|
| 141 |
+
bev_seg=True,
|
| 142 |
+
pv_seg=True,
|
| 143 |
+
seg_classes=3,
|
| 144 |
+
feat_down_sample=32,
|
| 145 |
+
pv_thickness=1),
|
| 146 |
+
use_valid_flag=True,
|
| 147 |
+
bev_size=(200, 100),
|
| 148 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 149 |
+
fixed_ptsnum_per_line=20,
|
| 150 |
+
eval_use_same_gt_sample_num_flag=True,
|
| 151 |
+
padding_value=-10000,
|
| 152 |
+
map_classes=['divider', 'ped_crossing', 'boundary'],
|
| 153 |
+
queue_length=1),
|
| 154 |
+
val=dict(
|
| 155 |
+
type='CustomNuScenesOfflineLocalMapDataset',
|
| 156 |
+
ann_file='data/nuscenes/nuscenes_map_infos_temporal_val.pkl',
|
| 157 |
+
pipeline=[
|
| 158 |
+
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
|
| 159 |
+
dict(type='RandomScaleImageMultiViewImage', scales=[0.5]),
|
| 160 |
+
dict(
|
| 161 |
+
type='NormalizeMultiviewImage',
|
| 162 |
+
mean=[123.675, 116.28, 103.53],
|
| 163 |
+
std=[58.395, 57.12, 57.375],
|
| 164 |
+
to_rgb=True),
|
| 165 |
+
dict(
|
| 166 |
+
type='MultiScaleFlipAug3D',
|
| 167 |
+
img_scale=(1600, 900),
|
| 168 |
+
pts_scale_ratio=1,
|
| 169 |
+
flip=False,
|
| 170 |
+
transforms=[
|
| 171 |
+
dict(type='PadMultiViewImage', size_divisor=32),
|
| 172 |
+
dict(
|
| 173 |
+
type='DefaultFormatBundle3D',
|
| 174 |
+
with_gt=False,
|
| 175 |
+
with_label=False,
|
| 176 |
+
class_names=['divider', 'ped_crossing', 'boundary']),
|
| 177 |
+
dict(type='CustomCollect3D', keys=['img'])
|
| 178 |
+
])
|
| 179 |
+
],
|
| 180 |
+
classes=[
|
| 181 |
+
'car', 'truck', 'construction_vehicle', 'bus', 'trailer',
|
| 182 |
+
'barrier', 'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone'
|
| 183 |
+
],
|
| 184 |
+
modality=dict(
|
| 185 |
+
use_lidar=False,
|
| 186 |
+
use_camera=True,
|
| 187 |
+
use_radar=False,
|
| 188 |
+
use_map=False,
|
| 189 |
+
use_external=True),
|
| 190 |
+
test_mode=True,
|
| 191 |
+
box_type_3d='LiDAR',
|
| 192 |
+
data_root='data/nuscenes/',
|
| 193 |
+
map_ann_file='data/nuscenes/nuscenes_map_anns_val.json',
|
| 194 |
+
bev_size=(200, 100),
|
| 195 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 196 |
+
fixed_ptsnum_per_line=20,
|
| 197 |
+
eval_use_same_gt_sample_num_flag=True,
|
| 198 |
+
padding_value=-10000,
|
| 199 |
+
map_classes=['divider', 'ped_crossing', 'boundary'],
|
| 200 |
+
samples_per_gpu=1),
|
| 201 |
+
test=dict(
|
| 202 |
+
type='CustomNuScenesOfflineLocalMapDataset',
|
| 203 |
+
data_root='data/nuscenes/',
|
| 204 |
+
ann_file='data/nuscenes/nuscenes_map_infos_temporal_val.pkl',
|
| 205 |
+
pipeline=[
|
| 206 |
+
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
|
| 207 |
+
dict(type='RandomScaleImageMultiViewImage', scales=[0.5]),
|
| 208 |
+
dict(
|
| 209 |
+
type='NormalizeMultiviewImage',
|
| 210 |
+
mean=[123.675, 116.28, 103.53],
|
| 211 |
+
std=[58.395, 57.12, 57.375],
|
| 212 |
+
to_rgb=True),
|
| 213 |
+
dict(
|
| 214 |
+
type='MultiScaleFlipAug3D',
|
| 215 |
+
img_scale=(1600, 900),
|
| 216 |
+
pts_scale_ratio=1,
|
| 217 |
+
flip=False,
|
| 218 |
+
transforms=[
|
| 219 |
+
dict(type='PadMultiViewImage', size_divisor=32),
|
| 220 |
+
dict(
|
| 221 |
+
type='DefaultFormatBundle3D',
|
| 222 |
+
with_gt=False,
|
| 223 |
+
with_label=False,
|
| 224 |
+
class_names=['divider', 'ped_crossing', 'boundary']),
|
| 225 |
+
dict(type='CustomCollect3D', keys=['img'])
|
| 226 |
+
])
|
| 227 |
+
],
|
| 228 |
+
classes=[
|
| 229 |
+
'car', 'truck', 'construction_vehicle', 'bus', 'trailer',
|
| 230 |
+
'barrier', 'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone'
|
| 231 |
+
],
|
| 232 |
+
modality=dict(
|
| 233 |
+
use_lidar=False,
|
| 234 |
+
use_camera=True,
|
| 235 |
+
use_radar=False,
|
| 236 |
+
use_map=False,
|
| 237 |
+
use_external=True),
|
| 238 |
+
test_mode=True,
|
| 239 |
+
box_type_3d='LiDAR',
|
| 240 |
+
map_ann_file='data/nuscenes/nuscenes_map_anns_val.json',
|
| 241 |
+
bev_size=(200, 100),
|
| 242 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 243 |
+
fixed_ptsnum_per_line=20,
|
| 244 |
+
eval_use_same_gt_sample_num_flag=True,
|
| 245 |
+
padding_value=-10000,
|
| 246 |
+
map_classes=['divider', 'ped_crossing', 'boundary']),
|
| 247 |
+
shuffler_sampler=dict(type='DistributedGroupSampler'),
|
| 248 |
+
nonshuffler_sampler=dict(type='DistributedSampler'))
|
| 249 |
+
evaluation = dict(
|
| 250 |
+
interval=12,
|
| 251 |
+
pipeline=[
|
| 252 |
+
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
|
| 253 |
+
dict(type='RandomScaleImageMultiViewImage', scales=[0.5]),
|
| 254 |
+
dict(
|
| 255 |
+
type='NormalizeMultiviewImage',
|
| 256 |
+
mean=[123.675, 116.28, 103.53],
|
| 257 |
+
std=[58.395, 57.12, 57.375],
|
| 258 |
+
to_rgb=True),
|
| 259 |
+
dict(
|
| 260 |
+
type='MultiScaleFlipAug3D',
|
| 261 |
+
img_scale=(1600, 900),
|
| 262 |
+
pts_scale_ratio=1,
|
| 263 |
+
flip=False,
|
| 264 |
+
transforms=[
|
| 265 |
+
dict(type='PadMultiViewImage', size_divisor=32),
|
| 266 |
+
dict(
|
| 267 |
+
type='DefaultFormatBundle3D',
|
| 268 |
+
with_gt=False,
|
| 269 |
+
with_label=False,
|
| 270 |
+
class_names=['divider', 'ped_crossing', 'boundary']),
|
| 271 |
+
dict(type='CustomCollect3D', keys=['img'])
|
| 272 |
+
])
|
| 273 |
+
],
|
| 274 |
+
metric='chamfer',
|
| 275 |
+
save_best='NuscMap_chamfer/mAP',
|
| 276 |
+
rule='greater')
|
| 277 |
+
checkpoint_config = dict(interval=1, max_keep_ckpts=1)
|
| 278 |
+
log_config = dict(
|
| 279 |
+
interval=50,
|
| 280 |
+
hooks=[dict(type='TextLoggerHook'),
|
| 281 |
+
dict(type='TensorboardLoggerHook')])
|
| 282 |
+
dist_params = dict(backend='nccl')
|
| 283 |
+
log_level = 'INFO'
|
| 284 |
+
work_dir = None
|
| 285 |
+
load_from = None
|
| 286 |
+
resume_from = None
|
| 287 |
+
workflow = [('train', 1)]
|
| 288 |
+
plugin = True
|
| 289 |
+
plugin_dir = 'projects/mmdet3d_plugin/'
|
| 290 |
+
voxel_size = [0.15, 0.15, 4.0]
|
| 291 |
+
dbound = [1.0, 35.0, 0.5]
|
| 292 |
+
grid_config = dict(
|
| 293 |
+
x=[-30.0, -30.0, 0.15],
|
| 294 |
+
y=[-15.0, -15.0, 0.15],
|
| 295 |
+
z=[-10, 10, 20],
|
| 296 |
+
depth=[1.0, 35.0, 0.5])
|
| 297 |
+
img_norm_cfg = dict(
|
| 298 |
+
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
|
| 299 |
+
map_classes = ['divider', 'ped_crossing', 'boundary']
|
| 300 |
+
num_vec = 50
|
| 301 |
+
fixed_ptsnum_per_gt_line = 20
|
| 302 |
+
fixed_ptsnum_per_pred_line = 20
|
| 303 |
+
eval_use_same_gt_sample_num_flag = True
|
| 304 |
+
num_map_classes = 3
|
| 305 |
+
_dim_ = 256
|
| 306 |
+
_pos_dim_ = 128
|
| 307 |
+
_ffn_dim_ = 512
|
| 308 |
+
_num_levels_ = 1
|
| 309 |
+
_num_points_in_pillar_ = 8
|
| 310 |
+
bev_h_ = 200
|
| 311 |
+
bev_w_ = 100
|
| 312 |
+
queue_length = 1
|
| 313 |
+
aux_seg_cfg = dict(
|
| 314 |
+
use_aux_seg=True,
|
| 315 |
+
bev_seg=True,
|
| 316 |
+
pv_seg=True,
|
| 317 |
+
seg_classes=3,
|
| 318 |
+
feat_down_sample=32,
|
| 319 |
+
pv_thickness=1)
|
| 320 |
+
model = dict(
|
| 321 |
+
type='MapTRv2',
|
| 322 |
+
use_grid_mask=True,
|
| 323 |
+
video_test_mode=False,
|
| 324 |
+
pretrained=dict(img='ckpts/resnet50-19c8e357.pth'),
|
| 325 |
+
img_backbone=dict(
|
| 326 |
+
type='ResNet',
|
| 327 |
+
depth=50,
|
| 328 |
+
num_stages=4,
|
| 329 |
+
out_indices=(3, ),
|
| 330 |
+
frozen_stages=1,
|
| 331 |
+
norm_cfg=dict(type='BN', requires_grad=False),
|
| 332 |
+
norm_eval=True,
|
| 333 |
+
style='pytorch'),
|
| 334 |
+
img_neck=dict(
|
| 335 |
+
type='FPN',
|
| 336 |
+
in_channels=[2048],
|
| 337 |
+
out_channels=256,
|
| 338 |
+
start_level=0,
|
| 339 |
+
add_extra_convs='on_output',
|
| 340 |
+
num_outs=1,
|
| 341 |
+
relu_before_extra_convs=True),
|
| 342 |
+
pts_bbox_head=dict(
|
| 343 |
+
type='MapTRv2Head',
|
| 344 |
+
bev_h=200,
|
| 345 |
+
bev_w=100,
|
| 346 |
+
num_query=900,
|
| 347 |
+
num_vec_one2one=100,
|
| 348 |
+
num_vec_one2many=600,
|
| 349 |
+
k_one2many=6,
|
| 350 |
+
num_pts_per_vec=20,
|
| 351 |
+
num_pts_per_gt_vec=20,
|
| 352 |
+
dir_interval=1,
|
| 353 |
+
query_embed_type='instance',
|
| 354 |
+
transform_method='minmax',
|
| 355 |
+
gt_shift_pts_pattern='v2',
|
| 356 |
+
num_classes=3,
|
| 357 |
+
in_channels=256,
|
| 358 |
+
sync_cls_avg_factor=True,
|
| 359 |
+
with_box_refine=True,
|
| 360 |
+
as_two_stage=False,
|
| 361 |
+
code_size=2,
|
| 362 |
+
code_weights=[1.0, 1.0, 1.0, 1.0],
|
| 363 |
+
aux_seg=dict(
|
| 364 |
+
use_aux_seg=True,
|
| 365 |
+
bev_seg=True,
|
| 366 |
+
pv_seg=True,
|
| 367 |
+
seg_classes=3,
|
| 368 |
+
feat_down_sample=32,
|
| 369 |
+
pv_thickness=1),
|
| 370 |
+
transformer=dict(
|
| 371 |
+
type='MapTRPerceptionTransformer',
|
| 372 |
+
rotate_prev_bev=True,
|
| 373 |
+
use_shift=True,
|
| 374 |
+
use_can_bus=True,
|
| 375 |
+
embed_dims=256,
|
| 376 |
+
encoder=dict(
|
| 377 |
+
type='BEVFormerEncoder',
|
| 378 |
+
num_layers=3,
|
| 379 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 380 |
+
num_points_in_pillar=8,
|
| 381 |
+
return_intermediate=False,
|
| 382 |
+
with_height_refine=True,
|
| 383 |
+
transformerlayers=dict(
|
| 384 |
+
type='BEVFormerLayer',
|
| 385 |
+
attn_cfgs=[
|
| 386 |
+
dict(
|
| 387 |
+
type='TemporalSelfAttention',
|
| 388 |
+
embed_dims=256,
|
| 389 |
+
num_levels=1),
|
| 390 |
+
dict(
|
| 391 |
+
type='HeightKernelAttention',
|
| 392 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 393 |
+
num_points_in_pillar=8,
|
| 394 |
+
attention=dict(
|
| 395 |
+
type='MSDeformableAttentionKernel',
|
| 396 |
+
embed_dims=256,
|
| 397 |
+
num_heads=8,
|
| 398 |
+
dilation=1,
|
| 399 |
+
kernel_size=(2, 4),
|
| 400 |
+
num_levels=1),
|
| 401 |
+
embed_dims=256)
|
| 402 |
+
],
|
| 403 |
+
feedforward_channels=512,
|
| 404 |
+
ffn_dropout=0.1,
|
| 405 |
+
operation_order=('self_attn', 'norm', 'cross_attn', 'norm',
|
| 406 |
+
'ffn', 'norm'))),
|
| 407 |
+
decoder=dict(
|
| 408 |
+
type='MapTRDecoder',
|
| 409 |
+
num_layers=6,
|
| 410 |
+
return_intermediate=True,
|
| 411 |
+
query_pos_embedding='instance',
|
| 412 |
+
num_pts_per_vec=20,
|
| 413 |
+
queru_mask_num=700,
|
| 414 |
+
transformerlayers=dict(
|
| 415 |
+
type='DetrTransformerDecoderLayer',
|
| 416 |
+
attn_cfgs=[
|
| 417 |
+
dict(
|
| 418 |
+
type='MultiheadAttention',
|
| 419 |
+
embed_dims=256,
|
| 420 |
+
num_heads=8,
|
| 421 |
+
dropout=0.1),
|
| 422 |
+
dict(
|
| 423 |
+
type='InstancePointAttention',
|
| 424 |
+
embed_dims=256,
|
| 425 |
+
num_levels=1,
|
| 426 |
+
num_pts_per_vec=20)
|
| 427 |
+
],
|
| 428 |
+
feedforward_channels=512,
|
| 429 |
+
ffn_dropout=0.1,
|
| 430 |
+
operation_order=('self_attn', 'norm', 'cross_attn', 'norm',
|
| 431 |
+
'ffn', 'norm')))),
|
| 432 |
+
bbox_coder=dict(
|
| 433 |
+
type='MapTRNMSFreeCoder',
|
| 434 |
+
post_center_range=[-20, -35, -20, -35, 20, 35, 20, 35],
|
| 435 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 436 |
+
max_num=50,
|
| 437 |
+
voxel_size=[0.15, 0.15, 4.0],
|
| 438 |
+
num_classes=3),
|
| 439 |
+
positional_encoding=dict(
|
| 440 |
+
type='LearnedPositionalEncoding',
|
| 441 |
+
num_feats=128,
|
| 442 |
+
row_num_embed=200,
|
| 443 |
+
col_num_embed=100),
|
| 444 |
+
loss_cls=dict(
|
| 445 |
+
type='FocalLoss',
|
| 446 |
+
use_sigmoid=True,
|
| 447 |
+
gamma=2.0,
|
| 448 |
+
alpha=0.25,
|
| 449 |
+
loss_weight=2.0),
|
| 450 |
+
loss_bbox=dict(type='L1Loss', loss_weight=0.0),
|
| 451 |
+
loss_iou=dict(type='GIoULoss', loss_weight=0.0),
|
| 452 |
+
loss_pts=dict(type='PtsL1Loss', loss_weight=5.0),
|
| 453 |
+
loss_dir=dict(type='PtsDirCosLoss', loss_weight=0.005),
|
| 454 |
+
loss_seg=dict(type='SimpleLoss', pos_weight=4.0, loss_weight=1.0),
|
| 455 |
+
loss_pv_seg=dict(type='SimpleLoss', pos_weight=1.0, loss_weight=2.0)),
|
| 456 |
+
train_cfg=dict(
|
| 457 |
+
pts=dict(
|
| 458 |
+
grid_size=[512, 512, 1],
|
| 459 |
+
voxel_size=[0.15, 0.15, 4.0],
|
| 460 |
+
point_cloud_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0],
|
| 461 |
+
out_size_factor=4,
|
| 462 |
+
assigner=dict(
|
| 463 |
+
type='MapTRAssigner',
|
| 464 |
+
cls_cost=dict(type='FocalLossCost', weight=2.0),
|
| 465 |
+
reg_cost=dict(
|
| 466 |
+
type='BBoxL1Cost', weight=0.0, box_format='xywh'),
|
| 467 |
+
iou_cost=dict(type='IoUCost', iou_mode='giou', weight=0.0),
|
| 468 |
+
pts_cost=dict(type='OrderedPtsL1Cost', weight=5),
|
| 469 |
+
pc_range=[-15.0, -30.0, -2.0, 15.0, 30.0, 2.0]))))
|
| 470 |
+
optimizer = dict(
|
| 471 |
+
type='AdamW',
|
| 472 |
+
lr=0.0006,
|
| 473 |
+
paramwise_cfg=dict(custom_keys=dict(img_backbone=dict(lr_mult=0.1))),
|
| 474 |
+
weight_decay=0.01)
|
| 475 |
+
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
|
| 476 |
+
lr_config = dict(
|
| 477 |
+
policy='CosineAnnealing',
|
| 478 |
+
warmup='linear',
|
| 479 |
+
warmup_iters=500,
|
| 480 |
+
warmup_ratio=0.3333333333333333,
|
| 481 |
+
min_lr_ratio=0.001)
|
| 482 |
+
total_epochs = 24
|
| 483 |
+
runner = dict(type='EpochBasedRunner', max_epochs=24)
|
| 484 |
+
fp16 = dict(loss_scale=512.0)
|
| 485 |
+
find_unused_parameters = True
|