Recognition of facial attributes using adaptive sparse representations of random patches