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 |
Stabilizing | Continuous tensor-product models evaluated at arbitrary coordinates |
| Affine, differentials, smoothing, regression, pyramids, wavelets | Experimental | Available for research while their contracts and reference coverage mature |
Experimental describes API and validation maturity, not the importance of the underlying methods. See the project status for exact evidence and remaining graduation work.
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
- Getting started
- Modules
- Examples
- Claims and evidence
- Resize guide
- Volume downsampling tutorial
- SELMA3D microvessel validation
- Interactive SELMA3D napari demo
- Controlled 3-D spectral-coarsening validation
- 3-D microscopy case study
- BBBC050 segmentation validation
- Performance evidence
- API reference
- Provenance
- Changelog
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
Release files for splineops 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| splineops-2.2.0.tar.gz | 6.1 MB | Details |
Built distributions (wheels)
Total release size: 12.2 MB
Release files / splineops-2.2.0.tar.gz
| Download URL | splineops-2.2.0.tar.gz |
|---|---|
| Size | 6.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b926a8b9a709acbebdff03faff48e0d765243298558332f36cf036b9569a7c98
|
|
BLAKE2b-256 checksum How to use checksums |
01af819bb298efa8b22648dfd42b46e0fc01d5212b66896f92ffb27e76de90b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp313-cp313-win_amd64.whl
| Download URL | splineops-2.2.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 609.7 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2b058f1bb535b7c81a26307e8b959e6a85b37640fc44ce1560d791bc04e025c4
|
|
BLAKE2b-256 checksum How to use checksums |
e08ff3ae40d4e9e91079c788219f2145276348e030ed39f2294c4b25e41ea149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | splineops-2.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 534.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 |
6b988674a3d75fe04d59126258d2ac98fa47b6f74effd5b207123e9f96e0a8df
|
|
BLAKE2b-256 checksum How to use checksums |
70465dcbae3be4af31eba3e88231fc925577b1c7f2defb3da246fa747977919a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | splineops-2.2.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 416.2 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
131f4080952c69601107b8bccef0545e8c571c78647e80a3a6c8d0f8aa12e89e
|
|
BLAKE2b-256 checksum How to use checksums |
c615a1f3714ee4779b2918acd6df392489b4f7376ac3e55b54340f1131563d83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | splineops-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 476.0 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
cf76fe9f764a8fb1b1dc1097baeefe5444c16c79e6cf8e423226a5a695a1d187
|
|
BLAKE2b-256 checksum How to use checksums |
317c5f5745a5f5940ff63cd5b59abfffdbee2583c44a73b2ca2997977a1c64b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp312-cp312-win_amd64.whl
| Download URL | splineops-2.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 609.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ed23306388b90ac29f80874a349c3cac12c04f3f9620d6c78fc30a970f4a5ef6
|
|
BLAKE2b-256 checksum How to use checksums |
a4a74884bed40a32ff87e1f170b156f63aaf3e6f857f7d0b11d469bf49e6adeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | splineops-2.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 534.4 kB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f7750e3f735070bc9e8f82321084d039df9818a4eebe54602a9e3da1baedf667
|
|
BLAKE2b-256 checksum How to use checksums |
2b9d7cbb7e4420754eca3270be38ff638087ce77ef414c691554a654b82973f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | splineops-2.2.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 416.2 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5d3a4a8e3b9640f0a8db348c2e2f9bae09fb00ba30bec8a0d2e39a104f162563
|
|
BLAKE2b-256 checksum How to use checksums |
b6ec75c28d8f5dd092055db4cb8be38cc40d27357b881aa5fa8ec2f0f0df1e26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | splineops-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 475.9 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
81e542cc20c256d4c284ed51aae65feba414d7536f5712379192dc8656ff48d8
|
|
BLAKE2b-256 checksum How to use checksums |
7d4cbae9e5a7e5a1f698c33b340b85a81853a5869f1e8c9fb8540bac34c665b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp311-cp311-win_amd64.whl
| Download URL | splineops-2.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 606.1 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e2ef9ca2b2015474473562666f7014c1d50c4d802b1b5ccec0a9271f80bfbb50
|
|
BLAKE2b-256 checksum How to use checksums |
a85c336317fbc4e71d4ccd648cd0d1f402747b23e666bdb4e921f8e0f21dd7ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | splineops-2.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 533.2 kB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d9f61335cb778d731098e1d1429c7d3786eeb8a9fb4cbf48c89f0a1261dce58
|
|
BLAKE2b-256 checksum How to use checksums |
9535a75ac2522f8ba61c285c934a9c91ed54e93e41eaa54686d2d1838a7e8f9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | splineops-2.2.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 414.8 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d24eee91502bb58a53cf5d2aceaba30e060fdf5ae868c42c56548a17a340f112
|
|
BLAKE2b-256 checksum How to use checksums |
600f48f173d1abc16239c2f0f40f41b3ea8a34d8be1b6d0c13d3d069f307b9a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / splineops-2.2.0-cp311-cp311-macosx_10_13_x86_64.whl
| Download URL | splineops-2.2.0-cp311-cp311-macosx_10_13_x86_64.whl |
|---|---|
| Size | 474.3 kB |
| Tags | CPython 3.11 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
834b0c715155cc680ef0ebb6969d9de5c753f42430af1dc2ae93f15e45588232
|
|
BLAKE2b-256 checksum How to use checksums |
e7ebe1ea6998ebff2f18644a36bfd473d2beb5d9218c4d0d9d34f80de63c370e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency log