Skip to content

iszihan/implicit-uniform-sampler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uniform Sampling of Surfaces by Casting Rays [SGP 2025]

Selena Ling, Abhishek Madan, Nicholas Sharp Alec Jacobson
Eurographics Symposium on Geometry Processing 2025

Get started

We provide the code as a library. To install, you need to clone this repo, and run

pip install .

Then to acquire a uniform set of samples with your implicit surface function in your scripts, you can follow this example:

from ImplicitUniformSampler import ImplicitUniformSampler

sampler = ImplicitUniformSampler()
samples = sampler.sample(sdf_func, num_rays=2000)

# Optional: save sampled points to local.
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(samples.detach().cpu().numpy())
o3d.io.write_point_cloud("outputs.ply", pcd)

SDFStudio Example

We provide an example of using our library with SDFStudio in the submodule example/sdfstudio.

To run this example, you need to set up the enviroment following instructions in their official repo, and run

git submodule update --init --recursive
cd example/sdfstudio 
pip install .
ns-download-data sdfstudio 

Download a pre-trained checkpoint from here and store it under ./outputs.

And finally run

ns-export uniformsamples --load-config outputs/data-sdfstudio-demo-data-dtu-scan65/neus/2025-02-21_143619/config.yml --output-dir outputs/data-sdfstudio-demo-data-dtu-scan65/neus/2025-02-21_143619

to get the sampled point cloud as a .ply file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages