IndigoPurple / MAG

Python (PyTorch) code and model of "Point Cloud Denoising via Momentum Ascent in Gradient Fields"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Point Cloud Denoising via Momentum Ascent in Gradient Fields (ICIP'23)

In this repository we provide code of the paper:

Point Cloud Denoising via Momentum Ascent in Gradient Fields

Yaping Zhao, Haitian Zheng, Zhongrui Wang, Jiebo Luo, Edmund Y. Lam

paper link: https://ieeexplore.ieee.org/abstract/document/10222122

Installation

Recommended Environment

The code has been tested in the following environment:

Package Version Comment
PyTorch 1.9.0
point_cloud_utils 0.18.0 For evaluation only. It loads meshes to compute point-to-mesh distances.
pytorch3d 0.5.0 For evaluation only. It computes point-to-mesh distances.
pytorch-cluster 1.5.9 We only use fps (farthest point sampling) to merge denoised patches.

Install via Conda (PyTorch 1.9.0 + CUDA 11.1)

conda env create -f env.yml
conda activate mag

Install Manually

conda create --name mag python=3.8
conda activate mag

conda install pytorch==1.9.0 torchvision==0.10.0 cudatoolkit=11.1 -c pytorch -c nvidia

conda install -c conda-forge tqdm scipy scikit-learn pyyaml easydict tensorboard pandas

# point_cloud_utils
conda install -c conda-forge point_cloud_utils==0.18.0

# Pytorch3d
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -c pytorch3d pytorch3d==0.5.0

# pytorch-scatter
conda install -c pyg pytorch-cluster==1.5.9

Datasets

Download link: https://drive.google.com/drive/folders/1--MvLnP7dsBgBZiu46H0S32Y1eBa_j6P?usp=sharing

Please extract data.zip to data folder.

Denoise

Reproduce Paper Results

# PUNet dataset, 10K Points
python test.py --dataset PUNet --resolution 10000_poisson --noise 0.01 --niters 1
python test.py --dataset PUNet --resolution 10000_poisson --noise 0.02 --niters 1
python test.py --dataset PUNet --resolution 10000_poisson --noise 0.03 --niters 2
# PUNet dataset, 50K Points
python test.py --dataset PUNet --resolution 50000_poisson --noise 0.01 --niters 1
python test.py --dataset PUNet --resolution 50000_poisson --noise 0.02 --niters 1
python test.py --dataset PUNet --resolution 50000_poisson --noise 0.03 --niters 2

Denoise Regular-Size Point Clouds (≤ 50K Points)

python test_single.py --input_xyz <input_xyz_path> --output_xyz <output_xyz_path>

You may also barely run python test_single.py to see a quick example.

Denoise Large Point Clouds (> 50K Points)

python test_large.py --input_xyz <input_xyz_path> --output_xyz <output_xyz_path>

You may also barely run python test_large.py to see a quick example.

Train

python train.py

Please find tunable parameters in the script.

Citation

Cite our paper if you find it interesting!

@inproceedings{zhao2023point,
  title={Point Cloud Denoising via Momentum Ascent in Gradient Fields},
  author={Zhao, Yaping and Zheng, Haitian and Wang, Zhongrui and Luo, Jiebo and Lam, Edmund Y},
  booktitle={2023 IEEE International Conference on Image Processing (ICIP)},
  pages={161--165},
  year={2023},
  organization={IEEE}
}

This code is implemented based on Score.

About

Python (PyTorch) code and model of "Point Cloud Denoising via Momentum Ascent in Gradient Fields"

License:MIT License


Languages

Language:Python 100.0%