PyTorch implementation of Neural Dual Contouring.

Related tags

Deep Learning NDC
Overview

NDC

PyTorch implementation of Neural Dual Contouring.

Citation

We are still writing the paper while adding more improvements and applications. If you find our work useful in your research, please consider citing our prior work Neural Marching Cubes (NMC).

@article{chen2021nmc,
  title={Neural Marching Cubes},
  author={Zhiqin Chen and Hao Zhang},
  journal={arXiv preprint arXiv:2106.11272},
  year={2021}
}

Requirements

  • Python 3 with numpy, h5py, scipy and Cython
  • PyTorch 1.8 (other versions may also work)

Build Cython module:

python setup.py build_ext --inplace

Datasets and pre-trained weights

For data preparation, please see data_preprocessing.

We provide the ready-to-use datasets here.

Backup links:

We also provide the pre-trained network weights in this repo.

  • network_float.pth in the main directory is for SDF inputs.
  • weights in folder weights_for_voxel_input are for voxel inputs.

Training and Testing

To train/test NDC with SDF input:

python main.py --train_float --epoch 400 --data_dir groundtruth/gt_NDC --input_type sdf
python main.py --test_bool_float --data_dir groundtruth/gt_NDC --input_type sdf

To train/test NDC with voxel input:

python main.py --train_bool --epoch 400 --data_dir groundtruth/gt_NDC --input_type voxel
python main.py --train_float --epoch 400 --data_dir groundtruth/gt_NDC --input_type voxel
python main.py --test_bool_float --data_dir groundtruth/gt_NDC --input_type voxel

To evaluate Chamfer Distance, Normal Consistency, F-score, Edge Chamfer Distance, Edge F-score, you need to have the ground truth normalized obj files ready in a folder objs. See data_preprocessing for how to prepare the obj files. Then you can run:

python eval_cd_nc_f1_ecd_ef1.py

To count the number of triangles and vertices, run:

python eval_v_t_count.py

If you want to test on your own dataset, please refer to data_preprocessing for how to convert obj files into SDF grids and voxel grids. If your data are not meshes (say your data are already voxel grids), you can modify the code in utils.py to read your own data format. Check function read_data_input_only in utils.py for an example.

