1. A method comprising: acquiring an image of an object; and via software executed by a processor of a system, using a discriminative alignment model to align a generic mesh to the image to facilitate locating of features of the image that correspond to the object, the discriminative alignment model including a generative shape model component and a discriminative appearance model component, the discriminative appearance model component having been trained with training data to estimate a score function that is a function of a shape parameter of a given image and that seeks to minimize an angle between a gradient direction of the score function for the shape parameter and an ideal alignment travel direction for the shape parameter.