Practical overview
When it fits
Use it when you can supply two image collections as CSV files and want feature-based pairwise similarity scores, including for a visual duplicate-detection or image-ranking workflow.
Who it is for
- Python developers comparing image collections
- Teams exploring visual duplicate detection or image ranking by feature similarity
Documented uses
- Compare images across two CSV collections of image URLs.
- Extract and save image features for later similarity calculations.
- Select likely matches by applying a threshold to cosine similarity scores.
Requirements & limits
The repository is public and lists an MIT license.
- Inputs are CSV files with image URLs by default; offline images require a custom _sub_process() override.
- TensorFlow is a separate installation and GPU use depends on its environment requirements.
- Batch size and process count can be configured; the README ties these settings to available memory and request processing needs.
- The similarity threshold is user-selected; the README suggests 0.84 to below 1 as a practical range.
- The project uses MobileNet features and cosine distances, not perceptual-hash comparison.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare and compare two URL-based image collections
Generate image features from two CSV inputs and calculate their pairwise similarity scores.
Before you start
- Python 3
- TensorFlow installed and configured for the chosen CPU or GPU environment
- The repository requirements installed, including h5py, NumPy and requests
- Two CSV files with image URLs; the second example also selects id and url columns
Steps
Create an ImageSimilarity instance and set batch_size and num_processes to values suited to the available resources.
Load each CSV with load_data_csv().
Call save_data() for both collections to create feature and field files in __generated__.
Call iteration() with the collection field names and a chosen threshold to calculate the similarity matrix.
Expected outcome
A matrix of similarity scores comparing rows from the first collection with rows from the second.
Guide limitations
- TensorFlow is not included in requirements.txt and must be installed and configured separately.
- The README recommends a threshold in [0.84, 1) for practical use but says to choose a proper threshold.
- CSV image inputs use URLs by default; offline image lists require overriding _sub_process().
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 28 November 2026
- Original website title
- ryanfwy/image-similarity · Official homepage title · retained in its source language

