robot-learning-freiburg / PanopticBEV

Bird's-Eye-View Panoptic Segmentation Using Monocular Frontal View Images. http://panoptic-bev.cs.uni-freiburg.de
http://panoptic-bev.cs.uni-freiburg.de
123 stars 22 forks source link

How to visualize the result #6

Closed ShangyinGao closed 2 years ago

ShangyinGao commented 2 years ago

Dear authors,

thanks for your great work. I have trained one model myself and want to see the visualized output(like Fig.1 in your paper). I found one script under the path panoptic_bev/utils/visualization.py. But don't know the way to use it.

Could please tell me the way to visualize the result?

Bests,

nikhilgosala commented 2 years ago

Hi Shangyin,

Thank you for your interest in our work. We have not released the code for generating images like Fig.1 in the paper. However, we have provided the code for visualising images like Fig.4 in the paper.

To do so, call the save_panoptic_output() function provided in the panoptic_bev/utils/visualisation.py file from line 225 of the panoptic_bev/models/panoptic_bev.py file.

You can add the following code at line 225 of `panoptic_bev/models/panoptic_bev.py' file:

save_tuple = (save_path, sample_name)  # save_path is the path to the save directory. You can get sample_name by passing idxs[0] from the validate() function
po_pred_unpack = [po_pred[0][0], po_pred[1][0], None, po_pred[2][0]]
save_panoptic_output(po_pred_unpack, "po_pred", save_tuple, num_stuff=self.num_stuff, dataset=self.dataset, cam_name="front")
ShangyinGao commented 2 years ago

It works. Thank you