statistical models of appearance for computer vision t.f. cootes and c. j. taylor july 10, 2000

68
Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Upload: austin-newton

Post on 26-Dec-2015

222 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Statistical Models of Appearance for Computer

Vision

T.F. Cootes and C. J. TaylorJuly 10, 2000

Page 2: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Computer Vision Aim

Image understanding Models

Challenge Deformable objects

Page 3: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Deformable Models

Characteristics

General Specific

Page 4: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Modeling Approaches Card Board Model Stick Figure Model Surface Based Volumetric Superquadrics Statistical Approach

Page 5: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Why Statistical Approach ? Widely applicable Expert knowledge captured in the

system in the annotation of training examples

Compact representation n-D space modeling Few prior assumptions

Page 6: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Topics

Statistical models of shape

Statistical models of appearance

Page 7: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Subsections

Building statistical model

Using these models to interpret new images

Page 8: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Statistical Shape Models

Page 9: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Shape Invariance under certain transforms eg: in 2-3 dimension – translation,

rotation, scaling

Represented by a set of n points, in d dimensions by a nd element vector

s training examples, s such vectors

Page 10: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Suitable Landmarks Easy to detect

2-D - corners on the boundary Consistent over images Points b/w well defined landmarks

Page 11: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Aligning the Training Set Procrustes Analysis

D = |xi – X|2 is minimized

Constraints on mean Center Scale Orientation

Page 12: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Alignment : Iterative Approach

1. Translate training set to origin2. Let x0 be the initial estimate of

mean 3. “Align” all shapes with mean4. Re-estimate mean to be X5. “Align” new mean w.r.t. previous

mean and scale s.t. |X| = 16. REPEAT starting from 3

Page 13: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

What is “Align” Operations allowed

Center -> scale (|x| =1) -> rotation Center -> (scale + rotation) Center -> (scale + rotation) ->

projection onto tangent space of the mean

Page 14: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Tangent Space

All vectors x s.t. (xt –x).xt = 0 => x.xt = 1

Method :Scale x by 1/(x.X)

Page 15: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000
Page 16: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Modelling Shape Variation

Advantages Generate new examples Examine new shapes (plausibility)

Form x = M(b), b is vector of model

parameters

Page 17: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

PCA

1. Compute the mean of the dataX = (xi)/s

2. Compute the covariance of the data,

S = ((xi – X)(xi – X)T)/(s-1)

3. Compute the eigenvectors, i and corresponding eigen values i of S

Page 18: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000
Page 19: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Approximation using PCA

If contains t eigenvectors corresponding to the largest eigenvalue,

x X + bwhere

= (1| 2|..| t)

and b is t dimensional vector given by b = T(x-X)

Page 20: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Choice of Number of Modes t Proportion of variance exhibited

i=1ti / i > th

Accuracy to approximate training examples

Miss-one-out manner

Page 21: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Uses of PCA

Principal Components Analysis (PCA) exploits the redundancy in multivariate data, enabling us to:

Pick out patterns (relationships) in the variables

Reduce the dimensionality of our data set without a significant loss of information

Page 22: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Generating Plausible Shapes

Assumption : bi are independent and gaussian

Options Hard limits on independent b Constrain b in a hyperellipsoid

Page 23: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Drawbacks Inadequate for non-linear shape

variations Rotating parts of objects View point change Other special cases

Eg : Only 2 valid positions (x = f(b) fails)

Only variations observed in the training set are represented

Page 24: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Non-Linear Models of PDF

Polar co-ordinates (Heap and Hogg)

Mixture of gaussiansDrawbacks :

Figuring out no. of gaussians to be used Finding nearest plausible shape

Page 25: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Fitting a Model to New Points

x = TXt,Yt,s,(X+b)

Aim : Minimize |Y-x|2

Initialize shape parameter, b, to 0 Generate model instance x = X + b Find the pose parameters Xt,Yt,s,

which best map x to Y

Page 26: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Invert the pose parameters and use to project Y to the model co-ordinate frame :

y = T-1 Xt,Yt,s,(Y)

Project y into the tangent plane to X by scaling by 1/(y.X)

Update the model parameter to match yb = T(y-X)

REPEAT

Page 27: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Estimating p(shape) dx = x – X Best approximation of dx be b Residual error r = dx - b p(x) = p(r).p(b) logp(r) = -0.5|r|2/σr

2 + const logp(b) = -0.5bi

2/i + const

Page 28: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Relaxing Shape Model Artificially add extra variations

Finite Element Method (M & K) Perturbing the covariance matrix

Combining statistical and FEM modes Decrease the allowed vibration modes

as the number of examples increases

Page 29: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Statistical Appearance Models

Page 30: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Appearance

Shape

Texture Pattern of intensities

Page 31: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Shape Normalization Warp each image to match control

points with the mean image (triangulation algorithm)

Advantages Remove spurious texture variations

due to shape differences

Page 32: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Intensity Normatization

g = (gim - 1)/

where = gim.G

= (gim.1)/n

Page 33: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

PCA

