Skip to content

Commit 0223939

Browse files
author
PeggyPeppa
committed
update map element bucket and related evaluation
1 parent b91105b commit 0223939

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

data/OpenLane-V2/preprocess-ls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
n_points={
4040
'area': 20,
4141
'centerline': 10,
42-
'left_laneline': 20,
43-
'right_laneline': 20,
42+
'left_laneline': 10,
43+
'right_laneline': 10,
4444
},
4545
)

data/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ It is recommended to use provided command line interface (CLI) for acceleration.
99
| --- | --- | --- | --- | --- | --- |
1010
| sample | OpenLane-V2 |[sample](https://drive.google.com/file/d/1Ni-L6u1MGKJRAfUXm39PdBIxdk_ntdc6/view?usp=share_link) | [sample](https://pan.baidu.com/s/1ncqwDtuihKTBZROL5vdCAQ?pwd=psev) | 21c607fa5a1930275b7f1409b25042a0 | ~300M |
1111
| subset_A | OpenLane-V2 | [info](https://drive.google.com/file/d/1t47lNF4H3WhSsAqgsl9lSLIeO0p6n8p4/view?usp=share_link) | [info](https://pan.baidu.com/s/1uXpX4hqlMJLm0W6l12dJ-A?pwd=6rzj) |95bf28ccf22583d20434d75800be065d | ~8.8G |
12-
| | Map Element Bucket | [info](https://drive.google.com/file/d/1g-woGcV6vvQ81_5T5eljN9CZ1B1q0ssf/view?usp=share_link) | [info](https://pan.baidu.com/s/1hRS6TVDMA5YpiE2JaeNHbA?pwd=fmdi) | 055d5c8f6ffd54d1255229e73477a687 | ~240M |
12+
| | Map Element Bucket | [info](https://drive.google.com/file/d/14Wr2Gv2kyogY7_ZLEClqY0-Uhz4S109f/view?usp=share_link) | [info](https://pan.baidu.com/s/110kXzVro4z1Ysz-POVRTbA?pwd=g6y7) | 1c1f9d49ecd47d6bc5bf093f38fb68c9 | ~240M |
1313
| | Image (train) | [image_0](https://drive.google.com/file/d/1jio4Gj3dNlXmSzebO6D7Uy5oz4EaTNTq/view?usp=share_link) | [image_0](https://pan.baidu.com/s/12aV4CoT8znEY12q4M8XFiw?pwd=m204) | 8ade7daeec1b64f8ab91a50c81d812f6 | ~14.0G |
1414
| | | [image_1](https://drive.google.com/file/d/1IgnvZ2UljL49AzNV6CGNGFLQo6tjNFJq/view?usp=share_link) | [image_1](https://pan.baidu.com/s/1SArnlA2_Om9o0xcGd6-EwA?pwd=khx8) | c78e776f79e2394d2d5d95b7b5985e0f | ~14.3G |
1515
| | | [image_2](https://drive.google.com/file/d/1ViEsK5hukjMGfOm_HrCiQPkGArWrT91o/view?usp=share_link) | [image_2](https://pan.baidu.com/s/1ZghG7gwJqFrGxCEcUffp8A?pwd=0xgm) | 4bf09079144aa54cb4dcd5ff6e00cf79 | ~14.2G |

openlanev2/centerline/evaluation/distance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def chamfer_distance(gt: np.ndarray, pred: np.ndarray) -> float:
8484
8585
"""
8686
assert gt.ndim == pred.ndim == 2 and gt.shape[1] == pred.shape[1]
87-
87+
if (gt[0] == gt[-1]).all():
88+
gt = gt[:-1]
8889
dist_mat = cdist(pred, gt)
8990

9091
dist_pred = dist_mat.min(-1).mean()

openlanev2/lanesegment/preprocessing/collect.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ def collect(root_path : str, data_dict : dict, collection : str, with_sd_map : b
7474
if 'annotation' not in frame:
7575
continue
7676
for i, area in enumerate(frame['annotation']['area']):
77-
if area['points'][0] == area['points'][-1]:
78-
meta[identifier]['annotation']['area'][i]['points'] = _fix_pts_interpolate(np.array(area['points']), n_points['area']+1)[:-1]
79-
else:
80-
meta[identifier]['annotation']['area'][i]['points'] = _fix_pts_interpolate(np.array(area['points']), n_points['area'])
77+
meta[identifier]['annotation']['area'][i]['points'] = _fix_pts_interpolate(np.array(area['points']), n_points['area'])
8178
for i, lane_segment in enumerate(frame['annotation']['lane_segment']):
8279
meta[identifier]['annotation']['lane_segment'][i]['centerline'] = _fix_pts_interpolate(np.array(lane_segment['centerline']), n_points['centerline'])
8380
meta[identifier]['annotation']['lane_segment'][i]['left_laneline'] = _fix_pts_interpolate(np.array(lane_segment['left_laneline']), n_points['left_laneline'])

0 commit comments

Comments
 (0)