Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This repository contains a Python package providing an efficient solver for the Eikonal equation in 3D. The primary use for this package is to redistance a signed distance function (SDF) from its zero level set (e.g., during an optimization that optimizes the SDF). In particular, this implementation was created for the use in our paper on differentiable signed distance function rendering. You can find the code for that paper here.
This library does not convert meshes to SDFs, even though it can be used for such applications. This implementation runs efficiently on GPUs (using CUDA) and also provides a CPU implementation as a fallback. The solver is exposed via Python bindings and uses Dr.Jit for some of its implementation.
The code implements the parallel fast sweeping algorithm for the Eikonal equation:
A parallel fast sweeping method for the Eikonal equation. Miles Detrixhe, Frédéric Gibou, Chohong Min, Journal of Computational Physics 237 (2013)
The implementation is in part based on PDFS, see also LICENSE
for license details.
Pre-build binaries are provided on PyPi and can be installed using
pip install fastsweep
Alternatively, the package is also relatively easy to build and install from source. The build setup uses CMake and scikit build. Please clone the repository including submodules using
git clone --recursive git@github.com:rgl-epfl/fastsweep.git
The Python module can then be built and installed by invoking:
pip install ./fastsweep
Important: It is important that this solver and drjit
are compiled with exactly the same compiler and settings for binary compatibility. If you installed a pre-built drjit
package using pip
, you most likely will want to use the pre-built package for fastsweep
as well. Conversely, if you want to compile one of these packages locally, you will most likely need to compile the other one locally as well. If
there is a problem with binary compatibility, invoking the functionality of the solver will most likely throw a type-mismatch error.
The solver takes a Dr.Jit 3D TensorXf
as input and solves the Eikonal equation from its zero level set. It returns a valid SDF that reproduces the zero level set of the input. The solver does not support 1D or 2D problems, for these one can for example use scikit-fmm.
Given an initial 3D tensor, the solver can be invoked as
import fastsweep
data = drjit.cuda.TensorXf(...)
sdf = fastsweep.redistance(data)
The resulting array sdf
is then a valid SDF. The solver returns either a drjit.cuda.TensorXf
or dfjit.llvm.TensorXf
, depending on the type of the input. A complete
example script is provided here.
If you use this solver for an academic paper, consider citing the following paper:
@article{Vicini2022sdf,
title = {Differentiable Signed Distance Function Rendering},
author = {Delio Vicini and Sébastien Speierer and Wenzel Jakob},
year = 2022,
month = jul,
journal = {Transactions on Graphics (Proceedings of SIGGRAPH)},
volume = 41,
number = 4,
pages = {125:1--125:18},
doi = {10.1145/3528223.3530139}
}
FAQs
Eikonal solver using parallel fast sweeping
We found that fastsweep demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.