1. A method for segmenting an organ comprising the steps of: detecting an organ with a trained detector, wherein the step of detecting an organ comprises: receiving a first image that includes an organ; and applying a detector trained on a database of images of like organs to the first image to discriminate the organ in the first image from a background of the age; and determining a most likely shape of the organ, wherein the determining step comprises: identifying images from the database of images of like organs that are closest to the organ in the first image by using a distance between learned image features that best characterize the shape of the organ, wherein the database of images of like organs is used to learn the image features that best characterize the shape of the organ by emulating a distance between feature vectors to a distance between shapes; inferring the shape of the organ in the first image by using the identified database images to first determine the whole shape of the organ and then determine smaller parts of the shape; and segmenting the organ from the first image by using the inferred shape of the organ, wherein the method is performed using a processor, and wherein d(c q ,c r )=(c q −c r ) T (c q −c r ) is the distance between shapes, d(f q ,f r )=(f q −f r ) T Σ(f q −f r ) is the distance between feature vectors, where f is an appearance feature vector, c is its corresponding shape, (f q ,c q ),(f r ,c r ) represent the vector of a query and a reference, respectively, and Σ is a linear metric associated with the feature vector space.