Step1. Install requirements:
python == 3.6.13
torch == 1.10.1
CUDA == 12.2
numpy == 1.19.5
open3d == 0.9.0.0
einops ==0.4.1
scikit-learn==1.0.1
tqdm==4.64.0
h5py==3.1.0
Step2. Compile the C++ extension modules:
cd models/Chamfer3D
python setup.py install
cd ../pointops
python setup.py install
Datasets can be download from here:
original PU-GAN | PU1K | pre-processed PU-GAN |
---|---|---|
here | here | Google Drive |
After data preparation, the overall directory structure should be:
│data/
├──PU-GAN/
│ ├──train/
│ ├──test/
│ │ ├──pugan_4x
│ │ ├──pugan_16x
│ │ ├──arbitrary_scale
│ │ ├──.......
├──PU1K/
│ ├──train/
│ ├──test/
Training models on PU-GAN (or PU1K) dataset:
python train.py --dataset pugan
or
python train.py --dataset pu1k
Results will be saved under ./output
We provide several pre-trained weights:
dataset | weight | config |
---|---|---|
PU-GAN | Google Drive | here |
PU1K | Google Drive | here |
PU-GAN * | Google Drive | here |
* indicates the origin model used in our paper
# 4X upsampling on PU-GAN dataset
python test.py --dataset pugan --input_dir ./data/PU-GAN/test/pugan_4x/input --gt_dir ./data/PU-GAN/test/pugan_4x/gt --ckpt ./pretrain/pugan_best.pth --r 4 --save_dir ./result/pugan_4x
# 16X upsampling on PU-GAN dataset
python test.py --dataset pugan --input_dir ./data/PU-GAN/test/pugan_16x/input --gt_dir ./data/PU-GAN/test/pugan_16x/gt --ckpt ./pretrain/pugan_best.pth --r 16 --save_dir ./result/pugan_16x
# 4X upsampling on PU1K dataset
python test.py --dataset pu1k --input_dir ./data/PU1K/test/input_2048/input_2048/ --gt_dir ./data/PU1K/test/input_2048/gt_8192/ --ckpt ./pretrain/pu1k_best.pth --r 4 --save_dir ./result/pu1k_4x
# arbitrary-scale upsampling on PU-GAN dataset, take 19x for example
python test.py --dataset pugan --input_dir ./data/PU-GAN/test/arbitrary_scale/19x/input --gt_dir ./data/PU-GAN/test/arbitrary_scale/19x/gt --ckpt ./pretrain/pugan_best.pth --r 19 --save_dir ./result/pugan_19x --flexible
python test.py --dataset pugan --input_dir ./data/PU-GAN/test/pugan_4x/input --gt_dir ./data/PU-GAN/test/pugan_4x/gt --ckpt ./pretrain/pugan_o_best.pth --r 4 --save_dir ./result/pugan_4x --o
python surf_recon.py --file_path xxx.xyz --save_path xxx.obj
This repo is heavily based on KPConv, Grad-PU, PU-GCN, PU-GAN. Thanks for their great work!
@inproceedings{rong2024repkpu,
title={RepKPU: Point Cloud Upsampling with Kernel Point Representation and Deformation},
author={Rong, Yi and Zhou, Haoran and Xia, Kang and Mei, Cheng and Wang, Jiahao and Lu, Tong},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={21050--21060},
year={2024}
}