Learning compact and effective distance metrics with diversity regularization
beyond bags of features : spatial pyramid matching for recognizing natural scene categories .