Phase contrast tomography at ESRF : Algorithms - Pierre Paleo

Python prototype of Chambolle-Pock for TV regularization (Deconvolution,. Tomographic reconstruction) : github.com/pierrepaleo/ChambollePock. 5/25.
5MB taille 67 téléchargements 259 vues
Phase contrast tomography at ESRF : Algorithms

Pierre Paleo ESRF

16 Sepember 2015

Outline

1 Iterative methods for limited data

Algorithms Wavelets as a sparsifying transform

2 Common problems and approaches

Rings artefacts Paganin with non constant δ/β Local tomography

1/25

16 Sepember 2015

Pierre Paleo

1. Plan

1 Iterative methods for limited data

Algorithms Wavelets as a sparsifying transform

2 Common problems and approaches

Rings artefacts Paganin with non constant δ/β Local tomography

1/25

16 Sepember 2015

Pierre Paleo

1. Iterative methods • Iterative methods get the most of the data • Limited data • Noise • Usually boils down to

argmin x

n o kP x − dk22 + g(x)

P : projection operator d : data x : slice g(x) : prior

• Sparsity-promoting prior : g(x) = λ kHxk1

• Our approach : • High-throughput (parallel/distributed) implementation • “Simple”, GPU-friendly algorithms

2/25

16 Sepember 2015

Pierre Paleo

1.1 Plan

1 Iterative methods for limited data

Algorithms Wavelets as a sparsifying transform 2 Common problems and approaches

2/25

16 Sepember 2015

Pierre Paleo

1.1 Algorithms

Two types of formulations :

Analysis formulation

Synthesis formulation

kP x − dk22 + λ kHxk1

kP H ∗ w − dk22 + λ kwk1

• Algorithms are simpler for the Synthesis formulation • Ex: proxk·k is straightforward, proxkH·k is not 1 1 • Both are equivalent iff H is invertible • Wavelets, Dictionary Learning

3/25

16 Sepember 2015

Pierre Paleo

1.1 Proximal methods • Minimization of F = f + g : proximal methods • Forward-Backward : FISTA xk = proxγg (yk−1 − γ∇f (yk−1 )) αk = (k − 1)/(k + a) yk = xk + αk (xk − xk−1 ) This modified version : [CD14] • Primal-Dual : Chambolle-Pock

