This paper describes a technique for building compact models of the sh
ape and appearance of flexible objects (such as organs) seen in 2D ima
ges. The models are derived from the statistics of labelled images con
taining examples of the objects. Each model consists of a flexible sha
pe template, describing how the relevant locations of important points
on the objects can vary, and a statistical model of the expected grey
levels in a region around each model point. We describe how the model
s can be used in local image search, and give examples of their applic
ation to medical images.