nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.19k stars 616 forks source link

How to get BEV for lidar point cloud with a defined FOV and pixel resolution as numpy array #1019

Closed SM1991CODES closed 6 months ago

SM1991CODES commented 6 months ago

Hi, I would like to get a BEV for each sample (with and without multiple frames) for a defined FOV such as x:(0, 50), y(-25, 25), cell_res=0.1. This should give me a 500x500 BEV as a numpy array which I can later use to train. Similarly, each object's annotations (center) should also be mapped to corresponding pixels in the BEV.

I have a function of my own to transform the point clouds to flat vehicle and then do this. But, my final evaluation results show something is wrong. I don't get close to 1 AP for detection when I used the GT BEV labels converted to global frame as prediction.

I understand there may be several places where the error could arise from. But I just wanted to know, does the devkit have any such function which gives me a BEV and annotations in the BEV?

I know there is a render_sample_data(), but I think this simply creates an image, but I need it as npy and also need the object centers in the BEV as GT.

Best Regards Sambit

whyekit-motional commented 6 months ago

@SM1991CODES your requirement seems quite specific, and unfortunately the devkit doesn't have any function which fulfills your requirement