Skip to content

ngli-me/oiqdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OIQDB: an Opinionated Image Querying DataBase model

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 used by Danbooru.

Reimplemented in Rust

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)

Setup

sqlx-cli is a requirement.

$ cargo install sqlx-cli
$ sqlx db create
$ sqlx migrate run

Build and Run

$ cargo build
$ cargo run

TODO

  • 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)

History

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.

Further reading

Rust Stuff

Axum

  • 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages