1. In a computing environment, a computer-implemented method comprising: performing near-duplicate image retrieval with a computer processor, including detecting, with the computer processor, visual patterns in images, representing the visual patterns as visual pattern vectors, and using the visual pattern vectors and visual word vectors to determine, with the computer processor, similarity between images by ranking database images according to a similarity of each given database image with a query image, including by obtaining a query visual pattern vector for the query image, and for each given image, determining a visual pattern vector and computing a visual pattern-based similarity score for the given image by selecting a set of most similar database images based on a ranking of the database images according to the visual pattern-based similarity scores, and re-ranking the set of most similar database images by evaluating similarity for each specific image in the set of most similar database images via a visual word vector corresponding to the specific image and a query visual word vector corresponding to the query image.