samirak98/learnedSpectral
Numerical examples for the paper "Learned Regularization for Inverse Problems: Insights from a Spectral Model"
Learned Regularization for Inverse Problems: Insights from a Spectral Model
In this respository, we document the numerical examples from our paper Learned Regularization for Inverse Problems: Insights from a Spectral Model.
Note
If you spot a mistake, encounter any problems, or have any further comments or questions, feel free to send an email to samira.kabri[at]desy.de.
Content
Data
Requirements
Experiments
References
Citation
Data
In order to run the code smoothly and without too many package dependencies, some pre-saved data is required. The respective folder spectralData can be downloaded here:
https://syncandshare.desy.de/index.php/s/rSysTmdGAtYAf7r
The folder has a size of approximately 5.6 GB and contains:
- Three operators that implement the Radon transform for inputs of different dimensions, created with the
radonpackage, see also [1]. To simplify the computations we perform in our experiments, each operator contains the matrices$U,V$ and the vector$\sigma$ that form the singular value decomposition
$$A = V\mathrm{diag}(\sigma)U^{T}.$$
The pre-saved operators have the following specifications:-
radon_32.obj(21.6 MB) with forward operator$A: \mathbb{R}^{32\times 32} \rightarrow \mathbb{R}^{32\times 47}$ -
radon_64.obj(343 MB) with forward operator$A: \mathbb{R}^{64\times 64} \rightarrow \mathbb{R}^{64\times 93}$ -
radon_128.obj(5.3 GB) with forward operator$A: \mathbb{R}^{128\times 128} \rightarrow \mathbb{R}^{128\times 183}$
-
Tip
If you would like to create a radon operator of another dimension, we recommend using radon_matrix from the radon package. It returns a matrix which can be passed directly to the class ops.svd_op we provide in this repository. A minimum working example would look like this:
from radon import radon_matrix
from ops import svd_op
import torch
res = 16 # your favorite resolution
A = radon_matrix(img = torch.zeros((res,res)),
thetas = torch.linspace(0.0, torch.pi, res)[:-1])
op16 = svd_op(A,res) # computes the SVD and implements forward, inverse and adjoint for 2-D inputs
- Three lists (
pi32.txt,pi64.txt,pi128.txt) of coefficients$\{\Pi_n^*\}_{n \in \mathbb{N}}$ corresponding to the three pre-saved operators. The data distribution$\pi^*$ is described by the first 2400 images of the LoDoPaB CT data set, see also [2].
The code we have used to compute the coefficients is documented incoeffs.pyand can be applied to any other combination of data and operator. - An example image
test_img.png, taken from the LoDoPaB CT data set.
Requirements
Using the pre-saved data, running the code only requires the packages matplotlib, numpy, and scikit-image.
You can install these packages by running
pip install -r requirements.txt
in the project directory.
Experiments
The aim of the experiments we provide here, is to compare different data-driven spectral reconstruction operators to solve inverse problems. More precisely, for an inverse problem
Here,
The filter mse, adv and post in the code),
with training noise
For all considered approaches, the optimal filter coefficients are of the form
Here,
The specific coefficients for the different approaches are then given by
Our driving questions are:
- Are the data-driven reconstruction operators actually regularizers, i.e., stable?
- If yes: Is the regularization convergent, i.e., do we converge to a "ground truth"-reconstruction as the noise level tends to zero?
- If yes: Is the regularization still convergent if we test it on noise drawn from
$\nu \neq \mu$ ?
In the experiments, we perform CT-reconstruction, where the forward operator
The main parts of this repository are the two Jupyter Notebooks continuity.ipynb and convergence.ipynb.
- In
continuity.ipynb(which complements Section 6.1 of our paper) we document the experiments on the reconstruction error for a fixed and known noise model on three different image resolutions. - In
convergence.ipynb(which complements Section 6.2 of our paper) we document the experiments on the reconstruction error for a fixed image resolution but three different noise models and decaying noise level.
Tip
The object radon_128.obj is quite large and computations using the 128x128-operator can take quite some time.
If you have problems downloading the pre-saved operator or it takes too long to run the Code on your machine, you can skip the parts that use res = 128, or, respectively, change them to res = 64 or res = 32.
References
[1]
Kabri, S., Auras, A., Riccio, D., Bauermeister, H., Benning, M., Moeller, M., Burger, M.
Convergent Data-Driven Regularizations for CT Reconstruction. Commun. Appl. Math. Comput. (2024).
[2]
Leuschner, J., Schmidt, M., Otero Baguer, D., Maass, P.
LoDoPaB-CT, a benchmark dataset for low-dose computed tomography reconstruction.
Scientific Data, 8(109). (2021).
Citation
If you would like to cite our book chapter, you can copy the following bib entry:
@inbook{Burger2025learned,
url = {https://doi.org/10.1515/9783111251233-002},
title = {Learned regularization for inverse problems},
booktitle = {Data-driven Models in Inverse Problems},
author = {Martin Burger and Samira Kabri},
editor = {Tatiana A. Bubba},
publisher = {De Gruyter},
address = {Berlin, Boston},
pages = {39--72},
doi = {doi:10.1515/9783111251233-002},
isbn = {9783111251233},
year = {2025},
lastchecked = {2025-05-20}
}