Coder Social home page Coder Social logo

tinaa23 / diffusion-point-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luost26/diffusion-point-cloud

0.0 0.0 0.0 425 KB

:thought_balloon: Diffusion Probabilistic Models for 3D Point Cloud Generation (CVPR 2021)

License: MIT License

Python 100.00%

diffusion-point-cloud's Introduction

Diffusion Probabilistic Models for 3D Point Cloud Generation

teaser

[Paper] [Code] [Demo Created by SerdarHELLI]

The official code repository for our CVPR 2021 paper "Diffusion Probabilistic Models for 3D Point Cloud Generation".

Installation

[Option 1] Install via conda environment YAML file (CUDA 10.1).

# Create the environment
conda env create -f env.yml
# Activate the environment
conda activate dpm-pc-gen

[Option 2] Or you may setup the environment manually (If you are using GPUs that only work with CUDA 11 or greater).

Our model only depends on the following commonly used packages, all of which can be installed via conda.

Package Version
PyTorch โ‰ฅ 1.6.0
h5py not specified (we used 4.61.1)
tqdm not specified
tensorboard not specified (we used 2.5.0)
numpy not specified (we used 1.20.2)
scipy not specified (we used 1.6.2)
scikit-learn not specified (we used 0.24.2)

About the EMD Metric

We have removed the EMD module due to GPU compatability issues. The legacy code can be found on the emd-cd branch.

If you have to compute the EMD score or compare our model with others, we strongly advise you to use your own code to compute the metrics. The generation and decoding results will be saved to the results folder after each test run.

Datasets and Pretrained Models

Datasets and pretrained models are available at: https://drive.google.com/drive/folders/1Su0hCuGFo1AGrNb_VMNnlF7qeQwKjfhZ

Training

# Train an auto-encoder
python train_ae.py 

# Train a generator
python train_gen.py

You may specify the value of arguments. Please find the available arguments in the script.

Note that --categories can take all (use all the categories in the dataset), airplane, chair (use a single category), or airplane,chair (use multiple categories, separated by commas).

Notes on the Metrics

Note that the metrics computed during the validation stage in the training script (train_gen.py, train_ae.py) are not comparable to the metrics reported by the test scripts (test_gen.py, test_ae.py). If you train your own models, please evaluate them using the test scripts. The differences include:

  1. The scale of Chamfer distance in the training script is different. In the test script, we renormalize the bounding boxes of all the point clouds before calculating the metrics (Line 100, test_gen.py). However, in the validation stage of training, we do not renormalize the point clouds.
  2. During the validation stage of training, we only use a subset of the validation set (400 point clouds) to compute the metrics and generates only 400 point clouds (controlled by the --test_size parameter). Limiting the number to 400 is for saving time. However, the actual size of the airplane validation set is 607, larger than 400. Less point clouds mean that it is less likely to find similar point clouds in the validation set for a generated point cloud. Hence, it would lead to a worse Minimum-Matching-Distance (MMD) score even if we renormalize the shapes during the validation stage in the training script.

Testing

# Test an auto-encoder
python test_ae.py --ckpt ./pretrained/AE_all.pt --categories all

# Test a generator
python test_gen.py --ckpt ./pretrained/GEN_airplane.pt --categories airplane

Citation

@inproceedings{luo2021diffusion,
  author = {Luo, Shitong and Hu, Wei},
  title = {Diffusion Probabilistic Models for 3D Point Cloud Generation},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2021}
}

diffusion-point-cloud's People

Contributors

luost26 avatar

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.