Lightweight offline image moderation using perceptual hashing and BK-Trees (TS/Rust/C)
We wanted a simple way to detect duplicate or modified images on low-end hardware without deploying heavy AI models or GPUs, so we wrote BKGuard. It is an offline library implemented in TypeScript, Rust, and C that uses dHash and pHash for similarity, ORB for keypoint matching to catch rotations or crops, and BK-Trees for lookups.
To keep expectations clear, this is not an AI model, a cloud service, or a database. It is just a lightweight CPU-only utility library that runs locally. Links to the code repositories are below if you want to use it or contribute.
You can ask anything you're curious about.
Posted Jun 24, 2026, 6:04 PM UTC
10