Deduplication and multimodal search across 250 GB
A private archive of roughly 250 GB of images had no reliable index and a large unknown quantity of near-duplicates. I built an ingestion pipeline that fingerprints every image, removes duplicates, generates CLIP embeddings and writes them to Postgres with pgvector — then serves search over the corpus. Ingestion, embedding, thumbnailing and indexing all run unattended.
- −38%duplicate images removed
- 250 GBcorpus processed end to end
- CLIP + pgvectorsearch by description
How that was measured
Duplicates were detected with perceptual hashing (pHash for structural similarity, dHash for gradient orientation), with a Hamming-distance threshold tuned on a hand-labelled sample before the full run. Only pairs passing both hashes were collapsed.
Search is hybrid: vector similarity over CLIP embeddings combined with a keyword pass over extracted metadata. Recall was checked against a set of known queries, not assumed.