This repository contains a Pytorch implementation of the paper:
PC2-PU: Patch Correlation and Position Correction for Effective Point Cloud Upsampling.
We checked our code and found a problem, which is fixed now. The results have also changed. Our main experiment results are as follows.
- Benchmark(x4) : CD: 0.2317 -> 0.2327 , HD: 2.5942 -> 2.5962
- Benchmark(x16) : CD: 0.0998 -> 0.1004 , HD: 2.8692 -> 2.9130
- Add 0.5% noise : CD: 0.2604 -> 0.2598
- Add 1.0% noise : CD: 0.3586 -> 0.3589
- Add 2.0% noise : CD: 0.7727 -> 0.7701
- Generalization Test : CD: 5099 -> 0.5102, HD: 5.9618 -> 5.9555
-
Clone the repository:
git clone https://github.com/chenlongwhu/PC2-PU.git cd PC2-PU
Installation instructions for Ubuntu 18.04:
-
Make sure CUDA and cuDNN are installed. Only this configurations has been tested:
- Python 3.7.11, Pytorch 1.6.0
-
Follow Pytorch installation procedure. Note that the version of cudatoolkit must be strictly consistent with the version of CUDA
-
-
Install KNN_cuda.
pip install --upgrade https://github.com/unlimblue/KNN_CUDA/releases/download/0.2/KNN_CUDA-0.2-py3-none-any.whl
-
Install Pointnet2_ops
pip install "git+https://github.com/erikwijmans/Pointnet2_PyTorch.git/#egg=pointnet2_ops&subdirectory=pointnet2_ops_lib"
-
Install emd
cd emd_module python setup.py install
-
Install h5py tensorboard
conda install h5py conda install tensorboard
-
Train the model: First, you need to download the training patches in HDF5 format from GoogleDrive and put it in folder
data
. Then run:cd code python main.py --log_dir log/PC2-PU
-
Evaluate the model: First, you need to download the pretrained model from GoogleDrive, extract it and put it in folder
log/PC2-PU
. Then run:cd code python main.py --phase test --log_dir log/PC2-PU --checkpoint_path model_best.pth.tar
You will see the input and output results in the folder
log/PC2-PU
. -
The training and testing mesh files can be downloaded from GoogleDrive.
We provide the evaluation code. In order to use it, you need to install the CGAL library. Please refer this link and PU-Net to install this library. Then:
cd evaluation_code
cmake .
make
./evaluation Icosahedron.off Icosahedron.xyz
The second argument is the mesh, and the third one is the predicted points.
If PC2-PU is useful for your research, please consider citing:
@inproceedings{long2022pc2pu,
title={PC2-PU: Patch Correlation and Position Correction for Effective Point Cloud Upsampling},
author={Chen Long and Wenxiao Zhang and Ruihui Li and Hao Wang and Zhen Dong and Bisheng Yang},
year={2022},
booktitle={Proceedings of the 30th ACM International Conference on Multimedia},
url= {https://doi.org/10.1145/3503161.3547777},
doi= {10.1145/3503161.3547777},
}
The original code framework is rendered from "PUGAN_pytorch". It is developed by Haolin Liu at The Chinese University of HongKong.
The original code of emd is rendered from "MSN". It is developed by Liu Minghua at The University of California, San Diego.
The original code of chamfer3D is rendered from "chamferDistancePytorch". It is developed by ThibaultGROUEIX.
The original code of helper is rendered from "Self-supervised Sparse-to-Dense: Self-supervised Depth Completion from LiDAR and Monocular Camera". It is developed by Fangchang Ma, Guilherme Venturelli Cavalheiro, and Sertac Karaman at MIT.
Please contact 'chenlong107@whu.edu.cn'