context-mod
context-mod copied to clipboard
Implement reverse image search
CM already supports image comparison, but only in the scope of the activity and author history with some minor caching possible. Essnetially, this is only in-memory searching.
Need to implement a way to store hashes that can also be fuzzy searched.
Some resources:
- Elasticsearch with fuzzy query
- Implement own database backend for image-match based on szuru work
- will require interfacing with python (using python-shell?)
- use match (dockerized image-match/ES) api
- Doesn't require python but does have dependency on match and elasticsearch docker image
- API is pretty bare bones...
Unless I can find an efficient way to use existing db dependencies, agnostic to db type, I will probably just use elasticsearch since i'll have to add dependencies either way.
Running ES as a docker image is pretty straightforward and doesn't require any more system/lang deps in CM which makes using it optional and less complex than making sure python is installed or anything...
Additionally, using ES means I can control the document ingestion and search for it on more parameters. EX Could do OCR (#100) and add to document to make searching by image hash or full text possible.