Modeladvanced
Active shape model
Also called ASM, point distribution model.
A shape is the mean of aligned landmark sets plus a few PCA modes with bounded weights; it is fitted to an image by moving each landmark along its normal and projecting back.
An active shape model (ASM) describes a class of shapes, such as faces, hands or a bone in an X-ray, by landmark points and a statistical model of how they move together. The training shapes are aligned to remove position, rotation and size. Principal component analysis of the aligned shapes then gives a mean shape and a few modes , and every allowed shape is with each weight kept in a range seen in training. To find the shape in a new image, each landmark moves along the normal of the outline to a better image match, and the moved points are projected back onto the model. So the model can deform only in ways that it saw in training, which is the main difference from an active contour. The active appearance model adds a model of the gray levels inside the shape.
The machine
Shapes. A shape is a vector of landmarks,
where landmark marks the same part of the object (a corner of an eye, the tip of a finger) in every example. The training set has shapes, marked by hand.
Alignment. A similarity transform (shift, rotation, scale) has no meaning for the shape, so the training shapes are first put into one frame. Each shape is aligned to a current mean by the rotation, scale and shift that minimize the sum of squared distances between landmarks, as in the Kabsch algorithm with a scale. The mean is then recomputed and normalized, and the process repeats until the mean stops changing. This is generalized Procrustes analysis.
The shape model. With the aligned shapes , the mean and the covariance
let be the eigenvectors of the largest eigenvalues , and . The number is chosen so that the modes explain a set part of the total variance, such as 98 percent. A shape in the model frame is
and a plausible shape has for each . The limit is a rule of thumb. A shape in the image is for a similarity .
Search. Given a start, usually the mean shape placed near the object:
- At each landmark of the current shape, sample the image along the normal to the outline and pick the best position on it, for example the strongest edge, or the best fit to a model of the gray-level profile learned at that landmark.
- Find the pose and the weights such that is nearest to the picked points. This alternates between the pose (a Procrustes fit) and , where is the picked set mapped into the model frame.
- Clamp each to .
- Repeat until the shape stops moving. In practice the search runs from coarse to fine on an image pyramid.
What it counts
The model counts two errors. In training, PCA picks the modes that leave the least squared distance between the aligned shapes and their projections, and that distance is times the sum of the dropped eigenvalues. The proof is the same as for eigenfaces, with shapes in place of images. In search, step 2 minimizes the sum of squared distances between the model points and the points that the image suggests, over pose and , and step 3 keeps the result plausible. The image term enters only through step 1. So the model does not have one global cost over the image that the search provably minimizes.
Worked example. Take shapes of 3 landmarks that are already in the model frame: two fixed base points and and an apex. The apexes of three training shapes are , and . The mean apex is , and only the apex coordinates vary, with deviations , and . The covariance has one nonzero eigenvalue, , with the mode on the apex coordinates. So one mode explains all of the variance, and the limit is .
- The picked apex has , inside the limit. The model shape has the apex . The model cannot move the apex sideways alone, because in training a move to the side always came with a change of height.
- The picked apex has , outside the limit. Clamping gives and the apex .
Relation to other models
- Active contours. A snake has a generic smoothness prior and can take any smooth shape. An ASM has a prior learned from examples and can take only shapes near the span of its modes.
- Eigenfaces. Eigenfaces apply PCA to the pixel values of aligned images. The ASM applies PCA to landmark positions, so it models geometry, not intensity.
- Active appearance model. The AAM combines this shape model with a PCA model of the texture in a shape-free frame, and fits both to the whole image region instead of to profiles at the landmarks.
- Template matching. Template matching searches over a rigid template and its pose. The ASM adds the shape weights to the pose.
- 3D models. The same construction on 3D landmarks or meshes gives the statistical shape models of medical imaging and the 3D morphable models of faces.
Known results in the model
- Best linear subspace (theorem). Among all -dimensional subspaces through , the span of has the least sum of squared distances to the aligned training shapes, and that sum is . This is the PCA theorem; see the proof on the eigenfaces page.
- Projection (theorem). For fixed pose, gives the model shape nearest to in the model frame, because has orthonormal columns.
- Rank (theorem). has rank at most , because the deviations from the mean sum to zero. If the alignment fixes the centroid, the rotation and the scale by linear conditions, as when the aligned shapes are projected into the tangent space at the mean, the deviations also satisfy 4 linear constraints (2 for the shift, 1 for the rotation, 1 for the scale). Then at most modes have a positive eigenvalue.
- Limits of (heuristic). If the weights were Gaussian, each would lie within standard deviations with probability about 0.997. The shapes need not be Gaussian, and the limit on each alone allows the corners of a box, which are less likely than the bound suggests. A limit on is a common alternative.
- Search (heuristic). The search is a local method. It needs a start near the object, and it can stop at a wrong edge. No convergence to a global optimum is claimed.
- Benchmark results. Cootes and others report search results on medical images and faces. The accuracy depends on the data, the start and the number of training shapes, so the published numbers are benchmark results, not bounds.
References
- 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 alignment of the training shapes, the shape model x = mean + P b with limits on b, and the iterative image search
- Tim F. Cootes, Gareth J. Edwards and Christopher J. Taylor, Active appearance models, IEEE TPAMI 23(6), 681-685, 2001, the shape model reused as one part of the appearance model
- Richard Szeliski, Computer Vision: Algorithms and Applications, 1st edition, Springer, 2011, Section 14.2.2, active appearance and 3D shape models
Where this leads
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 8615G7 Edit this page History Report an error Markdown