Skip to main content

Image Similarity Toolkit in Python

Project description

SimiKit: Image Similarity Toolkit in Python

English | 中文

Overview

SimiKit is a toolkit for commonly used image similarity algorithms. This project provides various tools to help developers quickly compare the effects of multiple image similarity algorithms, and assist developers in selecting an image similarity algorithm that best meets their needs.

Installation

1. Install by pip

pip install simikit

2. Install by uv

curl -LsSf https://astral.sh/uv/install.sh | sh  # macOS and Linux
# on Windows:
# powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  • 2.2. Clone the repository:
git clone https://github.com/yie1d/simikit.git  
cd simikit
  • 2.3. Create a new virtual environment and activate it:
uv venv
source .venv/bin/activate  # On Unix/macOS
# Or on Windows:
# .venv\Scripts\activate
  • 2.4. Install dependencies:
uv sync

Basic Usage

1. extract image features

from simikit.features import AHash, Vit, DinoV2

print(DinoV2().encode('./t1.png'))
print(Vit().encode('./t1.png'))
print(AHash().encode('./t1.png'))

2. use comparator by multiple algorithms

from simikit.api import Comparator
from simikit.features import AHash, DHash
from simikit.metrics import hamming_distance

comparator = Comparator([
    (DHash(16, vertical=True), hamming_distance),
    (AHash(16), hamming_distance),
    (AHash(8), hamming_distance),
])

print(comparator.compare_image(
    './t1.png',
    './t2.png',
))

Supported Algorithms

  • HASH
    • Average hashing
    • Difference hashing
    • Perceptual hashing
    • Wavelet hashing
  • Transformer
    • VIT
    • DINOv2

Contribution

Thank you for your interest in simikit. Submissions in all aspects are welcome. Let's work together to make simikit better!

Future Plans

  • Add more image similarity algorithms

If there is any similarity algorithm that you want but is not currently available in the simikit, you are welcome to raise it in the Issues section!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simikit-0.1.3.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simikit-0.1.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file simikit-0.1.3.tar.gz.

File metadata

  • Download URL: simikit-0.1.3.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for simikit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2018a8f5579bdda158da9962fa920ef0db384270048eeb5badbf5fb35b3ce22b
MD5 3d077e202a6902cfca6bbc20cdaf78da
BLAKE2b-256 e2d59694b5cd178e9d723de6b6a453671f948359ca7db7d634dadde1ee7204e0

See more details on using hashes here.

File details

Details for the file simikit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: simikit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for simikit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 286b52f4488a5a87fd541cd38104eae0c92edf5742181dad5cbe56859ad9414a
MD5 d01a15e4af735e233a4f8484982543e9
BLAKE2b-256 34379e63a461be490203d369ba3e2e5caf46b4b40153fb39fef7bd9bfb93113f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page