edwardzhou130 / PolarSeg

Implementation for PolarNet: An Improved Grid Representation for Online LiDAR Point Clouds Semantic Segmentation (CVPR 2020)
BSD 3-Clause "New" or "Revised" License
369 stars 80 forks source link

Faster data processing #13

Closed Xyouz closed 4 years ago

Xyouz commented 4 years ago

Hi,

The proposed pull request modify the SemKITTI2train_single function. It increases the overall training speed by more than 20%. Instead of finding labels equals to 0 and then setting their value at 255 and decreasing the other values by 1 it simply decreases the value of every label by 1 : as they are encoded as unsigned int on 8 bits this is equivalent but much faster.

I also modified the training procedure so that the first error is printed : this is to help detect out of memory errors.

I added the torch.no_grad() context around the test part in test_pretrain.py.

I corrected some typos in requirements.txt file (however I wasn't able to install torch-scatter with CUDA support using only pip install -r requirements.txt, maybe the README.md file should contain a more precise installation procedure.

I hope you'll find this suggestion useful.

Best, Marius

edwardzhou130 commented 4 years ago

Thanks for your contribution!