Skip to content

cong-yi/DualMesh-UDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surface Extraction from Neural Unsigned Distance Fields

Installation

git clone https://github.com/cong-yi/DualMesh-UDF.git
cd DualMesh-UDF
conda create -n dmudf python=3.9
conda activate dmudf
pip install .

Or you can install it directly by:

pip install "git+https://github.com/cong-yi/DualMesh-UDF"

Usage Example

from DualMeshUDF import extract_mesh

# udf_func: function to evaluate UDF values
# udf_grad_func: function to evaluate UDF values and the gradient
mesh_v, mesh_f = extract_mesh(udf_func, udf_grad_func)

An Example for PyTorch

Please note that our implementation is not tied to any specific machine learning framework.

To make it more convenient for PyTorch users, we provide an example with several checkpoints for testing and demonstration. Please install PyTorch accordingly and download the checkpoints. Then run the following command:

python example/test.py --pretrained [path_to_checkpoint] --mesh_prefix [folder_prefix_for_mesh]

The default value for mesh_prefix is set to example/results. So the output meshes are stored in the folder example/results.

For example, given the checkpoints in the folder example/checkpoints/ and run:

python example/test.py --pretrained example/checkpoints/fandisk.pth

For other PyTorch-based network, we offer a set of useful tools in example/neural_utils.py for reference. With these tools, you can call our method as follows:

mesh_v, mesh_f = extract_mesh_from_udf(net, device)

Citation

If you find our method useful for your research, please cite our paper:

@InProceedings{zhang2023dualmeshudf,
    author    = {Zhang, Congyi and
                 Lin, Guying and
                 Yang, Lei and
                 Li, Xin and
                 Komura, Taku and
                 Schaefer, Scott and
                 Keyser, John and
                 Wang, Wenping},
    title     = {Surface Extraction from Neural Unsigned Distance Fields},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2023},
    pages     = {0000-0000}
}

Acknowledgement

The octree structure is partially built upon the implementation of Dual Contouring of Hermite Data.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages