Skip to content

Commit 55416b5

Browse files
authored
Merge pull request #58 from OpenDriveLab/dlc
OpenLane-V2 Benchmark V2.0
2 parents f2b256a + b4d9549 commit 55416b5

File tree

88 files changed

+2854
-386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2854
-386
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ data/OpenLane-V2/*
138138
!data/OpenLane-V2/data_dict_sample.json
139139
!data/OpenLane-V2/data_dict_example.json
140140
!data/OpenLane-V2/openlanev2.md5
141-
!data/OpenLane-V2/preprocess.py
141+
!data/OpenLane-V2/preprocess*
142142
!data/OpenLane-V2/data_dict_subset_A.json
143143

144144
RoadData/vis

README-zh-hans.md

Lines changed: 0 additions & 279 deletions
This file was deleted.

data/OpenLane-V2/openlanev2.md5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ df62c1f6e6b3fb2a2a0868c78ab19c92 OpenLane-V2_subset_A_image_5.tar
99
c73af4a7aef2692b96e4e00795120504 OpenLane-V2_subset_A_image_7.tar
1010
fb2f61e7309e0b48e2697e085a66a259 OpenLane-V2_subset_A_image_8.tar
1111
95bf28ccf22583d20434d75800be065d OpenLane-V2_subset_A_info.tar
12+
de22c7be880b667f1b3373ff665aac2e OpenLane-V2_subset_A_sdmap.tar
13+
f85321cfc387fe97417af5e61cec9d2f OpenLane-V2_subset_A_info-ls.tar.gz

data/OpenLane-V2/preprocess-ls.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ==============================================================================
2+
# Binaries and/or source for the following packages or projects
3+
# are presented under one or more of the following open source licenses:
4+
# preprocess.py The OpenLane-V2 Dataset Authors Apache License, Version 2.0
5+
#
6+
# Contact wanghuijie@pjlab.org.cn if you have any issue.
7+
#
8+
# Copyright (c) 2023 The OpenLane-v2 Dataset Authors. All Rights Reserved.
9+
#
10+
# Licensed under the Apache License, Version 2.0 (the "License");
11+
# you may not use this file except in compliance with the License.
12+
# You may obtain a copy of the License at
13+
#
14+
# http://www.apache.org/licenses/LICENSE-2.0
15+
#
16+
# Unless required by applicable law or agreed to in writing, software
17+
# distributed under the License is distributed on an "AS IS" BASIS,
18+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
# See the License for the specific language governing permissions and
20+
# limitations under the License.
21+
# =============================================================================='
22+
23+
from openlanev2.centerline.io import io
24+
from openlanev2.lanesegment.preprocessing import collect
25+
26+
27+
with_sd_map = False # TODO: include SD Maps as sensor inputs or not
28+
29+
root_path = './OpenLane-V2'
30+
for file in io.os_listdir(root_path):
31+
if file.endswith('json'):
32+
subset = file.split('.')[0]
33+
for split, segments in io.json_load(f'{root_path}/{file}').items():
34+
collect(
35+
root_path,
36+
{split: segments},
37+
f'{subset}_{split}_ls' if not with_sd_map else f'{subset}_{split}_ls_sd',
38+
with_sd_map = with_sd_map,
39+
n_points={
40+
'area': 20,
41+
'centerline': 10,
42+
'left_laneline': 20,
43+
'right_laneline': 20,
44+
},
45+
)

data/OpenLane-V2/preprocess.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,22 @@
2020
# limitations under the License.
2121
# =============================================================================='
2222

23-
from openlanev2.io import io
24-
from openlanev2.preprocessing import collect
23+
from openlanev2.centerline.io import io
24+
from openlanev2.centerline.preprocessing import collect
25+
26+
27+
with_sd_map = False # TODO: include SD Maps as sensor inputs or not
2528

2629
root_path = './OpenLane-V2'
2730
for file in io.os_listdir(root_path):
2831
if file.endswith('json'):
2932
subset = file.split('.')[0]
3033
for split, segments in io.json_load(f'{root_path}/{file}').items():
3134
point_interval = 1 if split == 'train' else 20
32-
collect(root_path, {split: segments}, f'{subset}_{split}', point_interval=point_interval)
35+
collect(
36+
root_path,
37+
{split: segments},
38+
f'{subset}_{split}' if not with_sd_map else f'{subset}_{split}_sd',
39+
point_interval=point_interval,
40+
with_sd_map=with_sd_map,
41+
)

0 commit comments

Comments
 (0)