primal sketch integrating structure and texture ying nian wu ucla department of statistics keck...

51
Primal Sketch tegrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV, 2004; CVIU, 2006)

Post on 15-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Primal SketchIntegrating Structure and Texture

Ying Nian WuUCLA Department of Statistics

Keck MeetingApril 28, 2006

Guo, Zhu, Wu (ICCV, 2003; GMBV, 2004; CVIU, 2006)

Page 2: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

sketchable image

input image

+

sketch graph

synthesized textures

texture regions

synthesized image

=

A Generative Model for Natural Images

Page 3: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Outline

Sparse coding Markov random field Primal sketch model Sketch pursuit algorithm

Page 4: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sparse Coding

})(){(min ,2

, i

miii

mim

m cSBcI

Olshausen and Field (1996)

Page 5: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

inputimage

500 bases

800 bases

matching pursuit

Matching PursuitMallat and Zhang (1993)

Page 6: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Symbolic representationof 300 bases

Reconstructed image

Primak sketch

Page 7: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Markov Property:

MRF model = Gibbs distribution

One example of neighborhood

Markov Random Fields

)))((|)(())(|)(( xIxIpxIxIp

))(exp(1

)( IUZ

Ip

Besag (1974)Geman and Geman (1984)Cross and Jain (1983)

Page 8: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

MRF model & Image ensemble

}h)FI,histogram(:{IΩ(H) kky,x,

Image ensemble Image ensemble (Wu, Zhu & Liu, 2000)(Wu, Zhu & Liu, 2000)

|Ω(H)|1/p(I) Ω(H)I

)}FI,(λexp{)Z(

1λ)F,(I;p ky,x,

ky,x,ktexture

MRF model MRF model (Zhu, Wu & Mumford, 1997)(Zhu, Wu & Mumford, 1997)

Page 9: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Feature statistics: histograms of filter responses (Heeger and Bergen, 1995)

Filtering – convolution

i k

kni,mki,nm,nm, IFFI,J

original image I filter responses Jof the “dy” filter

a set of filters F

Page 10: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Histogram of Filter Responses

Page 11: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Average histogram error

Page 12: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 13: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 14: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

800 bases

50*70 patchA sample of image ensemble with 5*13=65 parameters

Page 15: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

observed image

sampled image from image ensemble

Primak sketch

Page 16: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sparse Coding vs. MRF

MRF models target high complexity patterns.

Sparse Coding models target low complexity patterns.

N

1iii1i

N

1iii BcI Δ;B ε,BcI

constH(p(C))))H(p(I1

const: related to the dictionary

0p*)||KL(qH(q)-H(p*)

p*: fitted MRFq: any distribution

Page 17: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Primal Sketch Model

nsksk DDD

n

i

DxxxBxI1

sk),()()(

Image pixels = Sketchable & Non-sketchable

Sketchable: sparse coding using image primitives

Non-sketchable: feature statistics/Markov random fields

))(|)(( sknsk DIDIp

Integration:• Non-sketchable interpolates sketchable• Non-sketchable recycles failed sketch detections

Page 18: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sketches

Elder and Zucker, 1998

)cos)(sin)((),( 221121 uxuxfxxB ),(sin)(cos)( 2211 lluxux

),(cos)(sin)( 2211 wwuxux

()*()() 0 sgbfaf

Page 19: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sketch Graph

Vertices:1,2,3 – corners4,5,6,7 – end points8,9,10 – junctions, etc

Sketch graph

Page 20: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Image Primitives

a) Geometric b) Photometric

Page 21: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Geometric Photometric sketch image

),...,1,( niBG i

|}|exp{)(4

0d

dd VGp

Sketch Graph Model

Page 22: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sketchs = Gabor clusters

Alignment across spatial and frequency domains

Page 23: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Non-alignment

Pool marginal histograms

Gabor filters

Sketches

Alignment

Sketch Graph

Textures

Integrating structure and texture

Page 24: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Model fitting First: Sketch pursuit aided by Gabors Second: Non-sketchable texturing

Sketchability test

BxNxBxIH

NxIH

),,0()()(:

),0()(:2

1

20

]))()(())([()( 22 xBxIxIBLBx

22/ LLRT

Page 25: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sketch pursuit objective

||)()(4

01d

dd

n

ii VBLGL

)4,3,2,5,1(

Approximated model

sk1

),()()( DxxxBxIn

ii

nsk),()()( DxxxxI

Page 26: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sketch Pursuit Phase I

input image Edge/ridge mapedge/ridge strengthProposals: a set of sketches as candidates.

Select the sketches in the order of likelihood gain. 5ΔL

Page 27: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Sketch Pursuit Phase IIRefinement

Evolve the sketch graph by graph operators.

Initialization Refinement

Page 28: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Graph Operators

operators graph change illustration

G1, G1’ create / remove a stroke

G2, G2’ grow / shrink a stroke

G3, G3’ connect / disconnect vertices

G4, G4’extend one stroke and cross

/ disconnect and combine

G5, G5’extend two strokes and cross

/ disconnect and combine

Page 29: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

operators graph change illustration

G6, G6’combine two stroke

/ break a stroke

G7, G7’combine two parallel strokes

/ split one into two parallel

G8, G8’merge two vertices

/ split a vertex

G9, G9’ create / remove a blob

G10, G10’switch between a stroke(s) and a blob

Page 30: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Graph Editing

Phase I

Phase II

A

B

A B

Page 31: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Phase II Algorithm

1. Randomly choose a local sub-graph (S0)2. Try all 10 pair of graph operators 1~ 5 steps, to

generate a set of new graph candidates (S4,S2,S3)3. Compare all new graph candidates4. Select the one with the largest posterior gain (e.g.

S4), accept the new graph. If no positive gain, no update.

5. Repeat 1~4 until no updateS0

S1 S2 S3

G1

S4

G3

G4

Page 32: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 33: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

synthesized texturestexture regions

K-mean clusteringHistograms in 7x7 window7 filters x 7 bins

Page 34: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Primal Sketch Model Result

input image

reconstructed image

sketch graph

sketchable image

Page 35: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

input image sketch graph

reconstructed image sketchable image

Page 36: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

input image reconstructed imagesketch graph

Page 37: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

input image sketch graphreconstructed image

Page 38: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 39: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 40: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 41: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 42: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 43: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 44: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 45: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Lossy Image Coding

sketchable image

sketch graph

codes for the vertices: 152*2*9 = 2,736 bits

codes for the strokes: 275*2*4.7 = 2, 585 bits

codes for the profiles: 275*(2.4*8+1.4*2) = 6,050 bits

Total codes for structures (18,185 pixels) 11,371 bits = 1,421 bytes

Page 46: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

synthesized textures

texture regions

codes for the region boundaries: 3659*3 = 10,977 bits

codes for the texture histograms: 7*5*13*4.5 = 2,048 bits

Total codes for textures (41,815 pixels) 13,025 bits = 1,628 bytes

Total codes for whole image (72,000 pixels), 3,049 bytes

Page 47: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,
Page 48: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Scaling

Page 49: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Scaling

Page 50: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

Scaling

Wu, Zhu, Bahrami, Li (2006)

Page 51: Primal Sketch Integrating Structure and Texture Ying Nian Wu UCLA Department of Statistics Keck Meeting April 28, 2006 Guo, Zhu, Wu (ICCV, 2003; GMBV,

JPEG Entropy vs Scale

0

0.1

0.2

0.3

0.4

0.5

0.6

1 2 3 4 5 6 7 8

Scale

JPE

G E

ntro

py p

er P

ixel

Scaled Squares

White Noise