PySAP: Python Sparse Data Analysis Package for multidisciplinary image processing

Samuel Farrens, Antoine Grigis, Loubna El Gueddari, Zaccharie Ramzi, Chaithya G. R., S. Starck, B. Sarthou, Hamza Cherkaoui, Philippe Ciuciu, Jean-Luc StarckAstron. Comput 2020 · DOI · OpenReview

TL;DR

This paper introduces PySAP, an open-source Python package designed for sparse data analysis and image reconstruction. PySAP offers a flexible framework for tackling complex inverse problems in fields like medical imaging and astrophysics, leveraging efficient wavelet transforms and modular optimization tools.

What Problem Does This Paper Address?

Acquiring high-quality, high-resolution images quickly is a persistent challenge in many scientific domains. Traditional imaging techniques often face trade-offs between speed, resolution, and signal-to-noise ratio. For instance, in Magnetic Resonance Imaging (MRI), faster scans can lead to undersampled data, resulting in blurry or incomplete images. Similarly, astronomical observations can be affected by noise and limitations in telescope capabilities. Recovering detailed information from such imperfect data requires sophisticated mathematical techniques, but robust and user-friendly software to implement these methods has been scarce. This paper addresses this gap by providing a unified, open-source platform for applying advanced sparse data analysis and image reconstruction techniques.

Methods

PySAP is built around two core modules: Sparse2D and ModOpt.

  • Sparse2D: This module provides a comprehensive suite of efficient sparse transforms, primarily implemented in C++ for speed. It includes various wavelet transforms (like undecimated wavelets, which are shift-invariant and beneficial for astrophysical images) and curvelet transforms. These transforms convert image data into a domain where most information is concentrated in a few coefficients, enabling sparsity. PySAP offers Python bindings for Sparse2D, allowing seamless integration into Python workflows.
  • ModOpt: This subpackage offers a modular framework for solving linear inverse problems using convex optimization. It implements several state-of-the-art optimization algorithms, such as Forward-Backward, FISTA, and Condat-Vũ. The modular design allows users to easily combine different linear operators (like those from Sparse2D), proximity operators (for regularization, e.g., L1 norm for sparsity), and gradient operators. This flexibility makes it straightforward to prototype and test various reconstruction strategies.

Additionally, PySAP includes a plug-in framework that allows for the creation of application-specific tools. These plug-ins combine the core modules to address well-defined problems, with examples provided for astrophysical image deconvolution/denoising and MRI reconstruction.

Datasets

The paper mentions that datasets used for the examples are provided within the pysap-data plug-in. Specific datasets are not detailed beyond their origin (e.g., COSMOS galaxy images, in vivo MRI data from a healthy volunteer at 7 Tesla). No new benchmarks are introduced; rather, existing datasets are used to demonstrate PySAP's capabilities.

Key Insights and Ideas

  • Bridging the Gap: PySAP effectively bridges the gap between advanced mathematical concepts in sparse data analysis and their practical application in scientific research by providing an accessible, open-source software package.
  • Modularity is Key: The modular design of ModOpt is a significant strength, allowing users to easily swap components and experiment with different optimization strategies and regularization techniques without rewriting large portions of code.
  • Cross-Disciplinary Applicability: The paper highlights the universality of sparse data analysis techniques, demonstrating PySAP's utility across seemingly disparate fields like astrophysics and medical imaging, particularly in MRI.
  • Efficiency for Real-Time Applications: The use of optimized C++ libraries for transforms (Sparse2D) and efficient Python implementations for optimization makes PySAP suitable for computationally intensive tasks, including potential real-time applications like MRI reconstruction.

Key Results

The paper demonstrates PySAP's effectiveness through practical examples:

  • Astrophysical Image Deconvolution: PySAP was used to deconvolve a simulated galaxy image, showing improved results compared to standard methods.
  • Astrophysical Image Denoising: The package successfully denoised a galaxy image while preserving important high-frequency features.
  • MRI Reconstruction:
    • For Cartesian undersampled MRI data, PySAP achieved a Structural Similarity (SSIM) score of 0.91, outperforming zero-filled reconstruction (SSIM = 0.82).
  • For non-Cartesian undersampled MRI data, PySAP achieved an SSIM score of 0.92, significantly better than zero-filled reconstruction (SSIM = 0.67).

These results showcase PySAP's ability to recover higher-fidelity images from undersampled and noisy data.

Limitations and Future Work

  • Limitations: The paper focuses on retrospective undersampling for MRI examples. While this demonstrates the algorithms, prospective acceleration in real-time imaging might involve different considerations (e.g., potential gains from oversampling).
  • Future Work: The authors plan to:
  • Add more optimization algorithms and reweighting methods.
  • Incorporate features for handling 4D data.
  • Explore GPU implementations for further computational speedup.
  • Integrate machine and deep learning techniques.
  • Develop new plug-ins for other imaging modalities like electron tomography and microscopy.
  • Leverage the Gadgetron framework for wider deployment on MRI scanners.

Summary updated

Abstract

We present the open-source image processing software package PySAP (Python Sparse data Analysis Package) developed for the COmpressed Sensing for Magnetic resonance Imaging and Cosmology (COSMIC) project. This package provides a set of flexible tools that can be applied to a variety of compressed sensing and image reconstruction problems in various research domains. In particular, PySAP offers fast wavelet transforms and a range of integrated optimisation algorithms. In this paper we present the features available in PySAP and provide practical demonstrations on astrophysical and magnetic resonance imaging data.
BibTeX
@article{farrens2020pysap,
  author = {Samuel Farrens and Antoine Grigis and Loubna El Gueddari and Zaccharie Ramzi and Chaithya G. R. and S. Starck and B. Sarthou and Hamza Cherkaoui and Philippe Ciuciu and Jean-Luc Starck},
  title = {{PySAP: Python Sparse Data Analysis Package for multidisciplinary image processing}},
  journal = {Astron. Comput.},
  year = {2020},
  doi = {10.1016/j.ascom.2020.100402},
}
Figure