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
556 stars 66 forks source link

Prediction format issue #46

Closed Eralien closed 1 year ago

Eralien commented 1 year ago

Hi, thank you for your work. I have an issue regarding the format prediction part during evaluation for val/test in openlane_v2_dataset.py#L386.

The code sorted lane centerline prediction by their confidence, and stored them in the output result dictionary. However, the topology part did not get selected accordingly. I am not entirely sure, but based on the evaluation script function _mAP_topology_lclc, it seems that the sequence of lclc topology relies upon the lc pred.

If my observation is correct, a possible correction is:

prediction['topology_lclc'] = result['pred_topology_lclc'][sorted_index][:, sorted_index]
prediction['topology_lcte'] = result['pred_topology_lcte'][sorted_index]
faikit commented 1 year ago

Another option would be deleting the sorted_index

zen-d commented 1 year ago

Hi @faikit I would like to confirm that after deleting the sorted_index as you stated, simply removing the sorted_index in the next line (line 387) is OK? In other words, the fix should change these two lines https://github.com/OpenDriveLab/OpenLane-V2/blob/master/plugin/mmdet3d/baseline/datasets/openlane_v2_dataset.py#L386-L387 to one simple line in the following, without modifying any other things?

lanes, confidences = pred_lc[0], pred_lc[1][:, 0]
faikit commented 1 year ago

I think it should be fine. For the results, it is required to keep the order of predictions corresponded to the order in adjacency matrix. This bug lead to a misalignment of the oreders.

Note that the TOP scores might not have an obvious change that reasoning about the topology relationship is a hard problem.