Appearance-based Global Similarity Retrieval