Algorithm Search⌘K

Modeladvanced

Active appearance model

Also called AAM.

A PCA model of landmark shape and of the texture warped to the mean shape, fitted to an image by updates computed from the texture residual.

An active appearance model (AAM) describes a class of objects, most often faces, by two linear models. The first is the landmark shape model of the active shape model. The second is a model of the texture, the gray levels or colors inside the object after a warp to the mean shape, built with principal component analysis as in eigenfaces. A few parameters then produce a whole synthetic image of the object. To fit the model to a new image, the parameters are changed so that the synthetic image matches the image region under the current shape. Cootes, Edwards and Taylor (1998, 2001) predicted each change from the residual with a fixed linear map learned in training. Matthews and Baker (2004) showed that this map is only an approximation, and fitted the model instead with inverse compositional alignment, a form of Lucas-Kanade image alignment.

The machine

Shape. As in the active shape model, a shape is a vector xx of nn landmarks, the training shapes are aligned, and

x=xˉ+Psbs,x = \bar x + P_s b_s,

with PsP_s the leading eigenvectors of the shape covariance.

Texture. The mean shape is split into triangles, for example by a Delaunay triangulation of its landmarks. Each training image is warped from its own landmarks to the mean shape, one affine map per triangle (a piecewise affine warp), and the pixels inside the mean shape are read into a vector gg of length NN. Each gg is normalized for brightness and contrast. PCA of these vectors gives

g=gˉ+Pgbg.g = \bar g + P_g b_g.

So the texture of every example is compared in the same frame, and shape changes do not leak into the texture model.

Combined model (Cootes and others). Shape and texture weights are correlated, for example a smile changes both. The vector (Wsbs,bg)(W_s b_s, b_g), with a diagonal WsW_s that puts shape and texture in comparable units, goes through a third PCA, (Wsbs,bg)=Qc(W_s b_s, b_g) = Q c. Then one vector cc controls both:

x=xˉ+PsWs−1Qsc,g=gˉ+PgQgc.x = \bar x + P_s W_s^{-1} Q_s c, \qquad g = \bar g + P_g Q_g c.

Matthews and Baker call the model without the third PCA an independent AAM, with separate shape weights pp and appearance weights λ\lambda.

Synthesis. For parameters cc and a pose tt (a similarity transform), the model texture gg is warped from the mean shape to the shape xx placed by tt. This gives an image of the object.

Fit by a learned update (Cootes, Edwards and Taylor). Let gsg_s be the image texture sampled under the current shape and warped back to the mean shape, and r=gs−gmr = g_s - g_m the residual against the model texture. The method assumes that the parameter error is a linear function of the residual, δp=−R r\delta p = -R\, r, with one matrix RR for all images. RR is found in training by moving the parameters of training images by known amounts and fitting the residuals with linear regression. In search, each step applies δp\delta p; if the error ∥r∥2\lVert r \rVert^2 does not fall, smaller steps along the same direction are tried. The search runs from coarse to fine on an image pyramid.

Fit by inverse compositional alignment (Matthews and Baker). For an independent AAM with appearance basis images A1,…,AmA_1, \dots, A_m, orthonormal, and the mean appearance A0A_0, the fit minimizes

∑u[A0(u)+∑iλiAi(u)−I(W(u;p))]2\sum_{u} \Big[ A_0(u) + \sum_i \lambda_i A_i(u) - I(W(u; p)) \Big]^2

over the shape weights pp and the appearance weights λ\lambda. The appearance is projected out, so the cost in pp alone is the same sum restricted to the orthogonal complement of the span of the AiA_i. This cost is minimized by inverse compositional Gauss-Newton steps with a Hessian that is computed once.

What it counts

The model counts the squared difference between the image region under the shape and the texture that the model synthesizes, measured in the frame of the mean shape. Training minimizes squared reconstruction errors of shapes and textures over linear subspaces, so each PCA is optimal in the sense of the eigenfaces theorem. Fitting is a local search on a nonconvex cost, so it finds a local minimum near the start.