Comments
  • Issues with ground truth SDF

    Issues with ground truth SDF

    Hello,

    I observe that the GT SDF provided has some faulty reconstruction. In the below picture, I visualise and compare interior of the same shape. Clockwise from top-left are, GT, Marching Cubes on provided SDF, Dual Contouring. As you can see, the GT does not contain the 4 pillars which are present in the other three shapes. What is the reason behind this?

    Edit: This is shape 00007937.obj from the test set.

    image

    opened by Sentient07 8
  • Discrepancy between overfitting and pre-trained model

    Discrepancy between overfitting and pre-trained model

    Hello,

    I'm trying to overfit the network to a single shape and I find that the training results are significantly different from the pre-trained model. Attached below is the discrepancy I'm referring to. What could be the reason?

    Edit: Left in the figure is the pretrained model of UNDC Point cloud (both bool and float). Right uses the ground truth vertex positions and the connectivity is what I overfit to the single shape and try to predict the result on the same. (done for a sanity check)

    image

    opened by Sentient07 4
  • Questions about UNDC_with_noise model training

    Questions about UNDC_with_noise model training

    Hello, Dr. Chen, Thank you very much for your outstanding contribution to point cloud surface reconstruction. In order to train the undc_with_noise model better, I see that there are about 200,000 samples after data augmentation. I tried to train the model using the source code, but the training process was slow, probably due to the large amount of data. I would like to ask you, what hardware did you use for training? How long did it take you to train the model? Or do you know of a way to speed up model training?

    opened by qixuema 3
  • About training time and batchsize

    About training time and batchsize

    Table 1 in your papers says that training time < 12hours per net work.But it takes about 19 hours when I train the undc float network with point cloud input(gpu rtx A6000). And the batch size must be 1 in data loader,I want to know why.Because actually the data loader and network can be changed to process multiple shapes in one batch.

    opened by hmax233 2
  • Noisy point cloud training and testing

    Noisy point cloud training and testing

    Hi! @czq142857. Thanks for sharing the great work. I wonder know if the training data for noisy point cloud UNDC is the same as others input(using ABC), but adding additional data augmentation. Matterport3D's point cloud is just for testing not training. And what's the key factor that you think makes the model generalize well on real data?

    opened by yqdch 2
  • Point Cloud prediction Quality

    Point Cloud prediction Quality

    Hi! Thanks for sharing this great work.

    I installed the repo and tried to reconstruct the Mobius example you have, using your weights/data/commands from the also provided low-res point cloud (1024 pts). The output however has many holes and seems off compared to the one in the teaser.

    Is this expected? If so, can you please point to the steps needed to reconstruct the pc with similar quality to the one shown in your teaser?

    opened by optas 2
  • Wrong face normal vector and

    Wrong face normal vector and "zigzag" issue

    Hi, great work and thanks for sharing! I meet some problems when I tested this method. I found that when reconstructing a surface with UNDC using a point cloud as input, the output always surffer from wrong face normals and obvious "zigzag" issues, even I use the default input parameters(python main.py --test_input examples/tshirt.ply --input_type pointcloud --method undc --postprocessing --point_num 8192 --grid_size 128 ). I don't know if this is common? In addtion, are there any suggestions to improve the reconstrution quality? Thanks a lot!

    2022-06-07 16-22-25屏幕截图 2022-06-07 16-23-08屏幕截图

    opened by LiuXinqi12 2
  • Testing with point cloud as input

    Testing with point cloud as input

    Hello @czq142857

    Thanks for sharing the project. Does the current implementation support taking point cloud as inputs (testing UNDC)? I know there are related examples shown in the paper. But I don't see script/instruction for point cloud except for SDF and voxel.

    opened by mickeys11375 2
  • Will there be a another paper or detailed explanation for NDC project

    Will there be a another paper or detailed explanation for NDC project

    Hello, ZHIQIN CHEN Thank your for your kindly share! I noticed that the out put of NDC and NMC is total different. For I see the output of NMC is [M,N,K,5] for bool and [M,N,K,51] for float just as explanation in your paper. But in NDC, the out put of float part is [M,N,K,3]. I am not very sure for your encoding for dual countering. May I ask if you have another document for detailed explanation of the NDC project. It will my appreciation for your responce.

    opened by Harvey-Mei 2
Owner
Zhiqin Chen
Video game addict.
Zhiqin Chen
PyTorch code for 'Efficient Single Image Super-Resolution Using Dual Path Connections with Multiple Scale Learning'

Efficient Single Image Super-Resolution Using Dual Path Connections with Multiple Scale Learning This repository is for EMSRDPN introduced in the foll

null 7 Feb 10, 2022
Official implementation of "DSP: Dual Soft-Paste for Unsupervised Domain Adaptive Semantic Segmentation"

DSP Official implementation of "DSP: Dual Soft-Paste for Unsupervised Domain Adaptive Semantic Segmentation". Accepted by ACM Multimedia 2021. Authors

null 20 Oct 24, 2022
Implementation of CVPR 2020 Dual Super-Resolution Learning for Semantic Segmentation

Dual super-resolution learning for semantic segmentation 2021-01-02 Subpixel Update Happy new year! The 2020-12-29 update of SISR with subpixel conv p

Sam 79 Nov 24, 2022
Implementation for our ICCV 2021 paper: Dual-Camera Super-Resolution with Aligned Attention Modules

DCSR: Dual Camera Super-Resolution Implementation for our ICCV 2021 oral paper: Dual-Camera Super-Resolution with Aligned Attention Modules paper | pr

Tengfei Wang 110 Dec 20, 2022
Implementation for our ICCV 2021 paper: Dual-Camera Super-Resolution with Aligned Attention Modules

