In this paper, we present a new model for deformations of shapes. A pseudolikelihood is based on the statistical distribution of the gradient vector field of the gray level. The prior distribution is based on the probabilistic principal component analysis (PPCA). We also propose a new model based on mixtures of PPCA that is useful in the case of greater variability in the shape. A criterion of global or local object specificity based on a preliminary color segmentation of the image is included into the model. The localization of a shape in an image is then viewed as minimizing the corresponding Gibbs field. We use the exploration/selection (E/S) stochastic algorithm in order to find the optimal deformation. This yields a new unsupervised statistical method for localization of shapes. In order to estimate the statistical parameters for the gradient vector field of the gray level, we use an iterative conditional estimation (ICE) procedure. The color segmentation of the image can be computed with an exploration/selection/estimation (ESE) procedure.