Detecting and Rectifying Noisy Labels: A Similarity-based Approach