Model : g = G + Pgbg

G = mean of the normalized dataPg = set of the orthogonal modes of

variationbg = set of gray level paramemters

gim = Tu(G + Pgbg)

Page 34: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Combined Appearance Model Shape bs Texture bg

Correlation b/w the two b = (Wsbs bg)T

= (WsPsT(x-X) Pg

T(g-G))T

Page 35: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Applying PCA to b

b = Qc

x = X + PsWs-1Qsc, g = G +

PgQgc

whereQ = (Qs Qg)T

Page 36: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Choice of Ws

Displace each element of bs from its optimum value and observe change in g

Ws = rI where r2 is the ratio of the total intensity variation to the total shape variation

Insensitivity to Ws

Page 37: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Example : Facial AM

Page 38: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Approximating a New Image Obtain bs and bg

Obtain b Obtain c Apply

x = X + PsWs-1Qsc, g = G + PgQgc

Inverting gray level normalization Applying pose to the points Projecting the gray level vector to the image

Page 39: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Fitting a Model to New Points

x = TXt,Yt,s,(X+b)

Aim : Minimize |Y-x|2

Initialize shape parameter, b, to 0 Generate model instance x = X + b Find the pose parameters Xt,Yt,s,

which best map x to Y

Page 40: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Invert the pose parameters and use to project Y to the model co-ordinate frame :

y = T-1 Xt,Yt,s,(Y)

Project y into the tangent plane to X by scaling by 1/(y.X)

Update the model parameter to match yb = T(y-X)

REPEAT

Page 41: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Example

Page 42: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Active Shape Models

Page 43: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Problem statement

Given a rough starting approximation, how do we fit an instance of a model to the image

Page 44: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Iterative Approach Examine a region of the image

around each point Xi to find the best nearby match for the point Xi’

Update the parameters (Xt, Yt, s, , b) to best fit the new found points X

REPEAT

Page 45: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

In Practice

Page 46: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Modeling Local Structure Sample the derivative along a profile, k

pixels on either side of a model point, to get a vector gi of the 2k+1 points

Normalize Repeat for each training image for

same model point to get {gi} Estimate mean G and covariance Sg

f(gs) = (gs-G)TSg-1(gs-G)

Page 47: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Using Local Structure Model Sample a profile m pixels either

side of the current point (m>k) Test quality of fit at 2(m-k)+1

positions Chose the one which gives the

best match

Page 48: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Multi-Resolution ASM

Page 49: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Advantages

Speed

Less likely to get stuck on the wrong image structure

Page 50: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Complete Algorithm Set L = Lmax

For L = Lmax:0 Compute model point position in the

image at level L Evaluate fit at ns points along the profile Update pose and shape parameters to

fit the model to new points Return unless more than pclose points

satisfy the required criterion

Page 51: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Paramemters Model Parameters

n t k

Search Parameters Lmax

ns

Nmax

pclose

Page 52: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Examples of Search

Page 53: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Example (failure)

Page 54: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Active Appearance Models

Page 55: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Background Bajcsy and Kovacic : Volume model

that deforms elastically Christensen et al : Viscous flow

model Turk and Pentland : ‘eigenfaces’ Poggio : New views from a set of

example views, fitting by stochastic optimization procedure

Page 56: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Overview of AAM Search I = Ii – Im Minimize = | I|2 by varying c

Note : I encodes information about c

Page 57: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Learning to correct cModel : c = A I

Multivariate regression on a sample of known model displacements, c, and the corresponding I

c = Rc I

Page 58: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

In reality Linear relation holds within 4 pixels As long as prediction has the same

sign as actual error, and not much over-prediction, it converges

Extend range by building multi-resolution model

Page 59: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Iterative Model Refinement g = gs – gm

E = | g|2

c = A g Set k = 1 Let c’ = c - k c Calculate g’ If | g’| < E, the REPEAT with c’ O/W try at k = 1.5, 0.5, 0.25

Page 60: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Experimental Results

Page 61: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Comparison : ASM v/s AAM

Page 62: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Key Differences ASM only uses

models of the image texture in the small regions around each landmark point

ASM searches around current position

ASM seeks to minimize the distance b/w model points and corresponding image points

AAM uses a model of appearance of the whole region

AAM only samples the image under current position

AAM seeks to minimize the difference of the synthesized image and target image

Page 63: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Experiment Data

Two data sets : 400 face images, 133 landmarks 72 brain slices, 133 landmark points

Training data set Faces : 200, tested on remaining 200 Brain : 400, leave-one-brain-

experiments

Page 64: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Capture Range

Page 65: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Point Location Accuracy

Page 66: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Point Location Accuracy ASM runs significantly faster for

both models, and locates the points more accurately

Page 67: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Texture Matching

Page 68: Statistical Models of Appearance for Computer Vision T.F. Cootes and C. J. Taylor July 10, 2000

Conclusion ASM searches around the current

location, along profiles, so one would expect them to have larger capture range

ASM takes only the shape into account thus are less reliable

AAM can work well with a much smaller number of landmarks as compared to ASM