Skip to content

Commit 9369c1e

Browse files
authored
Merge pull request #60 from PeggyPeppa/master
delete_final_points_pedcrossing
2 parents 542633e + 72ff3ac commit 9369c1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

openlanev2/lanesegment/preprocessing/collect.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ 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-
meta[identifier]['annotation']['area'][i]['points'] = _fix_pts_interpolate(np.array(area['points']), n_points['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'])
7881
for i, lane_segment in enumerate(frame['annotation']['lane_segment']):
7982
meta[identifier]['annotation']['lane_segment'][i]['centerline'] = _fix_pts_interpolate(np.array(lane_segment['centerline']), n_points['centerline'])
8083
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)