All Projects → yifita → 3pu

yifita / 3pu

Patch-base progressive 3D Point Set Upsampling

Projects that are alternatives of or similar to 3pu

Learning Deep Learning
Paper reading notes on Deep Learning and Machine Learning
Stars: ✭ 388 (+196.18%)
Mutual labels:  point-cloud, paper
TMNet
The official pytorch implemention of the CVPR paper "Temporal Modulation Network for Controllable Space-Time Video Super-Resolution".
Stars: ✭ 77 (-41.22%)
Mutual labels:  paper, super-resolution
Srflow
Official SRFlow training code: Super-Resolution using Normalizing Flow in PyTorch
Stars: ✭ 537 (+309.92%)
Mutual labels:  paper, super-resolution
3PU pytorch
pytorch implementation of >>Patch-base progressive 3D Point Set Upsampling<<
Stars: ✭ 61 (-53.44%)
Mutual labels:  paper, point-cloud
Awesome Computer Vision
Awesome Resources for Advanced Computer Vision Topics
Stars: ✭ 92 (-29.77%)
Mutual labels:  paper, super-resolution
Commandapi
An API for the command UI introduced in Minecraft 1.13
Stars: ✭ 116 (-11.45%)
Mutual labels:  paper
Pointwise
Code for Pointwise Convolutional Neural Networks, CVPR 2018
Stars: ✭ 123 (-6.11%)
Mutual labels:  point-cloud
Deep K Means Pytorch
[ICML 2018] "Deep k-Means: Re-Training and Parameter Sharing with Harder Cluster Assignments for Compressing Deep Convolutions"
Stars: ✭ 115 (-12.21%)
Mutual labels:  paper
Awesome Robotic Tooling
Tooling for professional robotic development in C++ and Python with a touch of ROS, autonomous driving and aerospace.
Stars: ✭ 1,876 (+1332.06%)
Mutual labels:  point-cloud
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1284.73%)
Mutual labels:  super-resolution
Finetune Transformer Lm
Code and model for the paper "Improving Language Understanding by Generative Pre-Training"
Stars: ✭ 1,605 (+1125.19%)
Mutual labels:  paper
Drln
Densely Residual Laplacian Super-resolution, IEEE Pattern Analysis and Machine Intelligence (TPAMI), 2020
Stars: ✭ 120 (-8.4%)
Mutual labels:  super-resolution
Deeply Recursive Cnn Tf
Test implementation of Deeply-Recursive Convolutional Network for Image Super-Resolution
Stars: ✭ 116 (-11.45%)
Mutual labels:  super-resolution
Pcl Ros Cluster Segmentation
Cluster based segmentation of Point Cloud with PCL lib in ROS
Stars: ✭ 123 (-6.11%)
Mutual labels:  point-cloud
Bcpd
Bayesian Coherent Point Drift (BCPD/BCPD++); Source Code Available
Stars: ✭ 116 (-11.45%)
Mutual labels:  point-cloud
Upscalerjs
Image Upscaling in Javascript. Increase image resolution up to 4x using Tensorflow.js.
Stars: ✭ 126 (-3.82%)
Mutual labels:  super-resolution
Fpconv
FPConv: Learning Local Flattening for Point Convolution, CVPR 2020
Stars: ✭ 114 (-12.98%)
Mutual labels:  point-cloud
Phd
A list of resources on how/why to do a PhD
Stars: ✭ 120 (-8.4%)
Mutual labels:  paper
Adaptive clustering
Lightweight and Accurate Point Cloud Clustering
Stars: ✭ 125 (-4.58%)
Mutual labels:  point-cloud
Learning to sample
A learned sampling approach for point clouds (CVPR 2019)
Stars: ✭ 120 (-8.4%)
Mutual labels:  point-cloud

Patch-base progressive 3D Point Set Upsampling

This is the official implementation for paper "Patch-base progressive 3D Point Set Upsampling".

+ I've removed the evaluation code, because the included NUC code proposed by PU_Net has issues, in our paper we didn't use this metric.
+ A new pytorch implemention using pytorch 1.0 is available at https://github.com/yifita/3PU_pytorch
+ Added MNIST contour data
virtual scan 16x upsampled real scan 16x upsampled
Input output ground truth Input reconstruction output reconstruction ground truth reconstruction

Quick Demo

# clone
git clone https://github.com/yifita/3PU.git --recursive
cd 3PU
# download pretrained models
curl -o model/pretrained.zip -O https://polybox.ethz.ch/index.php/s/TZjUeCWFPlmv0nj/download
unzip -d model/ model/pretrained.zip
# download test data
curl -o data/test_data/test_points.zip -O https://polybox.ethz.ch/index.php/s/wxKg4O05JnyePDK/download
unzip -d data/test_data/ data/test_data/test_points.zip

# conda environment
conda update -n base -c defaults conda
conda env create -f environment.yml

# automatically add cuda library path permanently to the current conda enviroment
mkdir -p $HOME/anaconda3/envs/PPPU/etc/conda/activate.d
cp activate_cuda_90.sh $HOME/anaconda3/envs/PPPU/etc/conda/activate.d
mkdir -p $HOME/anaconda3/envs/PPPU/etc/conda/deactivate.d
cp deactivate_cuda_90.sh $HOME/anaconda3/envs/PPPU/etc/conda/deactivate.d
conda activate PPPU

