Similar Items: Learning scene-aware image priors with high-order Markov random fields