nutonomy / nuscenes-devkit

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

How to visualize the results of object detection #735

Closed gkd2020 closed 2 years ago

gkd2020 commented 2 years ago

Hello, I implemented my network in OpenPCDet framework. Now I want to visualize the object detection results. Specifically,I want save the results, and select some good pictures for my paper. I have two ways:

  1. Use open3d or mayavi for visualization, but I don't know how to save 3D results as pictures on a large scale.
  2. Project the result of detection onto the camera image, but I don't know how to coordinate the six cameras and how to project.

I want to know if there is a tool similar to kitti-viewer for nuscenes dataset to directly complete visualization Is there a visualization tool in nuscenes-devkit?

whyekit-motional commented 2 years ago

@gkd2020 for option 2, you could consider modifying the get_box method to read the predictions from your model: https://github.com/nutonomy/nuscenes-devkit/blob/85b918050644964731bdfc8d8f1d53012a34b96a/python-sdk/nuscenes/nuscenes.py#L315

Then you could possibly use render_sample_data to render your predictions in, say, CAM_FRONT: https://github.com/nutonomy/nuscenes-devkit/blob/85b918050644964731bdfc8d8f1d53012a34b96a/python-sdk/nuscenes/nuscenes.py#L548

NorthSummer commented 2 years ago

get_box

Hi, it seems that this method can only render one bounding box in a scene. How to render all of them?

whyekit-motional commented 2 years ago

@NorthSummer you can get multiple boxes via something like this: https://github.com/nutonomy/nuscenes-devkit/blob/85b918050644964731bdfc8d8f1d53012a34b96a/python-sdk/nuscenes/nuscenes.py#L279-L283