HuguesTHOMAS / KPConv-PyTorch

Kernel Point Convolution implemented in PyTorch
MIT License
783 stars 155 forks source link

Visualization of predictions of semantic-KITTI dataset #8

Closed KangchengLiu closed 3 years ago

KangchengLiu commented 4 years ago

I wonder how to do visualizations of predictions of semantic-KITTI dataset?

HuguesTHOMAS commented 4 years ago

Hi @KangchengLiu,

In the log folder of your experiment, the predictions are save in .ply files. You just have to open these files with a pointcloud visualization tools like CloudCompare or a visualization library like open3D or Mayavi

KangchengLiu commented 4 years ago

That's easy, thanks. Could you pls also provide your pretrained models of semantic-KITTI?

HuguesTHOMAS commented 4 years ago

Sorry but I did not make many experiments until now, and it is not in my plans now.

KangchengLiu commented 4 years ago

I have tested KPconv on semantic-KITTI but the results are not that satisfactory as shown in the figure. I have trained for about 350 epoches because 800 epoches will cause overfitting. What's wrong with the results? Screenshot from 2020-05-26 12-33-34

HuguesTHOMAS commented 4 years ago

Yes this problem comes from the fact that you are using a small input radius for validation.

https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/ccb820bbb7a18e4642c317bc8a80d26164f7f3c1/train_SemanticKitti.py#L100

If you want the whole frame to be predicted, the best is to use val_radius=51.0, but the number of points will be so big that a 12GB GPU is not big enough. Try to us the test_models.py script with the network you trained and use the parameters val_radius=51.0, val_batch_num = 8. If this crashed because CUDA goes out of memory, then you will have two solutions:

  1. Reduce the max_val_points value, this will drop random points so you might lose in performance.

  2. Train a new network with a bigger first_subsampling_dl to reduce the number of points in frames.

KangchengLiu commented 4 years ago

Many thanks for your help! I wonder what first_subsampling_dl should be approximately set for a 11 GB 1080Ti GPU? I have tried to use 0.1 instead of 0.06 but the GPU memory is still not enough for the whole frame to be predicted.

HuguesTHOMAS commented 4 years ago

You can use the max_val_points parameter to find how many points your GPU can support, then, find the first_subsampling_dl that get you approximately this number of points. And you can keep the value of max_val_points as a safeguard.