IQDB is a reverse image search system. It lets you search a database of images to find images that are visually similar to a given image.
This version of IQDB is a fork of the original IQDB used by https://iqdb.org, based on the (IQDB fork)[https://github.com/danbooru/iqdb/] used by Danbooru.
Reimplementing the algorithm and features in Rust as a learning exercise. Using sqlx and sqlite for the database connection.
(Make a diagram for here later)
sqlx-cli is a requirement.
$ cargo install sqlx-cli
$ sqlx db create
$ sqlx migrate run
$ cargo build
$ cargo run
- Implement proper response for the API
- Add sqlx integration
- Split up the haar transform methods so it can be tested more easily
- Add full testing
- Make it backwards compatible with the original (this *might* not be possible, it looks like the image reader in the original is corrupting the data or something)
This version of IQDB is a rust rewrite of the Danbooru implementation of IQDB, which is forked from the original.
The original code is written by piespy. IQDB is based on code from imgSeek, written by Ricardo Niederberger Cabral. The IQDB algorithm is based on the paper Fast Multiresolution Image Querying by Charles E. Jacobs, Adam Finkelstein, and David H. Salesin.
OIQDB is distributed under the terms of the GNU General Public License, following the licensing of IQDB. See COPYING for details.
- https://grail.cs.washington.edu/projects/query
- https://grail.cs.washington.edu/projects/query/mrquery.pdf
- https://hub.docker.com/repository/docker/evazion/iqdb
- https://unix4lyfe.org/haar/
- https://dsp.stackexchange.com/questions/58843/what-is-the-correct-order-of-operations-for-a-2d-haar-wavelet-decomposition
- To learn how to handle spawn blocking and bridging the sync and async portions of the code, I looked here.
- I liked how bitvec separated the docs and code, so started foraying into that style. Appreciate the good documentation and support! It was very useful, you can find it here.
Thanks to the Rust community for providing documentation and tutorials, the authors of the original algorithm, implementations and forks.