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.0.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torch-tps-1.0.0.tar.gz.
File metadata
- Download URL: torch-tps-1.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
956134b579fcf10323821828dbc3198694ec46b81c08234009a307ea984d9804
|
|
| MD5 |
e89c2a146d12e510102a4803490f63db
|
|
| BLAKE2b-256 |
39e6df77096260917518ac56ea5b340d8f59bdda740b535f37d6c6047ab3c512
|
File details
Details for the file torch_tps-1.0.0-py3-none-any.whl.
File metadata
- Download URL: torch_tps-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2ec99a25409b8eac73c55c9291b1065cb53f05265ce8f025b2f890f49a54674
|
|
| MD5 |
5d100de7387ab343f8cc3ae15192f01b
|
|
| BLAKE2b-256 |
589568dfa4173eb05eaccd0c2ccf731e3dfba2809c4192f5cc6d9b1663229d25
|