Skip to content

Latest commit

 

History

History

3D

3D Shape Classification and Part Segmentation

This repo includes the code for 3d Shape Classification and Part Segmentation on 3DCoMPaT dataset using prevalent 3D vision algorithms, including PointNet, PointNet++, DGCNN, PCT, and PointMLP in pytorch.

You can find the pretrained models and log files in gdrive.

1. Install

The latest codes are tested on Ubuntu 16.04, CUDA10.1, PyTorch 1.7 and Python 3.7:

conda install pytorch==1.7.0 cudatoolkit=10.1 -c pytorch

2. Data Preparation

Run the following script to prepare point cloud data.

python prepare_data.py

Or you can directly download our preprocessed data 3DCoMPaT and save in data/.

3. Classification (3DCoMPaT)

# 3DCoMPaT
# Select different models in ./models 

# e.g., pointnet2_ssg 
python train_classification.py --model pointnet2_cls_ssg --log_dir pointnet2_cls_ssg
python test_classification.py --log_dir pointnet2_cls_ssg
  • Note that we use same data augmentations and training schedules for all comparing methods following Pointnet_Pointnet2_pytorch. We report performance on both validation and test sets.

Performance (Instance average Accuracy)

Model Previous Val Test Pretrained
PointNet2_SSG - 75.59 73.78 gdrive
PointNet2_MSG 57.95 78.15 74.70 gdrive
DGCNN 68.32 71.36 74.64 gdrive
PCT 69.09 68.33 70.07 gdrive
PointMLP - 73.36 70.83 gdrive

4. Part Segmentation (3DCoMPaT)

# Check model in ./models 
# e.g., pointnet2_ssg
python train_partseg.py --model pointnet2_part_seg_ssg --log_dir pointnet2_part_seg_ssg
python test_partseg.py --log_dir pointnet2_part_seg_ssg
  • Note that we use same data augmentations and training schedules for all comparing methods following Pointnet_Pointnet2_pytorch. We report performance on both validation and test sets.

Performance (Accuracy)

Model Previous Val Test Pretrained
PointNet2_SSG 24.18 48.61 51.22 gdrive
PCT 37.37 41.19 48.43 gdrive

5. Sim2Rel:Transferring to ScanObjectNN

# Check model in ./models 
# e.g., pointnet2_ssg
python train_classification_sim2rel.py --model pointmlp --log_dir pointmlp_cls
python test_classification_sim2rel.py --log_dir pointmlp_cls

Note that we use same data augmentations and training schedules for all comparing methods following Pointnet_Pointnet2_pytorch. We report performance on the test set of ScanObjectNN.

Performance (Accuracy)

Model Previous Test Pretrained
ModelNet40 24.33 30.69 gdrive
3DCoMPaT 29.21 28.49 gdrive

This code repository is heavily borrowed from Pointnet_Pointnet2_pytorch, DGCNN, PCT, and PointMLP.