This is the MATLAB code for the Shape Maps algorithm, presented at CVPR'08. If you use the code, please cite this paper:
Georg Langs, Nikos Paragios. The Structure of Multivariate Manifolds: Shape Maps. in Proc. of CVPR'08, 2008 (PDF)
At MICCAI’08 in New York Georg Langs, Dimitris Samaras, and Tim Cootes give a Tutorial on Learning Models of Anatomy and Function. There will be comprehensive coverage of the generation and the use of Shape Maps.
What are shape maps
Shape maps are based on diffusion maps, and the minimum description length principle. They map a set of training shape examples to a metric space - the map - where the Euclidean distance relates to the joint modeling behavior of landmarks. That is, after running shape maps on your data, every landmark is mapped to a position so that if two landmarks are close they can be modelled cheaply with the same model. This gives a notion of coherenence for sub-sets of your data. It can be used for:
-
•Deformation- or motion-segmentation: just perform spatial clustering in the shape map (e.g., k-means as in the experiments in the paper)
-
•Reconstruction: if there are missing landmarks in the data, you can use landmarks in the local neighborhood in the shape map to impute them (instead of spatial neighbors in real space). By this the reconstruction is based on the most related landmarks, in terms of your imputation model (In the paper, we used a multivariate Gaussian)
-
•Outlier detection: the density in the shape map gives an idea about how coherent groups of landmarks behave. Low density regions can indicate outliers.
A more detailed description and derivation is given in the CVPR'08 paper.
How to use shape maps
The code comes with a DEMO.m script that generates a set of artificial shape examples, then runs shape maps on this data, and displays the landmarks positions in the shape map. You can run k-means on these coordinates, and it will segment the data into 4 objects (boxes in the provided case) that behave coherently, while moving rather randomly against each other.
Download
Download the MATLAB code here: ShapeMaps.0.9.zip.