Need help with image-similarity-clustering?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

167 Stars 44 Forks MIT License 43 Commits 5 Opened issues


This project allows images to be automatically grouped into like clusters using a combination of machine learning techniques.

Services available


Need anything else?

Contributors list

Unsupervised feature extraction and reduction

This project allows numerical features to be reduced down to fewer dimensions for plotting using unsupervised machine learning. Features can be taken simply as face value numbers from a spreadsheet (csv) file, or they can be extracted from images using a pre-trained model.


All functions in this package can be imported for use in your own python scripts, or run as stand-alone commands in a CLI.

In order to deal with all inputs in a standardardised fashion, csv files are parsed using

. While this is done automatically for CLI commands, if you're writing your own scripts you should parse your csv data in through this first. It essentially puts your data in a pd.DataFrame, where the first column is always a unique ID key column.

Current functionality: -

python features  
python tsne    
python umap    

Running 'features' will extract the numerical features of a directory of images, and save them (with the unique IDs) to the output path.

Running 'tsne' or 'umap' will reduce such features (or features from a regular csv) into fewer dimensions, and save these (with the unique IDs) to the output path. These reduction functions will accept a

argument, allowing you to specify one of several common pre-trained models to be used. I will probably add a command to specify your own custom model soon.

It is worth reiterating:

As stated in the above, it is imperetive you parse any data you want to reduce using

first if you're accessing these functions in your own scripts, and not using the CLI.


This project uses keras and tensorflow 2. I run these commands using tensorflow-gpu, so for the smoothest experience I recommend setting CUDA up from NVIDIA's website, I have not tested regular tensorflow (cpu).

Example usage

Reducing a folder of images using t-SNE

I have some folder full of images at path

that I want extract features from, and reduce into 2 dimensions using t-SNE.


python features "./images" "features.csv"
python tsne "features.csv" "tsne-results.csv" --feature-cols all --unique-col A


from features import extract_features
from tsne_reducer import tsne

features = extract_features('./images') reduced = tsne(features, write_to='./tsne_features.csv')

Reducing some numerical data columns using UMAP

I have a csv file called

containing a unique ID column (called "name") at column D, and the important columns containing numbers are at A, C, H, and AB.


python umap "./data.csv" "./tsne.csv" --feature-cols A,C,H,AB --unique-col D


from parse_data import parse_data
from umap_reducer import umap

data = parse_data('./data.csv', feature_cols=['A', 'C', 'H', 'AB'], unique_col='D') reduced = umap(data, write_to='./umap_features.csv')

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.