RandLA-Net-pytorch

November 29, 2020 ยท View on GitHub

This repository contains the implementation of RandLA-Net (CVPR 2020 Oral) in PyTorch.

  • We only support SemanticKITTI dataset now. (Welcome everyone to develop together and raise PR)
  • Our model is almost as good as the original implementation. (Validation set : Our 52.9% mIoU vs original 53.1%)
  • We place our pretrain-model in pretrain_model/checkpoint.tar directory.

Performance

Results on Validation Set (seq 08)

  • Compare with original implementation
ModelmIoU
Original Tensorflow0.531
Our Pytorch Implementation0.529
  • Per class mIoU
mIoUcarbicyclemotorcycletruckother-vehiclepersonbicyclistmotorcyclistroadparkingsidewalkother-groundbuildingfencevegetationtrunkterrainpoletraffic-sign
52.90.9190.1220.2900.6600.4440.5150.6760.0000.9120.4210.7590.0010.8780.3540.8440.5950.7410.5170.414

A. Environment Setup

  1. Click this webpage and use conda to install pytorch>=1.4 (Be aware of the cuda version when installation)

  2. Install python packages

pip install -r requirements.txt
  1. Compile C++ Wrappers
bash compile_op.sh

B. Prepare Data

Download the Semantic KITTI dataset, and preprocess the data:

python data_prepare_semantickitti.py

Note:

  • Please change the dataset path in the data_prepare_semantickitti.py with your own path.
  • Data preprocessing code will convert the label to 0-19 index

C. Training & Testing

  1. Training
python3 train_SemanticKITTI.py <args>
  1. Testing
python3 test_SemanticKITTI.py <args>

Note: if the flag --index_to_label is set, output predictions will be ".label" files (label figure) which can be visualized; Otherwise, they will be ".npy" (0-19 index) files which is used to evaluated afterward.

D. Visualization & Evaluation

  1. Visualization
python3 visualize_SemanticKITTI.py <args>
  1. Evaluation
  • Example Evaluation code
python3 evaluate_SemanticKITTI.py --dataset /tmp2/tsunghan/PCL_Seg_data/sequences_0.06/ \
    --predictions runs/supervised/predictions/ --sequences 8

Acknowledgement