Lecture1 Refresher
Lecture1 Refresher
Ender Konukoglu
ETH Zürich
Outline
Basic notation
Probabilistic modeling
Optimization, cost function and regularization
Linear basis models and function parameterizations
Spatial transformations
Derivative approximations
Medical image analysis: Refresher
Basic notation
Basic notation
Continuous version
A volumetric grayscale image is a function
I : Ω → R, Ω ⊂ R3 is the image domain
I (x) is the intensity at point x ∈ Ω, x = [x1 , x2 , x3 ]
Medical image analysis: Refresher
Basic notation
Basic notation
Continuous version
A volumetric grayscale image is a function
I : Ω → R, Ω ⊂ R3 is the image domain
I (x) is the intensity at point x ∈ Ω, x = [x1 , x2 , x3 ]
Discrete version
Ω ⊂ Z3 is the discrete image domain, i.e. Cartesian grid
I (x) is the intensity at x ∈ Ω, x = [i, j, k]
Medical image analysis: Refresher
Basic notation
Basic notation
Continuous version
A volumetric grayscale image is a function
I : Ω → R, Ω ⊂ R3 is the image domain
I (x) is the intensity at point x ∈ Ω, x = [x1 , x2 , x3 ]
Discrete version
Ω ⊂ Z3 is the discrete image domain, i.e. Cartesian grid
I (x) is the intensity at x ∈ Ω, x = [i, j, k]
For multiparametric images, such as diffusion-weighted MRI, spectroscopy or
adding multiple modalities together
I : Ω → RN
I (x) is the vector of intensities at x
Medical image analysis: Refresher
Basic notation
Basic notation
Continuous version
A volumetric grayscale image is a function
I : Ω → R, Ω ⊂ R3 is the image domain
I (x) is the intensity at point x ∈ Ω, x = [x1 , x2 , x3 ]
Discrete version
Ω ⊂ Z3 is the discrete image domain, i.e. Cartesian grid
I (x) is the intensity at x ∈ Ω, x = [i, j, k]
For multiparametric images, such as diffusion-weighted MRI, spectroscopy or
adding multiple modalities together
I : Ω → RN
I (x) is the vector of intensities at x
For dynamic images with temporal information
I : ΩxR+ → RN
I (x, t) is the intensity at point x and time t
Medical image analysis: Refresher
Probabilistic modeling
Outline
Basic notation
Probabilistic modeling
PDF, CDF, PMF
Histogram of an image
Conditionals and the Bayes’ Rule
Posterior distribution, MAP and MLE
Optimization, cost function and regularization
Linear basis models and function parameterizations
Spatial transformations
Derivative approximations
Medical image analysis: Refresher
Probabilistic modeling
0.35
0.8
0.30
0.25 0.6
0.20
pdf
cdf
0.15 0.4
0.10
0.2
0.05
0.00 0.0
6 4 2 0 2 4 6 6 4 2 0 2 4 6
I I
Medical image analysis: Refresher
Probabilistic modeling
0.35
0.8
0.30
0.25 0.6
0.20
pdf
cdf
0.15 0.4
0.10
0.2
0.05
0.00 0.0
6 4 2 0 2 4 6 6 4 2 0 2 4 6
I I
Histogram of an image
0.030 0.10
0.09
0.025
0.08
0.020
Cumulative Histogram
0.07
Histogram
0.015 0.06
0.05
0.010
0.04
0.005
0.03
0.000 0.02
0 50 100 150 200 250 300 0 50 100 150 200 250 300
I I
p(l|i)p(i) p(i|l)p(l)
p(i|l) = and p(l|i) =
p(l) p(i)
Medical image analysis: Refresher
Probabilistic modeling
p(l|i)p(i) p(i|l)p(l)
p(i|l) = and p(l|i) =
p(l) p(i)
In a large variety of problems one of them is observed and the other not. Assume
i is observed in that case
p(i|l): likelihood
p(l): prior distribution
p(l|i): posterior distribution
Medical image analysis: Refresher
Probabilistic modeling
p(i|l)p(l)
p(l|i) =
p(i)
Medical image analysis: Refresher
Probabilistic modeling
p(i|l)p(l)
p(l|i) =
p(i)
p(i) requires summing over all l (or integration over all l if continuous), which
can be infeasible. The alternative is to determine the l that maximizes the
posterior, i.e. Maximum-A-Posteriori (MAP) estimate
argl max p(l|i) = argl max p(i|l)p(l) = argl max log p(i|l) + log p(l)
Medical image analysis: Refresher
Probabilistic modeling
p(i|l)p(l)
p(l|i) =
p(i)
p(i) requires summing over all l (or integration over all l if continuous), which
can be infeasible. The alternative is to determine the l that maximizes the
posterior, i.e. Maximum-A-Posteriori (MAP) estimate
argl max p(l|i) = argl max p(i|l)p(l) = argl max log p(i|l) + log p(l)
Posterior distribution and MAP estimate requires the prior. When such a prior
does not exist the alternative is to determine Maximum Likelihood Estimate
(MLE)
p(i|l)p(l)
p(l|i) =
p(i)
p(i) requires summing over all l (or integration over all l if continuous), which
can be infeasible. The alternative is to determine the l that maximizes the
posterior, i.e. Maximum-A-Posteriori (MAP) estimate
argl max p(l|i) = argl max p(i|l)p(l) = argl max log p(i|l) + log p(l)
Posterior distribution and MAP estimate requires the prior. When such a prior
does not exist the alternative is to determine Maximum Likelihood Estimate
(MLE)
MLE is the same as MAP when the prior is uniform, i.e. p(l) = c, ∀l
Medical image analysis: Refresher
Cost function, regularization and optimization
Outline
Basic notation
Probabilistic modeling
Optimization, cost function and regularization
Data term and regularization
Optimization
Calculus of variation
Linear basis models and function parameterizations
Spatial transformations
Derivative approximations
Medical image analysis: Refresher
Cost function, regularization and optimization
Examples:
Medical image analysis: Refresher
Cost function, regularization and optimization
Examples:
Image denoising: Assume I is a noisy image and we want to retrieve a denoised J
Z Z
2 2
argJ min ∥I − J∥2 + λ∥∇J(x)∥1 = argJ min (I (x) − J(x)) dx + λ |∇J(x)|dx
Medical image analysis: Refresher
Cost function, regularization and optimization
Examples:
Image denoising: Assume I is a noisy image and we want to retrieve a denoised J
Z Z
2 2
argJ min ∥I − J∥2 + λ∥∇J(x)∥1 = argJ min (I (x) − J(x)) dx + λ |∇J(x)|dx
Examples:
Image denoising: Assume I is a noisy image and we want to retrieve a denoised J
Z Z
2 2
argJ min ∥I − J∥2 + λ∥∇J(x)∥1 = argJ min (I (x) − J(x)) dx + λ |∇J(x)|dx
Optimization
Optimization
Optimization
Optimization
Optimization
Optimization
Calculus of Variation
Calculus of Variation
Calculus of Variation
Calculus of Variation
Calculus of Variation
Left handside is called functional derivative δL/δθ. Often used in gradient ascent.
Medical image analysis: Refresher
Cost function, regularization and optimization
Calculus of Variation
Left handside is called functional derivative δL/δθ. Often used in gradient ascent.
Reference: The Calculus of Variations, Bruce van Brunt, Springer, 2004.
Medical image analysis: Refresher
Linear basis models and function parameterizations
Outline
Basic notation
Probabilistic modeling
Optimization, cost function and regularization
Linear basis models and function parameterizations
Basics
Function parameterizations with linear basis models
Kernel-based parameterization
Spatial transformations
Derivative approximations
Medical image analysis: Refresher
Linear basis models and function parameterizations
⃗ b 1 + a2 ⃗
v = a1 ⃗ b 2 + · · · + ad ⃗
bd = B⃗
a
⃗
bi are the basis functions and ai coefficients.
if ⃗
bi are orthogonal, i.e. ⃗
biT ⃗ vT ⃗
bj = 0, ∀i ̸= j then ai = ⃗ bi /∥⃗
bi ∥2 .
if not then Ordinary Least Square (OLS) regression must be performed
−1
arg⃗a min ∥⃗ a∥22 = BT B
v − B⃗ BT ⃗
v
For known ⃗
bi , ⃗
a can be a parameterization for ⃗
v
Medical image analysis: Refresher
Linear basis models and function parameterizations
Global parameterizations
d
X
f (x) = ai bi (x)
i
Kernel-based parameterization
d
X
f (x) = ai K (x, xi )
i=1
Outline
Basic notation
Probabilistic modeling
Optimization, cost function and regularization
Linear basis models and function parameterizations
Spatial transformations
Linear transformations
Non-linear transformations
Transformation related identities
Derivative approximations
Medical image analysis: Refresher
Spatial transformations
Linear transformations
T (⃗
x ) = T⃗
x,
Medical image analysis: Refresher
Spatial transformations
Linear transformations
T (⃗
x ) = T⃗
x,
Linear transformations
T (⃗
x ) = T⃗
x,
Linear transformations
T (⃗
x ) = T⃗
x,
Linear transformations
T (⃗
x ) = T⃗
x,
Non-linear transformations
x) = ⃗
T (⃗ x+ ⃗(⃗
u x)
|{z}
displacement field
x ) = Tn ◦ Tn−1 ◦ · · · ◦ T1 (⃗
T (⃗ x)
T (⃗
x ) = [T1 (⃗
x ), T2 (⃗ x )]T
x ), T3 (⃗
Outline
Basic notation
Probabilistic modeling
Optimization, cost function and regularization
Linear basis models and function parameterizations
Spatial transformations
Derivative approximations
Medical image analysis: Refresher
Spatial transformations
Derivative approximations