Skip to main content

SplineOps

Projection-based antialiased resizing for N-D scientific arrays.

SplineOps is designed for precise, repeatable downsampling of regular-grid 2-D images and 3-D volumes. It combines explicit coordinate semantics, a readable Python reference implementation, a native CPU backend, and reusable plans for fixed-geometry workloads.

Installation

SplineOps requires Python 3.11 or newer:

python -m pip install splineops

Published wheels include the native resize extension on supported platforms.

Quick start

import numpy as np
from splineops import resize

volume = np.random.default_rng(0).random((64, 192, 192), dtype=np.float32)
coarse = resize(
    volume,
    output_size=(32, 96, 96),
    method="cubic-antialiasing",
)

The *-antialiasing methods project the input spline onto a coarser spline space instead of treating downsampling as interpolation alone. For repeated arrays with the same geometry, ResizePlan reuses setup and workspace state.

When to use SplineOps

SplineOps is a good fit when:

  • continuous-valued 2-D or 3-D NumPy data must be downsampled;
  • coordinate, boundary, and output-shape semantics must be explicit;
  • aliasing matters; or
  • many arrays share one resize geometry.

Another tool may be a better fit when:

  • differentiable GPU execution is required;
  • physical-space image metadata must be managed automatically;
  • ordinary display-image scaling is the only goal; or
  • categorical labels are being resampled, where nearest-neighbour semantics are normally appropriate.

Public maturity

Module Status Public position
resize, ResizePlan Stable Native N-D interpolation and projection antialiasing with a Python reference path
TensorSpline Stable CPU Continuous tensor-product models evaluated at arbitrary coordinates
Affine, differentials, smoothing, regression, pyramids, wavelets Stable CPU Documented numerical operators, independent references, and cross-platform tests

Stability covers the documented CPU contracts and precision. CuPy remains experimental, and order-5 wavelets retain their approximate reconstruction contract. See API stability and support for the compatibility policy and exact boundaries.

Numerical and performance position

SplineOps does not claim to be the fastest generic 2-D image resizer. OpenCV, PyTorch, or other libraries can be faster when their coordinate, boundary, kernel, and antialiasing conventions are acceptable.

SplineOps is strongest when the spline model matters: defined grids and boundaries, N-D projection antialiasing, native/reference parity, and repeated fixed-geometry execution. Cross-library reports include semantic differences as well as timings; numerical difference from SplineOps is not treated as an independent accuracy metric.

The flagship SELMA3D microvessel validation uses 18 held-out expert-labelled 3-D microscopy patches. For the tested lateral 2x coarsening, SplineOps had higher mean vessel-ranking ROC AUC than the named SciPy, scikit-image, and PyTorch pipelines under a predeclared family-wise rule. It was 12.49x, 15.17x, and 1.36x faster, respectively, on the recorded one-thread CPU run. This is narrow preprocessing superiority—not segmentation or universal resampling superiority.

Explore that result interactively with the installed SELMA3D napari comparison demo. It downloads one checksum-verified public patch, runs the named methods locally, and provides a curtain slider over their outputs and expert vessel labels. The default demo extra avoids PyTorch; install selma3d-demo-all when the PyTorch-area comparison is required.

The exact approved public wording and its limits are maintained in Claims and evidence.

The 3-D microscopy case study tests that position on a public two-channel volume. It publishes the input checksum, code, raw results, local timings, and the limits of each metric.

The stricter BBBC050 segmentation validation uses manual labels and embryo-level held-out evaluation. SplineOps was fast and competitive, but the predeclared quality-superiority criterion was not met.

The controlled 3-D spectral-coarsening validation uses analytical targets rather than a library output. Its frozen criterion passed against six generic resize alternatives: projection reduced mean NRMSE by 54% versus the nearest frozen baseline over 72 smooth field cases. A post-hoc polyphase FIR audit was far more accurate, so this is not evidence of broad scientific-resampling or downstream-task superiority.

Backends

  • NumPy is supported across the package.
  • The native C++ backend accelerates resize on CPU.
  • CuPy interoperability is experimental and limited to parts of TensorSpline.

Set SPLINEOPS_ACCEL=never to force the Python resize reference or SPLINEOPS_ACCEL=always to require the native extension. See the backend contract for exact scope.

Documentation

SplineOps modernizes spline methods developed across the Biomedical Imaging Group at EPFL and its collaborators. Method citations, implementation history, and source provenance are recorded explicitly.

Development

git clone https://github.com/splineops/splineops.git
cd splineops
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
python -m pytest -q

Reproducible resize evidence commands include:

python scripts/benchmark_resize_pr.py --profile smoke --output-dir /tmp/splineops-smoke
python scripts/benchmark_resize_native.py --backend both --output-csv /tmp/splineops-native.csv
python scripts/benchmark_resize_libraries.py --output-csv /tmp/splineops-libraries.csv

Metadata

