/PAD

official implement for 《Learning Point-wise Abstaining Penalty for Point Cloud Anomaly Detection》

Primary LanguageJupyter Notebook

Learning Point-wise Abstaining Penalty for Point Cloud Anomaly Detection [Paper]

Official implementation of 《Learning Point-wise Abstaining Penalty for Point Cloud Anomaly Detection》. After saving the corresponding inference result files using this repository, please use semantic_kitti_api and nuScenes_api to evaluate the performance.

teaser

kitti_qualitative nuscenes_qualitative

Installation

To set up the environment, please refer to the following script instructions:

bash install.sh

Data Preparation

All of the datasets mentioned below are located in the "datasets" directory at the root of the repository.

SemanticKITTI

./
├── 
├── ...
└── path_to_data_shown_in_config/
    ├──sequences
        ├── 00/           
        │   ├── velodyne/	
        |   |	├── 000000.bin
        |   |	├── 000001.bin
        |   |	└── ...
        │   └── labels/ 
        |       ├── 000000.label
        |       ├── 000001.label
        |       └── ...
        ├── 08/ # for validation
        ├── 11/ # 11-21 for testing
        └── 21/
	    └── ...

nuScenes

./
├── ...
├── v1.0-trainval
├── v1.0-test
├── samples
├── sweeps
├── maps
└── lidarseg/
    ├──v1.0-trainval/
    ├──v1.0-mini/
    ├──v1.0-test/
    ├──nuscenes_infos_train.pkl
    ├──nuscenes_infos_val.pkl
    ├──nuscenes_infos_test.pkl
└── panoptic/
    ├──v1.0-trainval/
    ├──v1.0-mini/
    ├──v1.0-test/

ShapeNet

./
├── ...
├── object_path_list.txt 
├── metadata.yaml
├── 02933112
├── 02958343
├── 03001627
├── 03211117
├── 03636649
├── 03691459
├── 04090263
├── 04256520
├── 04379243
├── 04401088
├── 04530566
├── 02828884
└── 02691156
    ├──
    ├──test.lst
    ├──train.lst
    ├──val.lst
    ├──d2e2e23f5be557e2d1ab3b031c100cb1
        ├── df.npy
        ├── img_choy2016
        ├── model.binvox
        ├── pointcloud.npz
        └── points.npz
    ...

Usage

All scripts for training and evaluation is in ./scripts.

SemanticKITTI

Traning

  1. Download the bese segmentation model ( extract code: jpmn)
  2. navigate to /config/semantickitti_ood_final.yaml and update the path for the pretrained naive model on line 73.
  3. Finally, execute the following command:
bash scripts/train_kitti.sh

Evaluation

  1. modify the resume_path variable in the scripts/eval_kitti.sh file to the appropriate path of the model.
  2. execute the following command:
bash scripts/eval_kitti.sh

NuScenes

Traning

  1. Download the bese nuscenes segmentation model ( extract code: h9gh)
  2. navigate to /config/nuScenes_ood_final.yaml and update the path for the pretrained naive model on line 66.
  3. Finally, execute the following command:
bash scripts/train_nusc.sh

Evaluation

  1. modify the resume_path variable in the scripts/eval_nusc.sh file to the appropriate path of the model.
  2. execute the following command:
bash scripts/eval_nusc.sh

Acknowledgements

Parts of this code were based on the codebase of REAL.