DCSR: Dual Camera Super-Resolution Implementation for our ICCV 2021 oral paper: Dual-Camera Super-Resolution with Aligned Attention Modules paper | pr

Tengfei Wang 110 Dec 20, 2022
Offical implementation for "Trash or Treasure? An Interactive Dual-Stream Strategy for Single Image Reflection Separation".

Trash or Treasure? An Interactive Dual-Stream Strategy for Single Image Reflection Separation (NeurIPS 2021) by Qiming Hu, Xiaojie Guo. Dependencies P

Qiming Hu 31 Dec 20, 2022
This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CNPs), Neural Processes (NPs), Attentive Neural Processes (ANPs).

The Neural Process Family This repository contains notebook implementations of the following Neural Process variants: Conditional Neural Processes (CN

DeepMind 892 Dec 28, 2022
Deep Dual Consecutive Network for Human Pose Estimation (CVPR2021)

Deep Dual Consecutive Network for Human Pose Estimation (CVPR2021) Introduction This is the official code of Deep Dual Consecutive Network for Human P

null 295 Dec 29, 2022
《Dual-Resolution Correspondence Network》(NeurIPS 2020)

Dual-Resolution Correspondence Network Dual-Resolution Correspondence Network, NeurIPS 2020 Dependency All dependencies are included in asset/dualrcne

Active Vision Laboratory 45 Nov 21, 2022
DVG-Face: Dual Variational Generation for Heterogeneous Face Recognition, TPAMI 2021

DVG-Face: Dual Variational Generation for HFR This repo is a PyTorch implementation of DVG-Face: Dual Variational Generation for Heterogeneous Face Re

null 52 Dec 30, 2022
Code for Dual Contrastive Learning for Unsupervised Image-to-Image Translation, NTIRE, CVPRW 2021.

arXiv Dual Contrastive Learning Adversarial Generative Networks (DCLGAN) We provide our PyTorch implementation of DCLGAN, which is a simple yet powerf

null 119 Dec 4, 2022
Code for the CIKM 2019 paper "DSANet: Dual Self-Attention Network for Multivariate Time Series Forecasting".

Dual Self-Attention Network for Multivariate Time Series Forecasting 20.10.26 Update: Due to the difficulty of installation and code maintenance cause

Kyon Huang 223 Dec 16, 2022
Official respository for "Modeling Defocus-Disparity in Dual-Pixel Sensors", ICCP 2020

Official respository for "Modeling Defocus-Disparity in Dual-Pixel Sensors", ICCP 2020 BibTeX @INPROCEEDINGS{punnappurath2020modeling, author={Abhi

Abhijith Punnappurath 22 Oct 1, 2022
[TIP 2021] SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction

SADRNet Paper link: SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction Requirements python

Multimedia Computing Group, Nanjing University 99 Dec 30, 2022
[ICCV'2021] Image Inpainting via Conditional Texture and Structure Dual Generation

[ICCV'2021] Image Inpainting via Conditional Texture and Structure Dual Generation

Xiefan Guo 122 Dec 11, 2022
[SIGGRAPH Asia 2021] DeepVecFont: Synthesizing High-quality Vector Fonts via Dual-modality Learning.

DeepVecFont This is the homepage for "DeepVecFont: Synthesizing High-quality Vector Fonts via Dual-modality Learning". Yizhi Wang and Zhouhui Lian. WI

Yizhi Wang 17 Dec 22, 2022
[SIGGRAPH Asia 2021] DeepVecFont: Synthesizing High-quality Vector Fonts via Dual-modality Learning.

DeepVecFont This is the homepage for "DeepVecFont: Synthesizing High-quality Vector Fonts via Dual-modality Learning". Yizhi Wang and Zhouhui Lian. WI

Yizhi Wang 5 Oct 22, 2021
1st Solution For NeurIPS 2021 Competition on ML4CO Dual Task

KIDA: Knowledge Inheritance in Data Aggregation This project releases our 1st place solution on NeurIPS2021 ML4CO Dual Task. Slide and model weights a

MEGVII Research 24 Sep 8, 2022