locally adaptive regression kernels with (many)...

64
Locally Adaptive Regression Kernels with (many) Applications Joint work with Hiro Takeda , Hae Jong Seo, Xiang Zhu Peyman Milanfar EE Department University of California, Santa Cruz

Upload: others

Post on 07-Apr-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 2: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Outline

• Introduction/Motivation

• Locally Adaptive Regression Kernels 

• Applications

Adaptive Kernel

Regression

Page 3: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

A Modern Paradigm: Measuring Similarity Between…

ImagesPatches

Pixels

Page 4: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 5: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 6: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 7: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 8: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 9: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 10: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Pixel similarity Spatial similarity

=

Sensitive to 1) noise2) variation in illumination

Pixels

Page 11: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Patch similarity Spatial similarity

=

Smoothing effect, more robust, but still quite sensitive 

Patches

Page 12: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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”

Page 13: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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.

Page 14: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

• 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

Page 15: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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.

Page 16: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

What do these weights look like?

Page 17: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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.

Page 18: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

To summarize……

Uses distance x-xi

Classic Kernel: Locally Linear Filter:

Data‐Adaptive Kernel: Locally Non‐Linear Filter:

Uses x-xi and y-yi

Page 19: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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”

Page 20: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

LARK Kernels

Compute

Page 21: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Gradient vector field

Local covariance matrices

“Structure tensor”

Locally Adaptive Regression Kernel: LARK

LARK Kernels

Page 22: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Gradient Covariance Matrix and Local Geometry

Gradient matrix over a local patch:

Page 23: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Image as a Surface Embedded in the Euclidean 3‐space

Arclength on the surface 

Chain rule

Riemannian metric

Regularization term

Page 24: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 25: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Bilateral LARKImage Non‐local Means

Comparisons

Page 26: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Effect of C (covariance matrix)

How to estimate       matters

Naïve estimation of  Accurate estimation of 

VS.

Using regularized (SVD)

Page 27: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 28: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

[*] 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”

Page 29: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Some 2 and 3‐D Signal Processing Applications

• Denoising

• Interpolation

• Super‐resolution

• Deblurring

Page 30: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 31: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Film Grain Reduction (Real Noise)

Noisy image

Page 32: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Film Grain Reduction (Real Noise)

LARK

Page 33: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Film Grain Reduction (Real Noise)

LARK

KSVDBM3D

Page 34: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 35: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Reconstruction from Sparse andIrregular Samples

Randomly delete 85% of pixels Reconstruction

Page 36: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 37: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Implicitly changing N

• Sharpening the LARK Kernel Laplacian operator

“Sharpness”parameter

Page 38: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 39: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 40: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Examples

original image

original image

State‐of‐the‐art Methods

proposed method

Page 41: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Examples

Page 42: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Experimental Results 2Proposed Method

Page 43: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Experimental Results 2Shan’s Method

Page 44: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Application to Enhancing SEM Images

16 low‐voltage SEM images of the same sample

Page 45: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Application to SEM data

Input frame Average frame

Page 46: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Application to SEM data

Input frame Average frame, denoised

Page 47: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Application to SEM data

Input frame Nonlinear registered merged output

Page 48: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Application to SEM data

Input frame Average frame with nonlinear regis.Enhanced

Page 49: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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)

Page 50: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Application to All‐Focus Imaging

• How to merge these images together?

12 frames

Page 51: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 52: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Focus Stacking Examples

• Input sequence

Page 53: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Focus Stacking Examples

• Output 

Page 54: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Focus Stacking Examples

• Output (Photoshop CS4)

Page 55: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Input images (37 frames)

Output (Helicon Focus) 

Output (Ours) 

More Focus Stacking Examples

Page 56: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Focus‐stacking Example

Input images (24 frames) Output (ours)

Page 57: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Focus‐stacking Example

Output

Page 58: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Super‐resolution

MotionEstimation

ImageReconstruction

(Interpolation, Denoising, and Deblurring)

Adaptive Kernel Regression (2D)

Page 59: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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

Page 60: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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)

Page 61: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

3‐D Motion Deblurring

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

Page 62: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Street Car Sequence

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

Page 63: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

Street Car Sequence

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

Page 64: Locally Adaptive Regression Kernels with (many) Applicationsimi.cas.sc.edu/django/site_media/media/events/2010/Milan... · 2012-02-03 · Locally Adaptive Regression Kernels with

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