FoxxMD / context-mod

an event-based, reddit moderation bot built on top of snoowrap and written in typescript
https://contextmod.dev
MIT License
49 stars 11 forks source link

Implement reverse image search #101

Open FoxxMD opened 1 year ago

FoxxMD commented 1 year ago

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:

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.