JAX image interpolation utilities
Project description
im_jax
Image interpolation utilities in JAX, focused on bicubic interpolation with predictable behavior at boundaries.
This is a pure JAX implementation comparable to jax.scipy.ndimage.map_coordinates(..., order=3).
Linear interpolation is already available in dm_pix; this repository focuses on bicubic interpolation.
Bicubic interpolation
Bicubic interpolation estimates pixel values from a 4x4 neighborhood, producing smoother results than bilinear
methods while preserving local gradients. This implementation is designed for batched, JAX-native workloads and
keeps shapes and dtypes stable across jit, vmap, and grad.
Installation
pip install im_jax
For development:
pip install -e ".[dev]"
Usage
import jax.numpy as jnp
from im_jax import flat_nd_cubic_interpolate
image = jnp.arange(12.0, dtype=jnp.float32).reshape(3, 4)
locations = jnp.array([[0.5, 1.25], [1.0, 2.5]], dtype=jnp.float32)
values = flat_nd_cubic_interpolate(image, locations)
Benchmarks and validation
See docs/interpolation_benchmarks.ipynb for accuracy checks, validation against reference results, and
runtime measurements.
Tests
pytest
Release / PyPI
This project is published to PyPI automatically from GitHub tags.
- Create a tag like
v0.1.0and push it. - GitHub Actions builds and publishes the release to PyPI.
License
GPL-3.0-only. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 im_jax-0.1.1.tar.gz.
File metadata
- Download URL: im_jax-0.1.1.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f2f64bbdc2fe68634852821c80a02fb0c6a47b37c6f74a220aa03601d5eb801
|
|
| MD5 |
725cc00773503d2b1cf844a654b057ca
|
|
| BLAKE2b-256 |
75ad99e43e664d65e3f702420bb65bf666ce04ae05281e307b5d7d21ac4181f0
|
Provenance
The following attestation bundles were made for im_jax-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on EmileRouxSMB/im_jax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
im_jax-0.1.1.tar.gz -
Subject digest:
0f2f64bbdc2fe68634852821c80a02fb0c6a47b37c6f74a220aa03601d5eb801 - Sigstore transparency entry: 798131345
- Sigstore integration time:
-
Permalink:
EmileRouxSMB/im_jax@64526ad88378c31636bf3d90305bdf411d737d2c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/EmileRouxSMB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@64526ad88378c31636bf3d90305bdf411d737d2c -
Trigger Event:
push
-
Statement type:
File details
Details for the file im_jax-0.1.1-py3-none-any.whl.
File metadata
- Download URL: im_jax-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7deb709c13bb372bf5e6fcb7c7fff97c067b5ae66f9a0d4046f84ff37abd0626
|
|
| MD5 |
c380578c502e1165f0300e0684d29d46
|
|
| BLAKE2b-256 |
76fa8ec8f230b14a5922847cf04f75dddb5b0043da00d9f64210f5d12b0d830d
|
Provenance
The following attestation bundles were made for im_jax-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on EmileRouxSMB/im_jax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
im_jax-0.1.1-py3-none-any.whl -
Subject digest:
7deb709c13bb372bf5e6fcb7c7fff97c067b5ae66f9a0d4046f84ff37abd0626 - Sigstore transparency entry: 798131348
- Sigstore integration time:
-
Permalink:
EmileRouxSMB/im_jax@64526ad88378c31636bf3d90305bdf411d737d2c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/EmileRouxSMB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@64526ad88378c31636bf3d90305bdf411d737d2c -
Trigger Event:
push
-
Statement type: