Abstract
In modern image processing and computer vision, the ability to represent directional features—known as anisotropic singularities—is critical for high-fidelity reconstruction and analysis. While shearlets provide an optimal mathematical framework for this task, their integration into deep learning pipelines has historically been hindered by computational bottlenecks. This paper introduces tfShearlab, the first faithful implementation of the digital shearlet transform within the TensorFlow framework. By leveraging GPU acceleration and native tensor operations, tfShearlab achieves a 30x to 40x speedup over existing CPU-based libraries, enabling the use of shearlets as integrated layers within neural network architectures.
1. Introduction
Traditional wavelet transforms have long been the standard for multiscale analysis, excelling at capturing point-like singularities. However, they lack the directional sensitivity required to efficiently represent edges and curves in images. Shearlets were developed to address this limitation, providing a framework that accounts for scale, location, and orientation. Despite their theoretical advantages, practical application in deep learning has been limited. Most existing shearlet libraries (e.g., in Matlab or Julia) are CPU-bound, forcing researchers to constantly stream data between the CPU and GPU. This overhead prevents the seamless training of "physics-informed" models where the transform is a core component of the forward or backward pass.
2. Implementation and Methods
tfShearlab reformulates the digital shearlet transform as a series of native TensorFlow operations, ensuring that the entire computation remains on the GPU. The implementation focuses on several key technical innovations:
- Frequency Domain Processing: The library utilizes TensorFlow’s optimized Fast Fourier Transform (
tf.fft2d) to perform convolutions efficiently in the frequency domain. - Custom Shift Operators: To replicate the necessary
fftshiftfunctionality found in NumPy (but missing in native TensorFlow), the authors developedtffftshiftanditffftshiftusingtf.gather. These functions are optimized for high-dimensional tensor manipulation. - Parallelized Broadcasting: By utilizing TensorFlow’s broadcasting capabilities, the library can compute shearlet coefficients across multiple scales and directions simultaneously, maximizing the parallel processing power of modern GPUs.
- Hybrid Architectures: The library is designed to support Learned Primal-Dual (LPD) architectures. In these models, the network learns to perform image reconstruction directly within the shearlet domain, rather than the raw pixel domain.
3. Experimental Setup
The performance of tfShearlab was evaluated through a series of benchmarks focusing on speed and reconstruction quality:
- Datasets: Testing utilized standard images (e.g., "Flower" and "Boat") for denoising and inpainting. For medical imaging applications, the authors used synthetic Computed Tomography (CT) data consisting of randomly generated ellipses and the Shepp-Logan Phantom.
- Baselines: Results were compared against Curvelets, the BM3D denoising algorithm, and standard image-domain LPD methods.
4. Results and Discussion
4.1 Computational Efficiency
The move to a native TensorFlow implementation yielded significant performance gains. When compared to the state-of-the-art Julia API, tfShearlab reduced decomposition time from 1.18 seconds to 0.031 seconds (a ~38x speedup). Reconstruction times saw a similar improvement, dropping from 1.00 seconds to 0.033 seconds (~30x speedup). This efficiency effectively eliminates the CPU-GPU communication bottleneck, allowing shearlets to be used in real-time training loops.
4.2 Reconstruction Quality
In CT reconstruction tasks, the LPD-Shearlet approach demonstrated superior performance. By providing the network with a representation that inherently understands edges (singularities), the model achieved a Peak Signal-to-Noise Ratio (PSNR) of 39.15 dB. This significantly outperformed the standard image-domain LPD (32.19 dB) and wavelet-domain LPD (24.43 dB). Furthermore, in denoising and inpainting benchmarks, shearlet thresholding consistently outperformed both Curvelets and BM3D in terms of PSNR and Structural Similarity (SSIM).
5. Conclusion and Future Work
tfShearlab bridges the gap between sophisticated multiscale analysis and modern deep learning. By providing a fast, GPU-native implementation of the shearlet transform, it allows for the development of models that are both mathematically grounded and computationally efficient. While the current implementation is optimized for 2D images on GPUs, future iterations aim to extend support to 3D volumetric data and further optimize the digital shearing operator for Tensor Processing Units (TPUs).
Summary updated