Discriminative models for robust image classification