Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to train on ONCE-3DLanes without extrinsics? #11

Closed
Aguin opened this issue May 11, 2022 · 13 comments
Closed

How to train on ONCE-3DLanes without extrinsics? #11

Aguin opened this issue May 11, 2022 · 13 comments
Assignees
Labels
good first issue Good for newcomers TODO In TODO list

Comments

@Aguin
Copy link

Aguin commented May 11, 2022

As mentioned in this issue, ONCE dataset doesn't release camera extrinsics.
How to train Persformer on ONCE and reproduce your latest results?

@dyfcalid
Copy link
Collaborator

We just roughly give a fixed camera height and pitch angle to train the model (e.g., 1.5m camera height and 0.5 degree pitch angle). Although the BEV images generated in this way are not good enough, the model is still able to achieve a well detection result.

@Aguin
Copy link
Author

Aguin commented May 30, 2022

@dyfcalid thanks for your answer.
I trained the model on ONCE with 1.5 height and 0.5 pitch but got bad results. Did you also modify other configs such as anchors and bev ranges?

@dyfcalid
Copy link
Collaborator

We did not modify other configs for ONCE-3DLanes dataset. You may need to check the DataLoader to make sure the data is loaded and processed correctly. There are some differences in the data format between the ONCE dataset and the OpenLane dataset, including coordinate system definitions, etc. And when args.dataset_name='openlane', we have some special functions to handle it, so for ONCE-3DLanes dataset you will also need to modify the relevant part of the code at the same time.

@Aguin
Copy link
Author

Aguin commented May 31, 2022

Thank you for your advice, but I'm still a bit confused. I found that OpenLane filters and resamples points before anchor generation. Should I also perform these steps on ONCE?
https://github.com/OpenPerceptionX/PersFormer_3DLane/blob/main/data/Load_Data.py#L1550

In addition, it seems that ONCE and OpenLane use different interpolation methods. Does that matter?
https://github.com/once-3dlanes/once_3dlanes_benchmark/blob/master/evaluation/eval_utils.py#L252

@dyfcalid
Copy link
Collaborator

dyfcalid commented Jun 4, 2022

Sorry for late reply. The answer to the first question is yes, in OpenLane you need to make sure that the order of the coordinate points is from smallest to largest according to the y-value, but ONCE is the opposite.

The OpenLane and ONCE datasets have different evaluation metrics and methods, and do differ in their data processing. But this does not affect the model training, and you can calculate the corresponding evaluation results respectively in two benchmarks.

@canteen-man
Copy link

这也太神奇了,如果可以随便设一个相机pitch角,也超过了深度估计的方法,那岂不是也可以算不需要pitch角了吗,直接用标定值就行了。推理的时候,直接用固定pitch,不管是否有颠簸这些。

@ilnehc
Copy link
Collaborator

ilnehc commented Jun 22, 2022

@canteen-man Hi, the pitch angle and camera height here are solely used for the BEV transformation, which will not affect the evaluation. In another word, we can transform the 'incorrect' predicted 3D lane points in the world frame back to the camera frame with the 'wrong' pitch angle to compare with the ground truth. If you want accurate 3D points in the world, the calibrated extrinsic params are needed.

We did not ablate the influence of different fixed values of the pitch angle for extrinsic-free datasets such as ONCE. However, we believe a decent pitch angle in this case indeed can affect the difficulty for the model to regress.

@canteen-man
Copy link

@ilnehc ,感谢你的回复。但是我理解readme里CD error就是按照ONCE论文里的评价方法计算的吧。ONCE的数据集里的json保存的就是“正确”的世界坐标吧。

@ilnehc
Copy link
Collaborator

ilnehc commented Jun 22, 2022

@canteen-man

  1. Correct, it is under CD error metric with the evaluation code provided in ONCE dataset.
  2. It is in the camera frame, rather than the world or vehicle coordinate. We refer you to Is there the camera extrinsics provided? once-3dlanes/once_3dlanes_benchmark#1, and the original words (Sec. 3.1 Lane representations) in their paper.

@canteen-man
Copy link

canteen-man commented Jun 22, 2022

@canteen-man

  1. Correct, it is under CD error metric with the evaluation code provided in ONCE dataset.
  2. It is in the camera frame, rather than the world or vehicle coordinate. We refer you to Is there the camera extrinsics provided? once-3dlanes/once_3dlanes_benchmark#1, and the original words (Sec. 3.1 Lane representations) in their paper.

thank you。我之前错误的理解了你写的camera frame的意思,以为你说的是2D图像坐标了。
所以随便设一个pitch,还是能拿到正确的相机坐标系的点的。

@ilnehc ilnehc closed this as completed Jun 22, 2022
@ilnehc ilnehc pinned this issue Jun 22, 2022
@gggcy
Copy link

gggcy commented Aug 1, 2022

@ilnehc Hello,请问下,PersFormer在ONCE-3D的结果,是在3k+张验证集上得到的指标吗,因为我看ONCE-3D并没有公开8k+测试集的标注结果。

@ilnehc
Copy link
Collaborator

ilnehc commented Sep 2, 2022

@gggcy Yes.

@ChonghaoSima ChonghaoSima added the good first issue Good for newcomers label Sep 13, 2022
@ChonghaoSima ChonghaoSima added the TODO In TODO list label Sep 13, 2022
@ChonghaoSima ChonghaoSima reopened this Sep 13, 2022
@zihanding819
Copy link
Contributor

We just updated support for Persformer train & eval on Once dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers TODO In TODO list
Projects
None yet
Development

No branches or pull requests

7 participants