# compile
cd code/tf_ops
cd CD && ./tf_nndistance_compile.sh
cd ../grouping && ./tf_grouping_compile.sh
cd ../sampling && ./tf_sampling_compile.sh

# run code
cd code
python main_curriculum_interleave.py --phase test --id sketchfab_poisson --model dense_interlevelplus \
--num_point 312 --up_ratio 16 --step_ratio 2 --patch_num_ratio 3 \
--test_data "data/test_data/sketchfab_poisson/poisson_5000/*.xyz"

data preparation

Sketchfab dataset

Our 3D models are trained and tested using the Sketchfab dataset created by ourselves. It consists of 90 training models and 13 testing models collected from Sketchfab. You can download the original meshes here: training and testing.

MNIST contour data

Per request, we provide the MNIST contour dataset used as toy examples for visualization and ablation studies in our paper. training contains 5 resolutions from 50 to 800 points. Each resolution contains 48,000 ply files. testing contains 5 resolutions same as the training set, each containig 12,000 ply files.

Input points

We trained our models with two kinds of input points: point sets generated using poisson disc sampling and virtual scanner. Download the test and training data used in our experiments. Unzip the test data to data/test_data/ and unzip to training data to record_data/

Additionally, you can create your own data with a virtual scanner or poisson disc sampling.

# compile
cd prepare_data
cmake .
make -j

# sample
cd Poisson_sample
./run_pd_sampling.sh DIR_TO_MESH DIR_TO_OUTPUT "**/*.EXTENSION" NUM_POINTS

# scan
cd polygonmesh_base
./run_scan.sh DIR_TO_MESH DIR_TO_OUTPUT 1 "**/*.ply"

Pretrained model

We provide two models trained using each of the above mentioned data. Download them here, and unzip them under model/.

tensorflow code compile

  1. Install cuda 9.0, cudnn and nccl if you haven't done so yet.
  2. Create conda environment conda env create -f environment.yml.
  3. Install tensorflow, we use tensorflow 1.11 in this project, but tensorflow >= 1.5 should work.
  4. Compile the custom tensorflow code in code/tf_ops by running ./tf_*_compile.sh.

Testing

paper results

Test on sparse poisson input:

python main_curriculum_interleave.py --phase test --id sketchfab_poisson --model dense_interlevelplus --num_point 156 --up_ratio 16 --step_ratio 2 --patch_num_ratio 3 \
--test_data "data/test_data/sketchfab_poisson/poisson_625/*.xyz"

Test on dense poisson input:

python main_curriculum_interleave.py --phase test --id sketchfab_poisson --model dense_interlevelplus --num_point 312 --up_ratio 16 --step_ratio 2 --patch_num_ratio 3 \
--test_data "data/test_data/sketchfab_poisson/poisson_5000/*.xyz"

Test on scan inputs:

python main_curriculum_interleave.py --phase test --id sketchfab_scan --model dense_interlevelplus --num_point 312 --up_ratio 16 --step_ratio 2 --patch_num_ratio 3 \
--test_data "data/test_data/sketchfab_scan/**/*.ply"

test with your own data

We support ply, xyz, and pcd as input. Simply set option --test_data to a relative search pattern for your own data.

# SEARCH_PATH_FOR_TEST_DATA could be `my_test_data/**/*.ply
python main_curriculum_interleave.py --phase test --id MODEL_NAME --model dense_interlevelplus --num_point 312 --up_ratio 16 --step_ratio 2 --patch_num_ratio 3 \
--test_data SEARCH_PATH_FOR_TEST_DATA

Training

Download training data as described here. Unzip to record_data/.

Train with poisson data

python main_curriculum_interleave.py --phase train --id ppu --model dense_interlevelplus --num_point 312 --up_ratio 16 --step_ratio 2 --num_shape_point 5000 --no-repulsion --dense_n 3 --knn 32 --num_point 312 --up_ratio 16 --step_ratio 2 --num_shape_point 625 --record_data "../record_data/poisson_5000_poisson_10000_poisson_20000_poisson_40000_poisson_80000_p312_shard[0-9].tfrecord" \
--stage_step 15000 --max_epoch 400 --gpu 0 --patch_num_ratio 3 --jitter --jitter_sigma 0.01 --jitter_max 0.03 \
--test_data SEARCH_PATH_FOR_TEST_DATA

Train with scan data

python main_curriculum_interleave.py --phase train --id ppu_scan --model dense_interlevelplus --num_point 312 --up_ratio 16 --step_ratio 2 --num_shape_point 5000 --no-repulsion --record_data "../record_data/res_5000_res_10000_res_20000_res_40000_res_80000_res_160000_p312_shard[0-9].tfrecord" \
--stage_step 15000 --max_epoch 400 --gpu 0 --patch_num_ratio 3 --jitter --jitter_sigma 0.01 --jitter_max 0.03 \
--test_data SEARCH_PATH_FOR_TEST_DATA

Create new training data

You can create new training data by calling python create_tfrecords.py in prepare_data folder.


cite

If you find this code or data useful in your work, please cite our paper:

@InProceedings{Yifan_2019_CVPR,
author = {Yifan, Wang and Wu, Shihao and Huang, Hui and Cohen-Or, Daniel and Sorkine-Hornung, Olga},
title = {Patch-Based Progressive 3D Point Set Upsampling},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2019}
}

Links to related projects

PU-Net: https://github.com/yulequan/PU-Net

PointNet++: https://github.com/charlesq34/pointnet2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].