Git Product home page Git Product logo

recon's Introduction

RECON

A python-based research toolbox for reconstruction and segmentation to solve Inverse Problems.

Reconstruction

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 DataTV Regularized

Smoothing

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 ImageTikhonovTVBregman-TV

Segmentation

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)
ImageSegmentation

References

  1. 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.
  2. To outsource operator handling PyLops package is used.

recon's People

Contributors

lucasplagwitz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.