This repository contains the author's implementation in Pytorch for the paper:
Relation-Shape Convolutional Neural Network for Point Cloud Analysis [arXiv] [CVF]
Yongcheng Liu, Bin Fan, Shiming Xiang and Chunhong Pan
CVPR 2019 Oral & Best paper finalist Project Page: https://yochengliu.github.io/Relation-Shape-CNN/
If Liu's paper is helpful for your research, please consider citing:
@inproceedings{liu2019rscnn,
author = {Yongcheng Liu and
Bin Fan and
Shiming Xiang and
Chunhong Pan},
title = {Relation-Shape Convolutional Neural Network for Point Cloud Analysis},
booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {8895--8904},
year = {2019}
}
This repository is reproduction of RSCNN based on Pytorch version 1.0 or 1.1, borrowed from Liu's code (https://yochengliu.github.io/Relation-Shape-CNN/)
- Ubuntu 16.04
- Python 3.6 (recommend Anaconda3)
- Pytorch 1.0+ (test on 1.0, 1.1 and 1.2)
- CMake > 2.8
- CUDA 10.2 + cuDNN 7.6
- GNU <= 7.5
The custom ops used by Pointnet++ are currently ONLY supported on the GPU using CUDA.
-
Building
_ext
module (build and copy a .so file to utils/)::
python setup.py build_ext --inplace
Shape Classification
Download and unzip ModelNet40 (415M). Replace $data_root$
in cfgs/config_*_cls.yaml
with the dataset parent path.
ShapeNet Part Segmentation
Download and unzip ShapeNet Part (674M). Replace $data_root$
in cfgs/config_*_partseg.yaml
with the dataset path.
sh train_cls.sh
You can modify relation_prior
in cfgs/config_*_cls.yaml
. We have trained a Single-Scale-Neighborhood classification model in cls
folder, whose accuracy is 92.38%.
sh train_partseg.sh
We have trained a Multi-Scale-Neighborhood part segmentation model in seg
folder, whose class mIoU and instance mIoU is 84.18% and 85.81% respectively.
Voting script: voting_evaluate_cls.py
You can use our model cls/model_cls_ssn_iter_16218_acc_0.923825.pth
as the checkpoint in config_ssn_cls.yaml
, and after this voting you will get an accuracy of 92.71% if all things go right.
Voting script: voting_evaluate_partseg.py
You can use our model seg/model_seg_msn_iter_57585_ins_0.858054_cls_0.841787.pth
as the checkpoint in config_msn_partseg.yaml
.
The code is released under MIT License (see LICENSE file for details).
The code is heavily borrowed from Pointnet2_PyTorch.
If you have some ideas or questions about the code, please contact [email protected]