A Perceptual Learning Model to Discover the Hierarchical Latent Structure of Image Collections