Minimize F (x) = f˜(x) + g˜(Kx) x ˜k = proxτ f˜ (xk−1 − τ K ∗ (uk−1 )) u ˜k = proxσ˜g∗ (uk−1 + σK(2˜ xk − xk−1 ) xk = xk−1 + ρ(˜ xk − xk−1 ) uk = uk−1 + ρ(˜ uk − uk−1 ) This relaxed version : [Con13] 4/25

16 Sepember 2015

Pierre Paleo

1.1 Proximal methods

• Proximal methods involve the computation of

 proxγg (y) = argmin x

 1 2 kx − yk2 + γg(x) 2

• For simple functions g, proxγg (·) is an element-wise operation ˜ • If not, split again the problem F (x) = f˜(x) + g˜(Kx) + h(x)

[Con13] • Simple operations + variables kept on GPU Python prototype of Chambolle-Pock for TV regularization (Deconvolution, Tomographic reconstruction) : github.com/pierrepaleo/ChambollePock

5/25

16 Sepember 2015

Pierre Paleo

1.1 A new “Conjugate subgradient” method

• Conjugate Gradient (CG) is fast for L2 minimization • for L2-L1 optimization, F (x) = kP x − dk22 + λ kHxk1 is not

differentiable • Subgradient methods : xk+1 = xk − γk pk

pk ∈ ∂F (xk )

• “Slow” • Not clear how to chose γk • Not a descent method (energy can increase in the process)

• Build a set of conjugate directions for a non-smooth function ?

6/25

16 Sepember 2015

Pierre Paleo

1.1 A new “Conjugate subgradient” method L2-L1 optimization : F (x) = kAx − bk22 + λ kxk1 | {z } | {z } f (x)

g(x)

Dictionary-Learning : F (x) = kP D∗ w − dk22 + λ kwk1 • Choice of the subdifferential :

( sign (x) if x 6= 0 ∂g(x) = sign (∇f (x)) if x = 0

→ Only one choice of subgradient 7/25

16 Sepember 2015

Pierre Paleo

1.1 A new “Conjugate subgradient” method

• Adaptive preconditioner based on |∇f |

[MP15]

• Robust for ill-posed problems

• Python prototype : github.com/pierrepaleo/csg

(Very) fast convergence Component-wise operations : GPU-friendly Current implementation is memory-consuming • Significant amount of time : CPU-GPU transfers

Sum on millions of elements 8/25

16 Sepember 2015

Pierre Paleo

(calculation of β)

: loss of accuracy

1.2 Plan

1 Iterative methods for limited data

Algorithms Wavelets as a sparsifying transform 2 Common problems and approaches

8/25

16 Sepember 2015

Pierre Paleo

1.2 Wavelets as a sparsifying transform

• Total Variation Fast Adapted only for simple (piecewise-constant) slices • Dictionary Learning Adapted to all images Have to learn an appropriate dictionary Slower

→ Trade-off between these two regularizations ?

9/25

16 Sepember 2015

Pierre Paleo

1.2 Wavelets as a sparsifying transform

Wavelet are attractive : • Most images are sparse in a wavelet basis • No need to learn a dictionary • Fast transforms • (Bonus) Multi-resolution processing Credits: ID16-a

10/25

16 Sepember 2015

Pierre Paleo

1.2 Wavelets : implementation • DWT is not translation invariant : synthesis artifacts • Achieve translation invariance by random shifts • undecimated WT and dual-tree complex WT use more memory

regular DWT

FBP

DWT with random shifts

• Choice of the wavelet : few vanishing moments 11/25

16 Sepember 2015

Pierre Paleo

1.2 Iterative methods : Execution time

Test on an Intel Xeon E5-2667 + NVidia Tesla K20m (ESRF scisoft12)

• Operators are simple for TV and Wavelets : iterations are fast • For big volumes, the bottleneck the Projection and

Backprojection routines 12/25

16 Sepember 2015

Pierre Paleo

1.2 Iterative methods in PyHST • Three sparsity-promoting methods are implemented • One or more optimization algorithms for each

• SIRT is implemented via the “SIRT-filter” approach [PB15] • Tip: using FBP instead of P in iterative methods

dramatically increases the convergence rate • In the Fourier grid, the low frequencies are over-represented.

The ramp is a preconditioner. 13/25

16 Sepember 2015

Pierre Paleo

2.0 Plan

1 Iterative methods for limited data

Algorithms Wavelets as a sparsifying transform

2 Common problems and approaches

Rings artefacts Paganin with non constant δ/β Local tomography

13/25

16 Sepember 2015

Pierre Paleo

2.1 Plan

1 Iterative methods for limited data 2 Common problems and approaches

Rings artefacts Paganin with non constant δ/β Local tomography

13/25

16 Sepember 2015

Pierre Paleo

2.1 Rings artefacts

• Rings artefacts have many possible causes • defective pixels in the detector • dust on the scintillator • vibration of the monochromator • tilt of the rotation axis • ... • Sinogram pre-processing vs slice post-processing • Sum along angles and filter [Riv] [BH06] • Fourier-Wavelet de-striping [MTMS09] • Sinogram regularization [MROB14]

14/25

16 Sepember 2015

Pierre Paleo

2.1 Rings artefacts : iterative correction • Sinogram pre-processing can induce new artefacts in the reconstruction • Rings correction can be included in the objective function [PM15]   1 2 argmin F (x) = kP x + U r − dk2 + λ kHxk1 + λr krk1 2 x,r

Syntactic foam. Credits: Elodie Boller and Paul Tafforeau, ID19

15/25

16 Sepember 2015

Pierre Paleo

2.2 Plan

1 Iterative methods for limited data 2 Common problems and approaches

Rings artefacts Paganin with non constant δ/β Local tomography

15/25

16 Sepember 2015

Pierre Paleo

2.2 Paganin with non constant δ/β • “Flesh + Bones” samples : the “bones” parts are strongly

absorbing, preventing the visualization of surrounding features • Perform two Paganin phase retrieval with different distances

for bones and flesh

16/25

16 Sepember 2015

Pierre Paleo

2.2 Non constant δ/β : Multi-Paganin

Looking for cartilage in a Rabbit knee. Credits: Johannes Stroebel and Paola Coan, ID17

• Circumvents the strong absorption of some parts • Works if the heterogeneous parts can be segmented !

17/25

16 Sepember 2015

Pierre Paleo

2.3 Plan

1 Iterative methods for limited data 2 Common problems and approaches

Rings artefacts Paganin with non constant δ/β Local tomography

17/25

16 Sepember 2015

Pierre Paleo

2.3 Local tomography : cupping • Sinogram padding strategies [PDC13]

• “Sinogram straightening”

18/25

16 Sepember 2015

Pierre Paleo

2.3 Local tomography : cupping

19/25

16 Sepember 2015

Pierre Paleo

2.3 Local tomography : cupping

20/25

16 Sepember 2015

Pierre Paleo

2.3 Drift of the intensity values in the volume

• For elongated samples, the quantity of material outside ROI is

varying along the vertical axis • This leads to a gradient of contrast in the reconstructed

volume • Possible strategies • Appropriate padding ? • Estimate the material outside ROI ?

21/25

16 Sepember 2015

Pierre Paleo

2.3 Iterative methods and artefacts removal • Slice: 2048 × 2048 pixels • 250 (very) noisy projections Osmium sample. Credits: Alexandra Pacureanu, ID16

FBP after cupping removal 22/25

16 Sepember 2015

Pierre Paleo

2.3 Iterative methods and artefacts removal • Slice: 2048 × 2048 pixels • 250 (very) noisy projections Osmium sample. Credits: Alexandra Pacureanu, ID16

β = 20 22/25

16 Sepember 2015

Pierre Paleo

2.3 Iterative methods and artefacts removal • Slice: 2048 × 2048 pixels • 250 (very) noisy projections

β = 60 22/25

16 Sepember 2015

Pierre Paleo

3.0 Conclusion

• Iterative methods are not just esthetic • “Compressed sensing makes every pixel count” • Estimation of regularization parameter ? Quality assessment ? • Local tomography challenges • Cupping • Gradient of contrast

23/25

16 Sepember 2015

Pierre Paleo

Thanks you for your attention !

23/25

16 Sepember 2015

Pierre Paleo

3.0 References I Mirko Boin and Astrid Haibel. Compensation of ring artefacts in synchrotron tomographic images. Opt. Express, 14(25):12071–12075, Dec 2006. Antonin Chambolle and Charles Dossal. On the convergence of the iterates of “fista”. Preprint hal-01060130, September, 2014. Laurent Condat. A primal–dual splitting method for convex optimization involving lipschitzian, proximable and linear composite terms. Journal of Optimization Theory and Applications, 158(2):460–479, 2013. A. Mirone and P. Paleo. A conjugate subgradient algorithm with adaptive preconditioning for lasso minimization. To appear in Computational Mathematics and Mathematical Physics, Russian Academy of Science, 2015. E. X. Miqueles, J. Rinkel, F. O’Dowd, and J. S. V. Berm´ udez. Generalized titarenko’s algorithm for ring artefacts reduction. Journal of Synchrotron Radiation, 21:1333–1346, 2014. Beat M¨ unch, Pavel Trtik, Federica Marone, and Marco Stampanoni. Stripe and ring artifact removal with combined wavelet—fourier filtering. Opt. Express, 17(10):8567–8591, May 2009. D. M. Pelt and K. J. Batenburg. Accurately approximating algebraic tomographic reconstruction by filtered backprojection. In Proceedings of the 2015 International Meeting on Fully Three-Dimensional Image Reconstruction in Radiology and Nuclear Medicine, 2015. Yongsheng Pan and Francesco De Carlo. A new padding scheme for local tomograpy in tomographic microscopy, 2013. 24/25

16 Sepember 2015

Pierre Paleo

3.0 References II

Pierre Paleo and Alessandro Mirone. Ring artifacts correction in compressed sensing tomographic reconstruction. Journal of Synchrotron Radiation, pages 1268–1278, 2015. M. Rivers. tomorecon.

25/25

16 Sepember 2015

Pierre Paleo

3.0 Iterative rings correction : details (1)  argmin x,r

1 F (x) = kP x + U r − dk22 + λ kHxk1 + λr krk1 2



For the theoretical derivations, the variables are vectorized (i.e stacked into a column-vector). Symbol x d r P H

Name slice sinogram rings variables projector sparsf. transform

Shape N 2, 1 Np × Nb , 1 Nb , 1 Np × Nb , N 2 N 2 × N 2, N 2

N : number of rows (or columns) of the slice Nb : number of detector bins Np : number of projection angles

 r1  T repeats the ring ..  vector on each .  = r 1 · · · r Nb · · · r 1 · · · r Nb projection angle r Nb

  IdNb  .   U × r =  ..  ×  

IdNb



U T × d = IdNb · · · IdNb 

25/25

16 Sepember 2015



 Σ1    ..  × = .  dNp ×Nb ΣNb

Pierre Paleo

d1 .. .





sums along the columns

3.0 Iterative rings correction : details (2)

 argmin

F (x) =

x,r

1 kP x + U r − dk22 + λ kHxk1 + λr krk1 2



• Lines assumed constant along the projection angles → Variable r of Nb components, repeated along the Np angles

• Only a few lines in the sinogram : penalize krk1

• The proximal is separable wrt x and r g(x, r) = u(x)+v(r)

25/25

16 Sepember 2015

⇒ proxg (x, r) = (proxu (x) , proxv (r))

Pierre Paleo

3.0 Conjugate Gradient

25/25

16 Sepember 2015

Pierre Paleo

3.0 Conjugate Sub-gradient (1)

25/25

16 Sepember 2015

Pierre Paleo

3.0 Conjugate Sub-gradient (2)

25/25

16 Sepember 2015

Pierre Paleo