Release files for splineops 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splineops 2.3.0
File Size Uploaded Provenance Actions
splineops-2.3.0.tar.gz 5.6 MB With provenance Details for splineops-2.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for splineops 2.3.0
File Actions
splineops-2.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for splineops-2.3.0-cp313-cp313-win_amd64.whl
splineops-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for splineops-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
splineops-2.3.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for splineops-2.3.0-cp313-cp313-macosx_11_0_arm64.whl
splineops-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details for splineops-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl
splineops-2.3.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for splineops-2.3.0-cp312-cp312-win_amd64.whl
splineops-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for splineops-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
splineops-2.3.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for splineops-2.3.0-cp312-cp312-macosx_11_0_arm64.whl
splineops-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details for splineops-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl
splineops-2.3.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for splineops-2.3.0-cp311-cp311-win_amd64.whl
splineops-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for splineops-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
splineops-2.3.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for splineops-2.3.0-cp311-cp311-macosx_11_0_arm64.whl
splineops-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.13+ x86-64 Details for splineops-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl

Total release size: 11.8 MB

Release files / splineops-2.3.0.tar.gz

Download URL splineops-2.3.0.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
2a5ca246848ae915cd2f030e26772bf1950a726a531193b8c9db530fd77f7f9c
BLAKE2b-256 checksum
How to use checksums
9fb470734fc994e4b43129a62ecb40b32b9d50d3f748cb2620d6e236deed1386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp313-cp313-win_amd64.whl

Download URL splineops-2.3.0-cp313-cp313-win_amd64.whl
Size 615.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
717d5e8cbec1a3f8f08d48a5ae28afbd0a693dae466a842898880205e52f3b46
BLAKE2b-256 checksum
How to use checksums
1918d951ec0b3b2b4cf49c54ddd8303d31a513197a0c7f604ff7e4816bd89161
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL splineops-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 539.4 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1244393f8e1a07dca1cfb50c88825727a891312ce1bfc79209e0a128278f9a80
BLAKE2b-256 checksum
How to use checksums
300cc614b247e6cc2c6e1a47bad66d11c1b63454efa573575eafe657166c719a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL splineops-2.3.0-cp313-cp313-macosx_11_0_arm64.whl
Size 421.1 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2e01c5bbd9d2ca74b2d24f7bfea547b2818a3bc7fadd824c1be547095f54f42e
BLAKE2b-256 checksum
How to use checksums
efa2e9dd346e16bf0021bd709a34102eabda1ea1f8d040e0105341c4f20589f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl

Download URL splineops-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl
Size 481.4 kB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
6143fd02881572cc4406ef28fce1c50e1b10d7cebb1e88534c8ef2b4d1e91290
BLAKE2b-256 checksum
How to use checksums
fa0a50b0eecc2332af18140288c04a75362b321c080584734b644ac32f58f84e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp312-cp312-win_amd64.whl

Download URL splineops-2.3.0-cp312-cp312-win_amd64.whl
Size 615.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
24774b6108e354c7d6d94372e39299d6d8f64a4ec9b3e07c6e2689b138a23f5f
BLAKE2b-256 checksum
How to use checksums
4e77986c0b17a1371246a43e0f094f74c18d3b5f383366f5e327f63a52191dae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL splineops-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 539.6 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
72ac42e780eeea9df25411a17ff63cc33ac0efb38a1f5143d581b9a0c2ac0f14
BLAKE2b-256 checksum
How to use checksums
17fd4c8fe7382f1267ffa93791f93be23e81db13987d258681babd5d60abf360
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL splineops-2.3.0-cp312-cp312-macosx_11_0_arm64.whl
Size 421.0 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bef71f45595398396afd1c0b264177c7c5160d1b3ba7aef3d720a6629a332f62
BLAKE2b-256 checksum
How to use checksums
7db216498f772f4de6584438259fb01e7776228fd75ad445942b4b8601d90509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl

Download URL splineops-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl
Size 481.3 kB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
c1a580ff2d37b70e431cccd01587687deef4e730814474a49f8c81516bfdf1be
BLAKE2b-256 checksum
How to use checksums
e98ea12a35e2e2d22bf6c7f8b32230feaff1e9966e8c84cf1a91ee4a10963d3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp311-cp311-win_amd64.whl

Download URL splineops-2.3.0-cp311-cp311-win_amd64.whl
Size 612.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
281b48048e3973a3ac1b8593fad88851498a75a70278a05002d109d2f1e12e13
BLAKE2b-256 checksum
How to use checksums
44f08dc697626c1310aa52d24b032b504c0b613e13c7100bb47d3d8c23040987
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL splineops-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 538.6 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
83625137c69e2afc8528bdc396f126cea59344dde88fc085a4aee7965aa8ed0e
BLAKE2b-256 checksum
How to use checksums
3662510b37615ca3d7445e292257352c252c5de4214b4cc456c55574118fcd76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL splineops-2.3.0-cp311-cp311-macosx_11_0_arm64.whl
Size 419.7 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0b67bdc160ea61053179d1aa2eb081a024fee60aa93ee167485870e68c07732a
BLAKE2b-256 checksum
How to use checksums
f0e95fba75a68cdc8b00b195f27d928fd2d7fb00732ed9081663a7bbc81d6f3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / splineops-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl

Download URL splineops-2.3.0-cp311-cp311-macosx_10_13_x86_64.whl
Size 479.6 kB
Tags CPython 3.11 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
6f67feb02d4db90b6069ac60bf6b86ce0a597a78ead6845511c316a8c910a5ec
BLAKE2b-256 checksum
How to use checksums
fee97298ddcfdd479ec7a7d380fc1978f0e480c01183024b1ff2d3d907265eb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for splineops 2.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for splineops-2.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page