Layout-aware mixture models for patch-based image representation and analysis