.
Bayesian Blind Deconvolution Ali Mohammad-Djafari Laboratoire des Signaux et Syst`emes, UMR8506 CNRS-SUPELEC-UNIV PARIS SUD 11 SUPELEC, 91192 Gif-sur-Yvette, France http://lss.supelec.free.fr Email:
[email protected] http://djafari.free.fr Seminar at Amir Kabir University (Polytechnique de) Tehran, December 9, 2014 A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 1/20
Signal Deconvolution
g(t) =
Z
f (τ ) h(t − τ ) dτ + ǫ(t)
10
10 f(t)
g(t)
8
8
6
6
4
4
2
2
0
0
−2
−2
−4
−4
−6
−6
−8
−8
−10
−10
0
20
40
60
Forward: Inverse:
80
100
f (t) fb(t)
120
140
160
180
200
0
−→ ←−
20
40
60
80
100
120
140
160
180
200
g(t) = h(t) ∗ f (t) + ǫ(t) g(t)
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 2/20
Image Restoration Forward model: 2D Convolution ZZ g(x, y) = f (x′ , y ′ ) h(x − x′ , y − y ′ ) dx′ dy ′ + ǫ(x, y) ǫ(x, y)
f
f (x, y) ✲ h(x, y)
g
❄ ✎☞ ✲ + ✲g(x, y) ✍✌
Inversion: Deconvolution ? ⇐=
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 3/20
Blind Deconvolution g(t) = h(t) ∗ f (t) + ǫ(t) g(x, y) = h(x, y) ∗ f (x, y) + ǫ(x, y) Convolution: Given f and h compute g Identification: Given f and g estimate h ◮ Deconvolution: Given g and h estimate f ◮ Blind deconvolution: Given g estimate both h and f Discretization: ◮ g = h ∗ f + ǫ −→ g = Hf + ǫ, H huge dimensional Toeplitz or TBT matrice obtained from the elements of the impulse response h(t) or the Point Spread Function (PSF) h(x, y) ◮ g = f ∗ h + ǫ −→ g = F h + ǫ, F huge dimensional Hankel or HBT matrice obtained from the elements of the input signal f (t) or the image f (x, y) ◮ ◮
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 4/20
Identification and Deconvolution: Classical methods Deconvolution g(t) = h(t) ∗ f (t) + ǫ(t)
Identification g(t) = h(t) ∗ f (t) + ǫ(t)
Wiener filtering H ∗ (ω) b f (ω) = Sǫǫ (ω) g(ω) 2
Wiener filtering F ∗ (ω) b h(ω) = Sǫǫ (ω) g(ω) 2
J(f ) = kg − Hf k2 + λf kD f f k2
J(h) = kg − F hk2 + λh kD h hk2
|H(ω)| + S
f f (ω)
Regularization g =Hf +ǫ ′
∇J(f ) = −2H (g − Hf ) +
2λf D ′f Df f
b = [H ′ H + λf D ′ D f ]−1 H ′ g f f Circulante approximation ∗ fb(ω) = |H(ω)|2H+λ(ω) g(ω) |D (ω)|2 f
f
|F (ω)| + S
hh (ω)
Regularization g =F h+ǫ
∇J(h) = −2F ′ (g − F h) + 2λh D ′h Dh h
b = [F ′ F + λh D ′ D h ]−1 F ′ g h h
Circulante approximation ∗ (ω) b h(ω) = |F (ω)|2|F g(ω) +λ |D (ω)|2 h
h
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 5/20
Deconvolution, Identification: Bayesian approach Deconvolution Forward model g = H f + ǫ Likelihood A priori Bayes
Identification g =F h+ǫ
p(g|f ) = N (g|Hf , Σǫ ) p(g|h) = N (g|F h, Σǫ ) p(f ) = N (f |0, Σf ) p(h) = N (h|0, Σh ) p(g |f ) p(f ) p(g |h) p(h) p(f |g) = p(h|g) = p(g ) p(g )
Particular case: Σǫ = σǫ2 I, Σf = σf2 (D ′f D f )−1 , Σh = σh2 (D ′h D h )−1 Deconvolution p(f |g) ∝ p(g|f ) p(f ) ∝ exp [−J(f )] J(f ) = kg − Hf k2 + λf kD f f k2 λf = σǫ2 /σf2
Identification p(h|g) ∝ p(g|h) p(h) ∝ exp [−J(h)] J(h) = kg − F hk2 + λh kDh hk2 λh = σǫ2 /σh2
bf) b, Σ p(f |g) = N (f |f ′ b = [H H + λf D ′ D f ]−1 F ′ g f f b f = [H ′ H + λf D ′ Df ]−1 Σ
b h) b Σ p(h|g) = N (h|h, ′ b = [F F + λh D′ D h ]−1 F ′ g h h b h = [F ′ F + λh D′ D h ]−1 Σ h
f
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 6/20
Blind Deconvolution: Bayesian approach g =Hf +ǫ=F h+ǫ
◮
Joint posterior law: p(f , h|g) ∝ p(g|f , h) p(f ) p(h) ∝ exp [−J(f , h)] J(f , h) = kg − Hf k2 + λf kD f f k2 + λh kD h hk2
◮
◮
Joint MAP: b = arg max b , h) (f (f ,h) {p(f , h|g)} = arg min(f ,h) {J(f , h)}
Alternate optimization: f b (k) = arg max p(f , h(k) |g) = arg min J(f , h(k) ) f f h b (k) = arg max p(f (k) , h|g) = arg min J(f (k) , h) h h
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 7/20
Blind Deconvolution: Variational Bayesian Approximation algorithm ◮
Joint posterior law: p(f , h|g) ∝ p(g|f , h) p(f ) p(h)
◮
Approximation: p(f , h|g) by q(f , h) = q1 (f ) q2 (h)
◮
Criterion of approximation: Kullback-Leiler Z Z q q1 q2 KL(q|p) = q ln = q1 q2 ln p p
KL(q1 q2 |p) =
Z
q1 ln q1 +
Z
q2 ln q2 −
Z
q ln p
= −H(q1 ) − H(q2 ) + h− ln p((f , h|g)iq ◮
When the expression of q1 and q2 are obtained, use them.
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 8/20
Variational Bayesian Approximation algorithm ◮
Kullback-Leibler criterion Z Z Z KL(q1 q2 |p) = q1 ln q1 + q2 ln q2 + q ln p = −H(q1 ) − H(q2 ) + h− ln p((f , h|g)iq
◮
Free energy F(q1 q2 ) = − hln p((f , h|g)iq1 q2
◮
Equivalence between optimization of KL(q1 q2 |p) and F(q1 q2 )
◮
Alternate optimization: qb1 = arg min {KL(q1 q2 |p)} = arg min {F(q1 q2 )} q1
q1
qb2 = arg min {KL(q1 q2 |p)} = arg min {F(q1 q2 )} q2
q2
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 9/20
Summary of Bayesian methods for Blind Deconvolution
p(f , h|g) =
◮
◮
p(g|f , h) p(f ) p(h) p(g)
b , h) b = arg max JMAP: (f (f ,h) {p(f , h|g)}
f b (k+1) = arg max p(f , h(k) |g) f h b (k+1) = arg max p(f (k) , h|g) h
VBA: Approximation: p(f , h|g) by q(f , h) = q1 (f ) q2 (h) qb1 (f ) = arg minq1 {KL(q1 q2 |p)} = arg minq1 {F(q1 q2 )} qb2 (h) = arg minq2 {KL(q1 q2 |p)} = arg minq2 {F(q1 q2 )}
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 10/20
Summary of Bayesian methods for Blind Deconvolution Alternate optimization for JMAP b b (0) → h→ h ↑ b h←
b = arg max p(f , h(k) |g) f f b = arg max p(f (k) , h|g) h h
Alternate optimization for VBA
(0)
q2 (h) → q2 (h)→ ↑ b h ← qb2 (h)←
qb1 = arg minq2 {KL(q1 qb2 |p)}
qb2 = arg minq2 {KL(b q1 q2 |p)}
b →f
↓ b ←f
b →b q1 (f ) → h ↓
←
qb1 (f )
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 11/20
JMAP and VBA with Gaussian priors JMAP: Initialization: h(0) = h0 , H = Convmtx(h(0) ) Iterations: f (k) = (H ′ H + λf I)−1 H ′ g F = Convmtx(f (k−1) ) h(k) = (F ′ F + λh C ′h C h )−1 F ′ g H = Convmtx(h(k−1) ) VBA: Initialization:h(0) = h0 , H = Convmtx(h(0) ), D f = I, D h = I Iterations: f (k) = (H ′ H + λf I + vǫ D ′f Df )−1 H ′ g Σf = vǫ (H ′ H + λf I + vǫ D′h D h )−1 F = Convmtx(f (k−1) ) Tr {HΣf H ′ } = kD ′h f k22 h(k) = (F ′ F + λh C ′h C h + vǫ D ′h D h )−1 F ′ g Σh = vǫ (F ′ F + λh C ′h C h + D′h D h )−1 H = Convmtx(h(k−1) ) Tr {F Σh F ′ } = kD ′f f k22 A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 12/20
JMAP and VBA with Gaussian priors JMAP:
b (0) → h→ b h ↑
b h← (0)
VBA:
b b h h (0) ⇒ b ⇒ Σh bh Σ ⇑
H = Convmtx(h) b = (H ′ H + λf I)−1 H ′ g f
b →f
F = Convmtx(f ) b = (F ′ F + λh C ′ C h )−1 F ′ g h h
b ←f
b H = Convmtx(h) ′ Tr {F Σh F } = kD f f k22 b f = vǫ (H ′ H + λf I + D′ Df )−1 Σ f b = (H ′ H + λf I + D′ D f )−1 H ′ g f f
↓
b f ⇒b Σf ⇓
F = Convmtx(f ) b b Tr {HΣf H ′ } = kD h hk22 h f ⇐ ⇐ b = (F ′ F + λh C ′ C h + D ′ D h )−1 F ′ g bh bf h Σ Σ h h ′ ′ ′ −1 b h = vǫ (H H + λh C C h + D D h ) Σ h h
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 13/20
Student-t prior ◮
Sparsity enforcing: Heavy tailed priors: Cauchy and Student-t: Y T (f j |ν, vf ) p(f ) = j
Infinite scaled mixture representation: Z ∞ N (fj |0, zj−1 ) G(zj |ν/2, ν/2) dzj T (fj |ν, vf ) =
(1)
0
◮
Hierarchical model: p(f |z) p(z) Y p(f |z) = N (f j |0, z −1 j vf ), j
◮
p(z) =
Y
G(z j |α, β)
j
Joint posterior: p(h, f , z|g) ∝ p(g|h, f ) p(f |z) p(z) ◮ ◮
b f b, z b) = arg max(h,f ,z ) {p(h, f , z|g)} JMAP: (h, VBA: Approximate p(h, f , z|g) by q1 (h) q2 (f ) q3 (z)
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 14/20
JMAP and VBA with a Student-t prior ◮
Because we only changed p(f ) by p(f |z) p(z) where both are separable, the only changes are: ◮
replace f (k) = (H ′ H + λf I)−1 H ′ g
◮
by: b (k) )−1 H ′ g f (k) = (H ′ H + λf Z h i b (k) = diag zb(k) , zb(k) = βbj Z j
j
α bj
with
JM AP 1 2 α b = α + j 2 kf k and b βj = β + 21 + kg − h ∗ f k2
V BA 1 < kf k2 > α b = α + j 2 and b βj = β + 21 + < kg − h ∗ f k2 >
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 15/20
Comparison between JMAP and VBA Alternate optimization for JMAP b b (0) h h ⇒ ⇒ (0) b z b z ⇑
b z ] , H = Convmtx(h) Z = diag [b ′ ′ −1 b f = (H H + λf Z) H g α bj = α + βbj = β +
1 2 2 kf k 1 2 + kg
− h ∗ f k2 b b h βj ⇐ zb(k) j = α bj z F = Convmtx(f ) b = (F ′ F + λh C ′ C h )−1 F ′ g h h
b →f ↓
b ←f
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 16/20
Comparison between JMAP and VBA VBA b (0) b h h (0) ⇒ Σ ⇒ h Σh (0) b z b z ⇑
b z ] , H = Convmtx(h) Z = diag [b Tr {F Σh F ′ } = kD h f k2 b f = vǫ (H ′ H + λf Z + D ′ D f )−1 Σ f b = (H ′ H + λf Z + D ′ D f )−1 H ′ g f f α bj = α + 21 < kf k2 > βbj = β + 21 + < kg − h ∗ f k2 >
(k) βb b h zbj = αbjj b h ⇐ F = Convmtx(f ) Σ b z Tr {HΣf H ′ } = kD h hk2 b = (F ′ F + λh C ′ C h + D ′ D h )−1 F ′ g h h h b h = vǫ (H ′ H + λh C ′ C h )−1 Σ h
b f ⇒ b Σf ⇓
b f ⇐b Σf
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 17/20
Conclusions ◮
In this paper, we considered the Blind Image Deconvolution problem in a Bayesian framework.
◮
We compared two main algorithms: JMAP and VBA giving some detailed insight for each of them for two cases: ◮ ◮
◮
◮
Gaussian prior for both IRF h and the input signal f and Gaussian prior for the IRF but a Student-t prior for the input signals or images to enhance or to account for possible sparsity structure of the input.
JMAP: esay and not very costly but uncertainties are not accounted for. b and h b are VBA: is more costly but both uncertainties of f
b accounted for, in each iteration, for computing respectively, h b. and f A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 18/20
Simulated results f
h
g
original f
PSF h
Blurred & noisy g
fh
h
fh
simple deconv fb
b Estimated PSF h
Estimated fb
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 19/20
THANKS
Questions and Remarks
A. Mohammad-Djafari, Bayesian Blind Deconvolution, Ami Kabir University, Math. & Computer Science Dept., December 9, 2014, 20/20