Thin Plate Spline implementation with PyTorch
Project description
torch-tps
Implementation of Thin Plate Spline. (See numpy implementation with thin-plate-spline library)
Install
Pip
$ pip install torch-tps
Conda
Not yet available
Getting started
import torch
from tps import ThinPlateSpline
# Some data
X_c = torch.normal(0, 1, (800, 3))
X_t = torch.normal(0, 2, (800, 2))
X = torch.normal(0, 1, (300, 3))
# Create the tps object
tps = ThinPlateSpline(alpha=0.0) # 0 Regularization
# Fit the control and target points
tps.fit(X_c, X_t)
# Transform new points
Y = tps.transform(X)
Also have a look at example.py
Build and Deploy
$ pip install build twine
$ python -m build
$ python -m twine upload dist/*
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-tps-1.0.1.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for torch_tps-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a34059615ba83fcd0c1ee9961eb75f1351e3c6cfb30c691aa6fddee13dcb6abf |
|
MD5 | 351dd15006b4d573e7d861fa553305e6 |
|
BLAKE2b-256 | 94ee9c85cdcfb30288d84b3e68cf63f2de216273aa5a5c670ddd1e50eefc22d7 |