Skip to content

benhamlen/local-reverse-image-search

Repository files navigation

Local Reverse Image Search

Description: This program searches a set of directories for instances of some query image. Akaze keypoints are detected in each image using the akaze crate, nearest neighbors are found using the kdtree crate, "matching" keypoints are determined using Lowe's ratio test (described in section 7.1 of this paper), and finally images with an "outlier" number of keypoint matches (currently determined by z-score) are reported to the user as overall matches to the query image.

Extracted keypoints and descriptors are cached on disk using the sled crate and recalled in subsequent program executions.

I also view this as a fun playground for Rust stuff, though, so feel free to add any feature you think could be cool!

Dependencies

All dependencies should be automagically downloaded by Cargo while building.

Installation

  1. Install Rust (guide here)
  2. Clone this repository git clone https://github.com/benhamlen/local-reverse-image-search.git

Configuration

config.toml is the main configuration document for this program.

The most important configuration is the search directory paths.

Usage

  1. Run the program with cargo run --release
  2. Select a query image

How to test the software

No tests for now, perhaps will add some in the future. Was thinking about characterizing the program's performance by randomly selecting many query images and seeing what images it has trouble with, what images it detects well, etc.

Known issues

None for now, certainly some exist.

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

Open source licensing info

Credits and references

This project was inspired by work from the University of Minnesota's CSCI 5561 Computer Vision course, taught by Junaed Sattar. The concepts implemented here in Rust are reflected in Python in the course's homework assignments. Thanks to him for teaching the concepts so well!