Giter VIP home page Giter VIP logo

pdflow's Introduction

PD-Flow: A Point Cloud Denoising Framework with Normalizing Flows

by Aihua Mao, Zihui Du, Yu-Hui Wen, Jun Xuan, and Yong-Jin Liu.

Introduction

Official code of our ECCV 2022 paper. [Paper & Supplement]

This work introduces a framework for point cloud denoising by incorporating normalizing flows.

Environment

First clone the code of this repo:

git clone --recursive https://github.com/unknownue/pdflow

Then other settings can be either configured manually or set up with docker.

Manual configuration

The code is implemented with CUDA 11.5, Python 3.8, PyTorch 1.11. Other require libraries:

Docker configuration

If you are familiar with Docker, you can use provided Dockerfile to configure all setting automatically.

Additional configuration

If you want to train the network, you also need to build the kernel of PytorchEMD like followings:

cd metric/PytorchEMD/
python setup.py install --user
cp build/lib.linux-x86_64-3.8/emd_cuda.cpython-38m-x86_64-linux-gnu.so .

Datasets

All training and evaluation data can be downloaded from repo of score-denoise and DMRDenoise. After downloading, place the extracted files into data directory as list in here.

We include a pretrained model in this repo.

Training & Denosing & Evaluation

Train the model as followings:

# train on PUSet, see train_deflow_score.py for tuning parameters
python models/deflow/train_deflow_score.py

# train on DMRSet, see train_deflow_dmr.py for tuning parameters
python models/deflow/train_deflow_dmr.py

Denoising a single point cloud as followings:

python models/deflow/denoise.py \
    --input=path/to/input.xyz \
    --output=path/to/output.xyz \
    --patch_size=1024 --niters=1 --ckpt=pretrain/pdflow-score-LCC.pt

Denoising point clouds in directory as followings:

python models/deflow/denoise.py \
    --input=path/to/input_directory \
    --output=path/to/output_directory \
    --patch_size=1024 --niters=1 --ckpt=pretrain/pdflow-score-LCC.pt

Evaluation:

# build executable to evaluate uniform, see build.sh for detail
bash eval/uniformity/build.sh
# evaluate all xyz files in a directory
python eval/eval2.py \
    --pred_dir=path/to/evaluation/directory \
    --off_dir=path/to/off_mesh/directory \
    --gt_dir=path/to/ground_truth/directory \
    --csv=path/to/evaluation/directory/result.csv

Reproduce Paper Results:

# PUSet dataset, 10K Points
python models/deflow/denoise.py --input=data/ScoreDenoise/examples/PUNet_10000_poisson_0.01 --output=evaluation/PU_10000_n0.01_i1 --patch_size=1024 --niters=1 --ckpt=pretrain/pdflow-score-LCC.pt
python models/deflow/denoise.py --input=data/ScoreDenoise/examples/PUNet_10000_poisson_0.02 --output=evaluation/PU_10000_n0.02_i1 --patch_size=1024 --niters=1 --ckpt=pretrain/pdflow-score-LCC.pt
python models/deflow/denoise.py --input=data/ScoreDenoise/examples/PUNet_10000_poisson_0.03 --output=evaluation/PU_10000_n0.03_i1 --patch_size=1024 --niters=2 --ckpt=pretrain/pdflow-score-LCC.pt
# PUSet dataset, 50K Points
python models/deflow/denoise.py --input=data/ScoreDenoise/examples/PUNet_50000_poisson_0.01 --output=evaluation/PU_50000_n0.01_i1 --patch_size=1024 --niters=1 --ckpt=pretrain/pdflow-score-LCC.pt
python models/deflow/denoise.py --input=data/ScoreDenoise/examples/PUNet_50000_poisson_0.02 --output=evaluation/PU_50000_n0.02_i1 --patch_size=1024 --niters=2 --first_iter_partition --ckpt=pretrain/pdflow-score-LCC.pt
python models/deflow/denoise.py --input=data/ScoreDenoise/examples/PUNet_50000_poisson_0.03 --output=evaluation/PU_50000_n0.03_i1 --patch_size=1024 --niters=2 --first_iter_partition --ckpt=pretrain/pdflow-score-LCC.pt

Citation

If this work is useful for your research, please consider citing:

@inproceedings{unknownue2022pdflow,
  title={PD-Flow: A Point Cloud Denoising Framework with Normalizing Flows},
  author={Mao, Aihua and Du, Zihui and Wen, Yu-Hui and Xuan, Jun and Liu, Yong-Jin},
  booktitle={The European Conference on Computer Vision (ECCV)},
  year={2022}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.