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
- 2.1. Install uv(if not currently installed)
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!
Metadata
Release files for simikit 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simikit-0.1.3.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simikit-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.2 kB
Release files / simikit-0.1.3.tar.gz
| Download URL | simikit-0.1.3.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2018a8f5579bdda158da9962fa920ef0db384270048eeb5badbf5fb35b3ce22b
|
|
BLAKE2b-256 checksum How to use checksums |
e2d59694b5cd178e9d723de6b6a453671f948359ca7db7d634dadde1ee7204e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.13
|
Release files / simikit-0.1.3-py3-none-any.whl
| Download URL | simikit-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
286b52f4488a5a87fd541cd38104eae0c92edf5742181dad5cbe56859ad9414a
|
|
BLAKE2b-256 checksum How to use checksums |
34379e63a461be490203d369ba3e2e5caf46b4b40153fb39fef7bd9bfb93113f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.13
|