Python code I wrote to implement a Reverse Image Search / Content-Based Image Retrieval (CBIR)
Based on the feature descriptors generated by the scale-invariant feature transform and the bag-of-words model (BoW), it performs reverse image search.
Content-based image retrieval query is accomplished via ElasticSearch using ranking based on a k-means clustering algorithm.