A python-based research toolbox for reconstruction and segmentation to solve Inverse Problems.
In terms of Inverse Problems one is interested in the reason
of measurment data
with regard to a forward map
.
Due to the fact of measurement inaccuracies, regularization terms
are added and the optimization problem is maintained as
from recon.reconstruction import PdRecon
import pylops
FFTop = pylops.signalprocessing.FFT(dims=(nt, nx), dir=0, nfft=nfft, sampling=dt)
D = FFTop*d.flatten() + n
tv_recon = PdRecon(O=FFTop, domain_shape=d.shape, reg_mode='tv', alpha=2.0)
u = tv_recon.solve(D, maxiter=350, tol=10**(-4))
Noisy Data | TV Regularized |
---|---|
![]() |
![]() |
Image Smoothing is a special case of regularized reconstruction.
from scipy import misc
from recon.reconstruction import PdSmooth
img = misc.ascent()
gt = img/np.max(img)
sigma = 0.2
n = sigma*np.max(gt.ravel()*np.random.uniform(-1,1, gt.shape)
noise_img = gt + n
tv_smoothing = PdSmooth(domain_shape=gt.shape, reg_mode='tv', alpha=0.2, tau=2.3335)
u0 = tv_smoothing.solve(data=noise_img, maxiter=150, tol=10**(-4))
Noisy Image | Tikhonov | TV | Bregman-TV |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Some segmentation methods are implemented as part of regularization approaches and performance measurements.
from recon.segmentation.tv_pdghm import multi_class_segmentation
import nibabel as nib
img = nib.load("file.nii")
d = np.array(img.dataobj)
gt = d/np.max(d)
classes = [0, 0.2, 0.4, 0.7]
result, _ = multi_class_segmentation(gt, classes=classes, beta=0.001)
Image | Segmentation |
---|---|
![]() |
![]() |
- The Repo based on Enhancing joint reconstruction and segmentation with non-convex Bregman iteration - Veronica Corona et al 2019 Inverse Problems 35, and their code on GitHub.
- To outsource operator handling PyLops package is used.