Skip to main content

Fast Discrete Shearlet Transform layers in TensorFlow

Project description

TFDST: Fast Discrete Shearlet Transform Layers in TensorFlow

PyPI Version Python Versions TensorFlow License

TFDST provides differentiable TensorFlow/Keras layers for fast 2D and 3D discrete shearlet transforms and their inverse transforms.

Copyright 2025 Kishore Kumar Tarafdar. Filter-bank construction follows mathematical structure developed with credit to Vineet Ghule. This implementation provides differentiable TensorFlow/Keras layers with batched multichannel support and performance-oriented updates.

Capabilities

  • DST2D / IDST2D through transform=None or transform="inverse"
  • DST3D / IDST3D through transform=None or transform="inverse"
  • Batched multichannel TensorFlow tensors
  • Backpropagation through the transform layers

Limitations

  • Inputs are expected to match the configured spatial size N.
  • 2D input shape: [batch, N, N, channels].
  • 3D input shape: [batch, N, N, N, channels].
  • Wavelet filter coefficients are provided through PyWavelets.

Installation

pip install TFDST

Minimal Example

import tensorflow as tf
from TFDST.DST2DFB import DST2D
from TFDST.DST3DFB import DST3D

N = 32

# 2D
x2 = tf.random.normal([1, N, N, 1])
dst2 = DST2D(N=N, J=2, L=[1, 2], B=[4, 8], norm=True, wave="bior1.5")
idst2 = DST2D(N=N, J=2, L=[1, 2], B=[4, 8], norm=True, wave="bior1.5", transform="inverse")
y2 = dst2(x2)
r2 = idst2(y2)

# 3D
x3 = tf.random.normal([1, N, N, N, 1])
dst3 = DST3D(N=N, J=2, L=[1, 2], B=[4, 8], norm=True, wave="bior1.5")
idst3 = DST3D(N=N, J=2, L=[1, 2], B=[4, 8], norm=True, wave="bior1.5", transform="inverse")
y3 = dst3(x3)
r3 = idst3(y3)

print(x2.shape, r2.shape)
print(x3.shape, r3.shape)

Arguments

Argument Meaning
N Spatial size of each axis; 2D uses N x N, 3D uses N x N x N.
J Number of multiscale shearlet levels.
L Shear parameters per level; must have length J.
B Bandwidth/window parameters per level; must have length J.
wave PyWavelets wavelet name used for the radial wavelet filters, e.g. "bior1.5".
norm If True, applies filter-bank normalization.
transform Use None for forward DST and "inverse" for inverse DST.

Citation

This software is released for broad research, educational, and engineering use. If this package helps your work, please cite the following paper:

@misc{tarafdar2026interpretablefrugallearningsystems,
      title={Interpretable and Frugal Learning Systems Employing Multiresolution Pyramids and Volterra Kernels},
      author={Kishore Kumar Tarafdar},
      year={2026},
      eprint={2606.15011},
      archivePrefix={arXiv},
      primaryClass={eess.SP},
      url={https://arxiv.org/abs/2606.15011},
}

License

Apache License 2.0. See LICENSE.

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

tfdst-0.0.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tfdst-0.0.2-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file tfdst-0.0.2.tar.gz.

File metadata

  • Download URL: tfdst-0.0.2.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for tfdst-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fdd4c511ed847307592453c4166ee931a1eec79358f8d6cd14052a27ba0c2b13
MD5 8b6d296c4fdf790710e8195f982091ff
BLAKE2b-256 ea8eac4da24e2a21c3de9ccafe77900704b667a790db3051b43d7b47ebdf3069

See more details on using hashes here.

File details

Details for the file tfdst-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: tfdst-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for tfdst-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87bc3978fa31c119f65d72ee3322e01f3e2649f9181095a1bf0fb4d1b0d290aa
MD5 04a3a15f59c969a3d0c9ee855010a6f3
BLAKE2b-256 a280a02b419ec5f02c99c5631c98028d18f6079dd5c0771f4098aa125cefca57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page