Real-Time Exemplar-Based Face Sketch Synthesis Pipeline illustration

advertisement
Real-Time Exemplar-Based Face Sketch Synthesis
Pipeline illustration
Yibing Song1
Linchao Bao1
1City
Qingxiong Yang1
Ming-Hsuan Yang2
University of Hong Kong
2University
of California at Merced
Note: containing animations
Our assumption: a database containing photo-sketch pairs
1. photo database
2. sketch database
Aligned
Coarse Sketch Generation
Step 1: KNN search
Test photo
Test photo patch 𝑻𝒑
p
Relative
Relative
Similarly
βˆ†πŸπ’‘
βˆ†π’‘ = [ βˆ†πŸπ’‘
position
position
βˆ†π‘²
𝒑 ]
Training photo dataset
𝑻𝒑
𝑻𝒑
𝑻𝒑
Matched
photo patch π‘°πŸπ‘·
Matched photo patch
π‘°πŸπ‘·
Coarse Sketch Generation
Step 2: Linear Estimation from Photos
Test photo patch 𝑻𝒑
βˆ†πŸπ’‘
π’™πŸπ’‘ βˆ™
βˆ†πŸπ’‘
βˆ†π‘²
𝒑
+π’™πŸπ’‘ βˆ™
Matched
Matched photo patch
π‘°πŸπ‘· photo patch π‘°πŸπ‘·
+𝒙𝑲
𝒑 βˆ™
=
Matched photo patch 𝑰𝑲
𝑷
2. Compute linear mapping function defined by π’™πŸπ’‘ , π’™πŸπ’‘ , β‹― , 𝒙𝑲
𝒑
Coarse Sketch Generation
Step 3: Apply Linear Mapping to Sketches
Test photo
Coarse sketch
Repeat for every pixel
p
βˆ†πŸπ’‘
π’™πŸπ’‘ βˆ™
βˆ†πŸπ’‘
βˆ†π‘²
𝒑
+𝒙𝑲
𝒑 βˆ™
+π’™πŸπ’‘ βˆ™
Matched sketch pixel
Matched
𝑺 𝟏 sketch pixel 𝑺
𝑷+βˆ†π’‘
𝑷+βˆ†πŸπ’‘
=
𝑬𝒑
Estimation on pixel p
Matched sketch pixel 𝑺
𝑷+βˆ†π‘²
𝒑
Denoising: State-of-the-art Image Denoising Algorithms
Coarse sketch
Nonlocal Means (NLM)
q
𝑀(𝑝, π‘Ÿ)
r
p
After NLM
𝑆𝑝𝑁𝐿𝑀 =
πΈπ‘Ÿ + 𝑀(𝑝, π‘ž) πΈπ‘ž
+β‹―
For all pixels in the neighbor of p: Ψ𝑝
Little improvement
Because: coarse sketch image is not natural.
𝑀(𝑝, π‘Ÿ) is not a good similarity measurement
between p and r.
[NLM] A. Buades, B. Coll and J.-M. Morel, A non-local algorithm for image denoising, CVPR 2005.
Motivation – BM3D
BM3D groups correlated patches in the noisy image to create multiple estimations.
How BM3D works
Our idea for sketch denoising: group highly similar sketch estimations.
[BM3D] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian, “Image denoising by sparse 3D transformdomain collaborative filtering,” IEEE Trans. Image Process., vol. 16, no. 8, pp. 2080-2095, August 2007.
Proposed Spatial Sketch Denoising Algorithm (SSD)
Estimations from pixels
in local region Ψ𝑝
Test photo
r
𝑬𝒓𝒑
q
p
βˆ†πŸπ’’ , π’™πŸπ’’
Matched sketch
π’™πŸπ’’ βˆ™
Averaging estimations to
generate output sketch value.
𝑲
βˆ† 𝒒 , 𝒙𝑲
𝒒
βˆ†πŸπ’’ , π’™πŸπ’’
Similarly
𝑺𝒒+βˆ†πŸ +π’™πŸ βˆ™
𝒒
𝒒
𝑺𝒑+βˆ†πŸ
𝒒
𝑺𝒒+βˆ†πŸ
𝒒
𝑺𝒑+βˆ†πŸ
𝒒
Nonlocal Means (NLM):
𝑆𝑝𝑁𝐿𝑀 = 𝑀(𝑝, π‘ž) βˆ™ πΈπ‘ž +𝑀(𝑝, π‘Ÿ) βˆ™ πΈπ‘Ÿ
+β‹―
Proposed SSD:
𝑆𝑝𝑆𝑆𝐷 =
𝒒
1 βˆ™ 𝑬𝒑 +
p
1 βˆ™ 𝑬𝒓𝒑
+β‹―
+𝒙𝑲
𝒒 βˆ™
𝑺=
𝒒+βˆ†π‘²
𝒒
𝑺𝒑+βˆ†π‘²
𝒒
𝒒
𝑬𝒑
Robustness to the region size Ψ𝑝 - the only parameter involved
p
Proposed SSD is robust to Ψ𝑝
Input
5x5 local region
πœ³π’‘ = πŸπŸ“
11x11 local region
πœ³π’‘ = 𝟏𝟐𝟏
17x17 local region
πœ³π’‘ = πŸπŸ–πŸ—
23x23 local region
πœ³π’‘ = πŸ“πŸπŸ—
Note: When 𝛹𝑝 is sufficient large (i.e., 𝛹𝑝 >100), the proposed SSD can effectively
suppress noise while preserving facial details like the tiny eye reflections (see close-ups).
Download