Skip to main content

Thin Plate Spline implementation with numpy/scipy

Project description

tps

Lint and Test

Implementation of Thin Plate Spline. (For a faster implementation in torch, look at tps-torch)

Install

Pip

$ pip install thin-plate-spline

Conda

Not yet available

Getting started

import numpy 
from tps import ThinPlateSpline

# Some data
X_c = np.random.normal(0, 1, (800, 3))
X_t = np.random.normal(0, 2, (800, 2))
X = np.random.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

$ 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

thin-plate-spline-1.1.0.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

thin_plate_spline-1.1.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

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