A Semi-supervised Learning Approach to Image Retrieval