Locally Adaptive Regression Kernels with (many)...

Preview:

Citation preview

Locally Adaptive Regression Kernels with (many) Applications

Joint work with Hiro Takeda, Hae Jong Seo, Xiang Zhu

Peyman MilanfarEE Department

University of California, Santa Cruz

Outline

• Introduction/Motivation

• Locally Adaptive Regression Kernels 

• Applications

Adaptive Kernel

Regression

A Modern Paradigm: Measuring Similarity Between…

ImagesPatches

Pixels

At the smallest scale…. 

• “Similarity” between pixels

H. Takeda, S. Farsiu, and P. Milanfar, “Kernel Regression for Image Processing and Reconstruction”, IEEE Trans. on Image Processing, vol. 16, no. 2, pp. 349‐366, February 2007

A little bigger scale……

• “Similarity” between patches – Non‐Local Means (NLM) denoising– Block Matching (BM3d) denoising

• A. Buades, B. Coll, J.M Morel, "A review of image denoising algorithms, with a new one" , SIAM Multiscale Modeling and Simulation, Vol 4 (2), pp: 490‐530, 2005 (NLM)

• K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian, “Image denoising by sparse 3D transform‐domain collaborative filtering,” IEEE Trans. Image Proc., vol. 16, no. 8, pp. 2080‐2095, August 2007 (BM3d)

BM3d

A little bigger scale……

• “Similarity” between patches (e.g. Visual Saliency)

H.J. Seo and P. Milanfar, “Static and Space‐time Visual Saliency Detection by Self‐Resemblance”, The Journal of Vision 9 (12):15, 1‐27, http://journalofvision.org/9/12/15/, doi:10.1167/9.12.15

At the everyday scale….. 

• “Similarity” between images

• H.J. Seo and P. Milanfar, “Training‐free, Generic Object Detection using Locally Adaptive RegressionKernels”, Accepted for publication in IEEE Trans. on Pattern Analysis and Machine Intelligence• H.J. Seo and P. Milanfar, “Action Recognition from One Example”, Submitted to IEEE Trans. on Pattern Analysis and Machine Intelligence

Defining a point‐wise measure

• To measure the similarity of two pixels, consider– Spatial distance

– Gray‐level distance

Spatial Δ

Gra

y-le

vel Δ

x

y

Simplest measures

• Basic ways to incorporate the two Δs:– Bilateral Kernel [Tomasi, Manduchi, ‘98] (pointwise)– Non‐Local Means Kernel [Buades, et al. ‘05] (patchwise)

Spatial Δ

Gra

y-le

velΔ

x

y “Euclidean” distance

Bilateral Kernels (BL) [Tomasi et al. ‘98]

Pixel similarity Spatial similarity

=

Sensitive to 1) noise2) variation in illumination

Pixels

Non‐local Means (NLM)  [Buades et al. ‘05]

Patch similarity Spatial similarity

=

Smoothing effect, more robust, but still quite sensitive 

Patches

Defining a measure

• More effective ways to combine the two Δs:– LARK Kernel [Takeda, et al. ‘07]

– Beltrami Kernel [Sochen, et al.‘98]

Spatial Δ

Gra

y-le

velΔ

x

y “Signal-induced” distance“Riemannian Metric”

A digression to Non‐parametricKernel Regression

• The data fitting problem

Given samples

The regression function

Zero-mean, i.i.d noise (No other assump.)

The number of samplesThe sampling position

• The particular form of may remain unspecified for now.

• The data model

• Local representation (N‐term Taylor expansion)

• Note– With a polynomial basis, we only need to estimate the first unknown,    

– Other localized representations are also possible, and may be advantageous.

Locality in Kernel Regression

Unknowns

Optimization Problem

• We have a local representation with respect to each sample:

• OptimizationN+1 terms

This term give the estimated

pixel value z(x).

The regression order

The choice of the kernel function is

open, e.g. Gaussian.

What do these weights look like?

Locally Linear/Nonlinear Estimators

• The optimization yields a point‐wise linear (but perhaps space‐varying) estimator:

The weighted linear combinations of the

given data

Normalized version of K

Kernelfunction

The smoothingparameter

The regressionorder

• By choosing a data‐adaptive kernel (BL,NLM,LARK), the filters become nonlinear.

To summarize……

Uses distance x-xi

Classic Kernel: Locally Linear Filter:

Data‐Adaptive Kernel: Locally Non‐Linear Filter:

Uses x-xi and y-yi

Recall…

• More effective ways to combine the two Δs:– LARK Kernel [Takeda, et al. ‘07]

– Beltrami Kernel [Sochen, et al.‘98]

Spatial Δ

Gra

y-le

velΔ

x

y “Signal-induced” distance“Riemannian Metric”

LARK Kernels

Compute

Gradient vector field

Local covariance matrices

“Structure tensor”

Locally Adaptive Regression Kernel: LARK

LARK Kernels

Gradient Covariance Matrix and Local Geometry

Gradient matrix over a local patch:

Image as a Surface Embedded in the Euclidean 3‐space

Arclength on the surface 

Chain rule

Riemannian metric

Regularization term

Measure the similarity of pixels using the metricimplied by the local structure of the image

