Deformation detection according to a Bayesian approach