Skip to main content

Cubic B-spline interpolation on multidimensional grids in PyTorch

Project description

torch-cubic-b-spline-grid

License PyPI Python Version CI codecov

Cubic B-spline interpolation on multidimensional grids in PyTorch.

The primary goal of this package is to provide a learnable, continuous parametrization of 1-4D spaces.


This is a PyTorch implementation of the model used in Warp for continuous deformation fields and locally variable optical parameters in cryo-EM images. The approach is described in Dimitry Tegunov's paper:

Many methods in Warp are based on a continuous parametrization of 1- to 3-dimensional spaces. This parameterization is achieved by spline interpolation between points on a coarse, uniform grid, which is computationally efficient. A grid extends over the entirety of each dimension that needs to be modeled. The grid resolution is defined by the number of control points in each dimension and is scaled according to physical constraints (for example, the number of frames or pixels) and available signal. The latter provides regularization to prevent overfitting of sparse data with too many parameters. When a parameter described by the grid is retrieved for a point in space (and time), for example for a particle (frame), B-spline interpolation is performed at that point on the grid. To fit a grid’s parameters, in general, a cost function associated with the interpolants at specific positions on the grid is optimized.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torch_cubic_b_spline_grid-0.0.1.tar.gz (148.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file torch_cubic_b_spline_grid-0.0.1.tar.gz.

File metadata

File hashes

Hashes for torch_cubic_b_spline_grid-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ebce9c55663b377d291e8af637796cbbdea9392750416593559e20c98c37e8ca
MD5 1aa3543b114a1498584329dc1ee16a9e
BLAKE2b-256 b3357e7a40ae2eafd8dce62a31d5be73510baf36f877d91d2d3b36107f9656c0

See more details on using hashes here.

File details

Details for the file torch_cubic_b_spline_grid-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_cubic_b_spline_grid-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f822117b2ea2ed15f861130cbd80e4e4a0d8b3072a6989c068635576f5241c1
MD5 b64137d59a8d224cd2b92acd82e5f911
BLAKE2b-256 3691e88c14c98ef4e42046cf7ab5f0832d344451f670a30e269ebf7de450deca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page