H. J. Seo, and P. Milanfar, "Training‐free, Generic Object Detection using Locally Adaptive Regression Kernels", Accepted in Trans. on Pattern Analysis and Machine Intelligence

(Dense) LARK Kernels as Visual Descriptors

Bilateral LARKImage Non‐local Means

Comparisons

Effect of C (covariance matrix)

How to estimate       matters

Naïve estimation of  Accurate estimation of 

VS.

Using regularized (SVD)

1

2

3

1

2

3

Original

image

Brightness

change

Contrast

change

WGN

sigma = 10

1

2

3

1

2

3

1

2

3

Robustness of LARK Descriptors

[*] H. Takeda, S. Farsiu, P. Milanfar, “Kernel Regression for Image Processing and Reconstruction”,IEEE Transactions on Image Processing, Vol. 16, No. 2, pp. 349‐366, February 2007

A Variant Better‐suited for Restoration

LARK LSK [*]

=

Measures “edginess”

Some 2 and 3‐D Signal Processing Applications

• Denoising

• Interpolation

• Super‐resolution

• Deblurring

Gaussian Noise Removal

LARK

RMSE=6.63

BM3DFoi, et al.

(2007)

RMSE=6.35

State of Artfor Gaussian

Noise

Noisy image, RMSE=24.87

KSVDElad, et al.

(2007)

RMSE= 6.89

Film Grain Reduction (Real Noise)

Noisy image

Film Grain Reduction (Real Noise)

LARK

Film Grain Reduction (Real Noise)

LARK

KSVDBM3D

Adaptive Kernels for Interpolation

• What about missing pixels?– Local metric (covariance) is undefined!

– Using a “pilot” estimate, fill the missing pixels:

??

?

?

?

?

?

?

?

??

??

?

?

?

Adaptive kernelregression

Iteration!

Kernelweights

Reconstruction from Sparse andIrregular Samples

Randomly delete 85% of pixels Reconstruction

Effect of Regression “Order”

• The order regression N trades‐off bias/variance (blur/noise).

N+1 terms

• So far, we have kept N fixed. • Ideally, 

– when treating edge areas: want ↑ N– when treating flat areas: want ↓ N

Implicitly changing N

• Sharpening the LARK Kernel Laplacian operator

“Sharpness”parameter

Automatically setting the local sharpness

• Local Measure of Sharpness: 

X. Zhu and P. Milanfar, “Automatic Parameter Selection for Denoising Algorithms Using a No‐Reference Measure of Image Content”, to appear in IEEE Trans. Image Processing

LARK‐based Simultaneous Sharpening/Deblurring/Denoising

• Net effect: – aggressive denoising in “flat” areas– Selective denoising and sharpening in “edgy” areas 

LARK‐basedfilter

Locally adaptive denoise/deblur filters

Examples

original image

original image

State‐of‐the‐art Methods

proposed method

Examples

Experimental Results 2Proposed Method

Experimental Results 2Shan’s Method

Application to Enhancing SEM Images

16 low‐voltage SEM images of the same sample

Application to SEM data

Input frame Average frame

Application to SEM data

Input frame Average frame, denoised

Application to SEM data

Input frame Nonlinear registered merged output

Application to SEM data

Input frame Average frame with nonlinear regis.Enhanced

Application to All‐Focus Imaging

• Most imaging systems have limited depth of field

• How to get around this?– Make aperture smaller 

– Acquire multiple images, varying the focal length (focus stacking)

Application to All‐Focus Imaging

• How to merge these images together?

12 frames

Fusing images using the local sharpness measure

• The combines image will have the “best” part of each of the frames as given by 

The local measure of sharpness given by the singular values of: 

Sharp Region Detection

Locally Adaptive

Image Fusion

Motion Compensation

Input sequence

All‐focusOutput

Focus Stacking Examples

• Input sequence

Focus Stacking Examples

• Output 

Focus Stacking Examples

• Output (Photoshop CS4)

From: http://www.heliconsoft.com/focus_samples.html

Input images (37 frames)

Output (Helicon Focus) 

Output (Ours) 

More Focus Stacking Examples

Focus‐stacking Example

Input images (24 frames) Output (ours)

Focus‐stacking Example

Output

Super‐resolution

MotionEstimation

ImageReconstruction

(Interpolation, Denoising, and Deblurring)

Adaptive Kernel Regression (2D)

1

2

34

5

1

2

3

4

5

Space Space ––Time DescriptorsTime Descriptors

• Setup is similar to 2‐D, but…..

• Samples from nearby frames 

• Covariance matrix is now 3x3 – Contains implicit motion information

• Space‐time processing

Spatial gradients

Temporalgradients

Super‐resolution withoutmotion estimation

Adaptive Kernel Regression (3D)

Original (QCIF, 144 x 176, 12 frames)

x3 in space, x2 in timeUpscaled video

(432 x 528, 24 frames)

3‐D Motion Deblurring

The input frame at time t = 2 The deblurred frame at t = 2

Street Car Sequence

The input frame at time t = 3 The deblurred frame at t = 3

Street Car Sequence

The input frame at time t = 4 The deblurred frame at t = 4

LARK Kernels are very effective descriptors

The approach is simple.

Performance competitive or exceeding state‐of‐the‐art in

Denoising/Deblurring/Super‐resolution (without explicit priors)

Conclusions & Future Work

Recommended