Skip to content

A high-performance tool to find similar images using perceptual hashing.

License

Notifications You must be signed in to change notification settings

ImShyMike/image-find

Repository files navigation

A high-performance tool to find similar images using perceptual hashing.

Demo GIF


Table of contents

Installation

From crates.io

cargo install image-find

Building from source

git clone https://github.com/imshymike/image-find.git

cd image-find
cargo install --path  .

Usage

$ image-find
Usage: image-find  wanted_images_folder>gt; search_folder>gt; [similarity_threshold>gt;] [found_matches_folder>gt;]

Note

The default similarity threshold is 90%.

The program analyzes all images in the search_folder directory and compares them against reference images stored in the wanted_images_folder. When matches are found that exceed the specified similarity_threshold, they are printed to the console. Optionally, you can provide a found_matches_folder path to automatically copy all discovered matches to a separate location.

Arguments Type Description Example value
wanted_images_folder Path Directory containing reference images to find wanted_images
search_folder Path Directory to search for similar images all_images
similarity_threshold Percentage Minimum similarity score (0-100%) 90
found_matches_folder Path Optional output directory for matched images found

Output

CSV Report

A CSV file is generated in the directory where the program was executed containing all found matches with the following format:

Column Description Example
id Filename of the matched image with no extension 200
file Full filename of the matched image 200.jpg
path Full path to the matched image /images/200.jpg
similarity Similarity score (0.0-1.0, 4 decimal places) 0.9700

Example CSV output:

id,file,path,similarity
200,200.jpg,~/images/200.jpg,0.9700
341,341.png,~/images/341.jpg,1.0000
0

Demo GIF

The demo GIF is made using vhs with the command vhs cassette.tape.

License

This project is licensed under the MIT license.

About

A high-performance tool to find similar images using perceptual hashing.

Resources

License

Stars

Watchers

Forks

Languages