OpenDriveLab / UniAD

[CVPR 2023 Best Paper Award] Planning-oriented Autonomous Driving
Apache License 2.0
3.48k stars 385 forks source link

How to generate ground truth lable for occupancy prediction? #36

Closed haibao-yu closed 1 year ago

haibao-yu commented 1 year ago

Thanks for you great work!

As demonstrated in this paper, the occupancy model's ultimate output is a binary segmentation that indicates whether each BEV grid is free or occupied. The original nuScenes dataset does not provide an occupancy label. I am interested to know if there is any documentation available that explains the process of generating the ground truth label for occupancy prediction.

YTEP-ZHI commented 1 year ago

Hi, @haibao-yu. Please refer to this file for occupancy ground-truth generation: https://github.com/OpenDriveLab/UniAD/blob/main/projects/mmdet3d_plugin/datasets/pipelines/occflow_label.py. Briefly speaking, we draw the annotated 3d boxes of vehicles on a bev plane while ignoring the height of boxes. Pixels within boxes are filled with a "1" to indicate occupied regions, otherwise filled with "0" to indicate empty space.

As each ground-truth is a sequence of multi-frame future occupancy, the coordinates of all frames in the sequence should be transformed to align with the first frame.

haibao-yu commented 1 year ago

Thank you for your response. Based on the information provided, it seems that there is no direct connection between the usage of the Occupancy labels in UniAD and the Occupancy challenge described at https://github.com/CVPR2023-3D-Occupancy-Prediction/CVPR2023-3D-Occupancy-Prediction. Additionally, I am interested to know if BEV Occupancy is considered a sub-task of BEV detection in UniAD, considering that the occupancy outputs focuses solely on vehicle boxes.

YTEP-ZHI commented 1 year ago

@haibao-yu Yes, the 3d occupancy described in https://github.com/CVPR2023-3D-Occupancy-Prediction/CVPR2023-3D-Occupancy-Prediction has major differences with BEV occupancy in UniAD.

BEV occupancy also varies from detection:

haibao-yu commented 1 year ago

Thank you for your quick response.

Regarding the second concern about the relationship between BEV occupancy and BEV detection, I would like to explore the inclusion of motion forecasting information. Specifically, when we combine the detection frame, how does the predicted future trajectory of the dynamic target differ from the concept of occupancy in this context?

The reason I am interested in this question is that, in my perspective, the occupancy task seems to complement the 3D detection and related prediction tasks, such as abnormal object detection and corner case detection. However, it appears that in UniAD, BEV occupancy can be directly obtained through detection and motion forecasting.

YTEP-ZHI commented 1 year ago

the occupancy task seems to complement the 3D detection and related prediction tasks, such as abnormal object detection and corner case detection.

@haibao-yu Yes, this is also one of our motivations for introducing occupancy in UniAD. Additionally, the occupancy is per-grid supervised (supervise on the whole BEV plane), much denser than the training of detection (supervise on some sparse vectors in low dimension). Therefore, we think the resulting per-grid probability of occupancy is more reliable than that of detection results. For example, in detection results, a small digital error in the position/heading angle of an output vector would lead to significant deviations from the real-world state.

However, it appears that in UniAD, BEV occupancy can be directly obtained through detection and motion forecasting.

Yes, you can actually extract the future occupancy via some post-progresses on the detection and motion results. However, both detection and motion are trained with sparse supervision on low-dimension vectors, where a small digital error would lead to significant deviations in real world as I mentioned before. By combining their predictions together to obtain occupancy, their errors will be further accumulated $E = E{track} \cdot E{motion}$, making the results more unreliable.

That's why we directly learn occupancy with per-grid dense supervision.

haibao-yu commented 1 year ago

the occupancy task seems to complement the 3D detection and related prediction tasks, such as abnormal object detection and corner case detection.

@haibao-yu Yes, this is also one of our motivations for introducing occupancy in UniAD. Additionally, the occupancy is per-grid supervised (supervise on the whole BEV plane), much denser than the training of detection (supervise on some sparse vectors in low dimension). Therefore, we think the resulting per-grid probability of occupancy is more reliable than that of detection results. For example, in detection results, a small digital error in the position/heading angle of an output vector would lead to significant deviations from the real-world state.

However, it appears that in UniAD, BEV occupancy can be directly obtained through detection and motion forecasting.

Yes, you can actually extract the future occupancy via some post-progresses on the detection and motion results. However, both detection and motion are trained with sparse supervision on low-dimension vectors, where a small digital error would lead to significant deviations in real world as I mentioned before. By combining their predictions together to obtain occupancy, their errors will be further accumulated E=Etrack⋅Emotion, making the results more unreliable.

That's why we directly learn occupancy with per-grid dense supervision.

Very thanks for your response.

MPCheng-ZW commented 5 months ago

Thanks for your great job!

What are the connections and differences between occupancy prediction and occupancy flow prediction? Which one is employed in your paper?

Additionally, could you recommend some papers on BEV occupancy prediction?

Thanks again! 谢谢~