clustimage

clustimage is a python package for unsupervised clustering of images.

https://github.com/erdogant/clustimage

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

clustering image-analysis image-processing python3
Last synced: 6 months ago · JSON representation ·

Repository

clustimage is a python package for unsupervised clustering of images.

Basic Info
Statistics
  • Stars: 105
  • Watchers: 3
  • Forks: 8
  • Open Issues: 6
  • Releases: 73
Topics
clustering image-analysis image-processing python3
Created over 4 years ago · Last pushed 10 months ago
Metadata Files
Readme Funding License Citation

README.md

clustimage

Python Pypi Docs LOC Downloads Downloads License Forks Issues Project Status DOI Medium Colab Donate <!---BuyMeCoffee--> <!---Coffee-->

The aim of clustimage is to detect natural groups or clusters of images. It works using a multi-step proces of carefully pre-processing the images, extracting the features, and evaluating the optimal number of clusters across the feature space. The optimal number of clusters can be determined using well known methods suchs as silhouette, dbindex, and derivatives in combination with clustering methods, such as agglomerative, kmeans, dbscan and hdbscan. With clustimage we aim to determine the most robust clustering by efficiently searching across the parameter and evaluation the clusters. Besides clustering of images, the clustimage model can also be used to find the most similar images for a new unseen sample.

A schematic overview is as following:

clustimage overcomes the following challenges:

* 1. Robustly groups similar images.
* 2. Returns the unique images.
* 3. Finds higly similar images for a given input image.
* 4. Cluster on datetime or latlon coordinates when using photos.

clustimage is fun because:

* It does not require a learning proces.
* It can group any set of images.
* It can return only the unique() images.
* it can find highly similar images given an input image.
* it can map photos on an interactive map with thumbnails and clusterlabels so that you easily structure your photos.
* It provided many plots to improve understanding of the feature-space and sample-sample relationships
* It is build on core statistics, such as PCA, HOG, EXIF data and many more, and therefore it does not has a dependency block.
* It works out of the box.

⭐️ Star this repo if you like it ⭐️

Blogs

  • Read the blog to get a structured overview how to cluster images.

Documentation pages

On the documentation pages you can find detailed information about the working of the clustimage with many examples.

Installation

It is advisable to create a new environment (e.g. with Conda).

bash conda create -n env_clustimage python=3.8 conda activate env_clustimage

Install bnlearn from PyPI

bash pip install clustimage # new install pip install -U clustimage # update to latest version

Directly install from github source

bash pip install git+https://github.com/erdogant/clustimage

Import clustimage package

python from clustimage import clustimage


Examples

The results obtained from the clustimgage library is a dictionary containing the following keys:

* img       : image vector of the preprocessed images
* feat      : Features extracted for the images
* xycoord   : X and Y coordinates from the embedding
* pathnames : Absolute path location to the image file
* filenames : File names of the image file
* labels    : Cluster labels

Examples Mnist dataset:

Example: Clustering mnist dataset

In this example we will be using a flattened grayscale image array loaded from sklearn. The unique detected clusters are the following:

Click on the underneath scatterplot to zoom-in and see ALL the images in the scatterplot

Example: Plot the explained variance

Example: Plot the unique images

Example: Plot the dendrogram


Examples Flower dataset:

Example: cluster the flower dataset

Example: Make scatterplot with clusterlabels

Example: Plot the unique images per cluster

Example: Plot the images in a particular cluster

Example: Make prediction for unseen input image


Example: Clustering of faces on images


Example: Break up the steps


Example: Extract images belonging to clusters


Support

This project needs some love! ❤️ You can help in various ways.

* Become a Sponsor!
* Star this repo at the github page.
* Other contributions can be in the form of feature requests, idea discussions, reporting bugs, opening pull requests.
* Read more why becoming an sponsor is important on the Sponsor Github Page.

Cheers Mate.

Owner

  • Name: Erdogan
  • Login: erdogant
  • Kind: user
  • Location: Den Haag

Machine Learning | Statistics | Bayesian | D3js | Visualizations

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    family-names: Taskesen
    given-names: Erdogan
    orcid: "https://orcid.org/0000-0002-3430-9618"
cff-version: "1.1.0"
date-released: 2021-11-08
keywords: 
  - "python"
  - "clustering"
  - "images"
  - "hog"
  - "pca"
  - "cluster evaluation"
  - "unsupervised"
license: "MIT"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://erdogant.github.io/clustimage"
title: "Python package clustimage is for unsupervised clustering of images."
version: "1.0.0"
...

GitHub Events

Total
  • Create event: 22
  • Release event: 22
  • Issues event: 5
  • Watch event: 13
  • Issue comment event: 9
  • Push event: 77
  • Fork event: 1
Last Year
  • Create event: 22
  • Release event: 22
  • Issues event: 5
  • Watch event: 13
  • Issue comment event: 9
  • Push event: 77
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 397
  • Total Committers: 1
  • Avg Commits per committer: 397.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 4
  • Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
erdogant e****t@g****m 397

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 27
  • Total pull requests: 0
  • Average time to close issues: 5 months
  • Average time to close pull requests: N/A
  • Total issue authors: 20
  • Total pull request authors: 0
  • Average comments per issue: 2.52
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • MalekBezzina (6)
  • cp1972 (2)
  • spicker22 (2)
  • dlindenkreuz (1)
  • ntokenl (1)
  • ishakhatana (1)
  • emicol (1)
  • maximiliangilles (1)
  • lliendo (1)
  • ricaiu (1)
  • TaisiaKozharina (1)
  • eseller (1)
  • johngrabner (1)
  • silvio-barbotto (1)
  • dt99jay (1)
Pull Request Authors
Top Labels
Issue Labels
wontfix (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 3,878 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 3
  • Total versions: 75
  • Total maintainers: 1
pypi.org: clustimage

Python package clustimage is for unsupervised clustering of images.

  • Homepage: https://erdogant.github.io/clustimage
  • Documentation: https://clustimage.readthedocs.io/
  • License: MIT License Copyright (c) 2020 Erdogan Taskesen clustimage - Python package Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 1.6.22
    published 10 months ago
  • Versions: 75
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 3,878 Last month
Rankings
Dependent packages count: 3.2%
Downloads: 6.6%
Average: 8.1%
Stargazers count: 8.1%
Dependent repos count: 9.1%
Forks count: 13.3%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite
.github/workflows/pytest.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
docs/source/requirements.txt pypi
  • pipinstallsphinx_rtd_theme *
requirements-dev.txt pypi
  • irelease * development
  • pytest * development
  • rst2pdf * development
  • sphinx * development
  • sphinx_rtd_theme * development
  • spyder-kernels ==2.2. development
requirements.txt pypi
  • clusteval *
  • colourmap *
  • distfit *
  • imagehash *
  • ismember *
  • matplotlib *
  • numpy *
  • opencv-python *
  • pandas *
  • pca *
  • pypickle *
  • requests *
  • scatterd *
  • scikit-image *
  • scikit-learn *
  • scipy *
  • tqdm *
  • umap-learn *
setup.py pypi
  • clusteval *
  • colourmap *
  • distfit *
  • imagehash *
  • ismember *
  • matplotlib *
  • numpy *
  • opencv-python *
  • pandas *
  • pca *
  • pypickle *
  • requests *
  • scatterd >=1.1.2
  • scikit-image *
  • scikit-learn *
  • scipy *
  • tqdm *
  • umap-learn *