Worked example of project-out. Take a texture of N=3N = 3 pixels, one appearance mode A1=(1,1,1)/3A_1 = (1, 1, 1)/\sqrt3, and the error image E=I(W(u;p))−A0=(3,1,2)E = I(W(u; p)) - A_0 = (3, 1, 2) at the current pp. The best appearance weight is λ1=A1⋅E=6/3=3.4641\lambda_1 = A_1 \cdot E = 6/\sqrt3 = 3.4641, which explains the part (2,2,2)(2, 2, 2), a uniform rise in brightness. What is left is (1,−1,0)(1, -1, 0), with squared norm 2. Projecting out gives the same vector directly: E−A1(A1⋅E)=(1,−1,0)E - A_1 (A_1 \cdot E) = (1, -1, 0). The shape step then works only on this part, so a change of brightness alone does not move the landmarks.

Relation to other models

  • Active shape model. The ASM uses the same shape model but looks only at profiles near the landmarks. The AAM uses all pixels inside the shape.
  • Eigenfaces. The texture model is eigenfaces computed after a warp to the mean shape, so that the pixels of different faces correspond.
  • Image alignment. With no shape modes beyond the pose and no appearance modes, the fit is Lucas-Kanade alignment of a fixed template. The inverse compositional fit is the inverse compositional algorithm with a linear appearance model.
  • 3D morphable models. Blanz and Vetter built the same kind of linear model of shape and texture on 3D face scans, fitted through a camera and a lighting model.
  • Learned landmark detectors. Later face landmark methods, such as cascades of regressors and deep networks, learn the map from image to landmarks directly and keep the linear shape model only as a prior, or not at all.

Known results in the model

  • Project-out (theorem). For orthonormal A1,…,AmA_1, \dots, A_m, the minimum of the cost above over λ\lambda, for a fixed pp, is the squared norm of the error image projected onto the orthogonal complement of the span of the AiA_i, and the best λi\lambda_i is Ai⋅(I(W(⋅;p))−A0)A_i \cdot (I(W(\cdot; p)) - A_0). This is the projection theorem of linear least squares, and the worked example above is one case.
  • The fixed update is an approximation (an argument of Matthews and Baker 2004, not a bound). The learned update assumes that the relation between the residual and the parameter error is the same at all parameters and for all images. In general the gradient of the residual depends on the current shape and on the appearance, so no single RR is exact.
  • Piecewise affine warps are not a group (theorem). The composition of two piecewise affine warps on the same triangles is in general not a piecewise affine warp on those triangles, so the inverse compositional step needs a first order approximation of the composition. The algorithm is then not exactly the inverse compositional algorithm of Baker and Matthews, and the convergence results for that algorithm do not carry over unchanged.
  • Cost per iteration (derived bound, real-RAM, NN pixels, nn shape weights). With the steepest descent images and the Hessian computed once, an iteration of the project-out fit warps the image (O(N)O(N)), forms the error (O(N)O(N)), multiplies by the steepest descent images (O(nN)O(n N)), and solves with the fixed n×nn \times n inverse (O(n2)O(n^2)). The update of the warp does not depend on NN. This gives O(nN+n2)O(n N + n^2) per iteration, independent of the number of appearance modes. The number of iterations has no bound.
  • Benchmark results. Matthews and Baker report that their fit is faster and converges more often than the learned update on their face data. Cootes and others report fits of faces and medical images. All of these are benchmark results on the data in those papers.

References

  1. Tim F. Cootes, Gareth J. Edwards and Christopher J. Taylor, Active appearance models, IEEE TPAMI 23(6), 681-685, 2001, the combined model of shape and gray levels, and the search with a linear update learned from known displacements
  2. Iain Matthews and Simon Baker, Active appearance models revisited, International Journal of Computer Vision 60(2), 135-164, 2004, the independent and combined models, the inverse compositional fit with the appearance projected out, and the analysis of the fixed linear update
  3. Tim F. Cootes, Christopher J. Taylor, David H. Cooper and Jim Graham, Active shape models: their training and application, Computer Vision and Image Understanding 61(1), 38-59, 1995, the shape model that the appearance model reuses
  4. Richard Szeliski, Computer Vision: Algorithms and Applications, 1st edition, Springer, 2011, Section 14.2.2, active appearance and 3D shape models

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/25W3H2/text.yaml