open-mmlab / OpenPCDet

OpenPCDet Toolbox for LiDAR-based 3D Object Detection.
Apache License 2.0
4.66k stars 1.3k forks source link

How to visualize the detection results on the nuscenes dataset #896

Closed gkd2020 closed 2 years ago

gkd2020 commented 2 years ago

hi,

Thanks for your great work! I want to visualize detection results. Specifically, I want to save a lot of visualization results(3d pointcloud image or camera image) and select some of them. But I do not know how to do. After I run test.py, two result files are generated, result.pkl and results_nusc.json . What is the differences between result.pkl and results_nusc.json. I guess results_nusc.json uses the nuscenes official format ?Can I export the results_nusc.json and save the visual results in batches using the nuscenes-devkit ?

Can you give me some suggestions on how to save the visual results of nuscenes in batches. Many thanks!

MartinHahner commented 2 years ago

You can visualize result.pkl via drag&drop with this point cloud viewer and some code changes on your end. Eventually, I am trying to create a pull request to OpenPCDet with this point cloud viewer, but did not have the time to do so yet.

gkd2020 commented 2 years ago

You can visualize result.pkl via drag&drop with this point cloud viewer and some code changes on your end. Eventually, I am trying to create a pull request to OpenPCDet with this point cloud viewer, but did not have the time to do so yet.

Hi, @MartinHahner Thanks for your work, pointcloud_viewer.py can display point cloud files very conveniently. But, I can not load result.pickle of nuscenes. I followed your prompt and dragged the result.pkl file into the window.

Traceback (most recent call last):
  File "/home/zzy/PycharmProjects/LiDAR_fog_sim/pointcloud_viewer.py", line 1872, in dropEvent
    self.create_file_list(Path(self.droppedFilename).parent, self.droppedFilename)
  File "/home/zzy/PycharmProjects/LiDAR_fog_sim/pointcloud_viewer.py", line 1258, in create_file_list
    self.show_pcdet_dict(self.file_list[self.index])
  File "/home/zzy/PycharmProjects/LiDAR_fog_sim/pointcloud_viewer.py", line 1327, in show_pcdet_dict
    pc = pcdet_dict['points']
TypeError: list indices must be integers or slices, not str

Then,I tried to operate directly on the GUI

1648214190(1)

Traceback (most recent call last):
  File "/home/zzy/PycharmProjects/LiDAR_fog_sim/pointcloud_viewer.py", line 979, in load_nuscenes
    self.file_list.append(NUSCENES + file)
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'

I can't use this tool successfully. Can you tell me how to use it in details
Many thanks!

MartinHahner commented 2 years ago

I can't use this tool successfully. Can you tell me how to use it in detail?

I am sorry, but you have to debug the code yourself and then adjust it to your needs.