Semi-Supervised Metric Learning Using Pairwise Constraints