OpenDriveLab / OpenLane-V2

[NeurIPS 2023 Track Datasets and Benchmarks] OpenLane-V2: The First Perception and Reasoning Benchmark for Road Driving
https://proceedings.neurips.cc/paper_files/paper/2023/hash/3c0a4c8c236144f1b99b7e1531debe9c-Abstract-Datasets_and_Benchmarks.html
Apache License 2.0
541 stars 65 forks source link

Identifying Relevant Centerline for Assessing Driver's Trajectory Deviation and Lane Offset Calculation #96

Closed saran9991 closed 7 months ago

saran9991 commented 8 months ago

Hello,

I have been exploring the dataset and have come across an issue that I hope you can help clarify. My objective is to understand how much the driver is deviating from the centerline on the lane that it's following ( trajectory ). As per the paper, the driver vehicle is assumed to be at the origin (0, 0, 0), with all annotations made relative to this point.

For every frame in the dataset, there are multiple annotated centerlines, including intersecting, diverging, and those extending left and right. Each of these centerlines is represented as a set of 3D coordinates. However, it's not clear to me which specific centerline the driver is following at any given time and since my task is to assess how much the driver is deviating in its trajectory from the centerline, I'm kind of confused.

Is there a way to determine which centerline out of the many is the one that the driver is following in each frame ( for the driver's trajectory ) ?

Similarly, another one of my tasks is to calculate the driver offset from the left and right lane but from what I noticed, I had a similar confusion with the LS annotations.

I am relatively new to this, please let me know what I'm missing! Thank you for your time and effort in maintaining this valuable resource.

sephyli commented 8 months ago

Good question. You need to calculate the distance between the lane's centerline and the ego vehicle's location.

Given centerlines in shape of [n_lines, n_points, 3], you can usenp.linalg.norm(centerlines, axis=-1).min(axis=-1).argmin() to obtain the index of the most closely centerline. To enhance accuracy, it's advisable to interpolate the line and increase the number of points. You can also use the frenet coordinate system of each centerline/laneline to calculate the offsets.

It's important to note that this particular approach is designed for a single timestamp and may not maintain temporal consistency. You need to add some time constraints and using tracking information of lane to achieve this.

sephyli commented 8 months ago

As for the lane segment label, you can calculate the BEV iou between ego bounding box and the lane segmet. You can also find the lane segment containing the (0, 0) point.