1. A method for distance metric learning, comprising: generating two random projection matrices of a dataset from a d-dimensional space into an m-dimensional sub-space, where m is smaller than d; solving an optimization problem in the m-dimensional subspace to learn a distance metric based on the random projection matrices; recovering the distance metric in the d-dimensional space by obtaining a low-rank approximation using a randomized approach to avoid storing the entire metric in the original space; and classifying images using the recovered distance metric.