Multi-scale Shape Modeling by Markov Random Fields