Latest / Big Iron Radio / Homelab Brief - Auto-Tagging Your Photos with CLIP and pgvector
Transcript
- 0:02Welcome to the Homelab Brief from Big Iron.
- 0:06Today, auto-tagging a photo archive
- 0:09with Clip built to outlive whatever app you use today.
- 0:13Quick note, this is an AI voice drawn from a Big Iron guide.
- 0:17Links below.
- 0:19The premise is a warning.
- 0:21App-locked machine learning tags the ones inside image,
- 0:24photo prism, or diggy cam die the day you migrate away
- 0:27from that app.
- 0:29A standalone pipeline, when you own, outlives all of them.
- 0:32So build the pipeline, not the lock-in.
- 0:35The engine.
- 0:37Run open Clip fast and a good default or SIG LIP,
- 0:41which gives better zero-shot classification accuracy.
- 0:45You run it once per image batched to turn every photo
- 0:48into an embedding and a set of tags.
- 0:50Now, two very different outputs,
- 0:52and this is the key architectural idea.
- 0:55Write the embeddings to Postgres with PG vector, HNSW indexed,
- 1:00for fast semantic search,
- 1:02but treat that as disposable infrastructure you can always rebuild.
- 1:06And write the human-readable keyword tags to XMP sidecar files,
- 1:10using EXIF tool, for permanents portable to any tool, forever.
- 1:15Disposable index, permanent tags.
- 1:18The highest leverage step is also the most manual.
- 1:21Zero-shot tagging needs a curated vocabulary.
- 1:25Give it a real list of the categories you care about,
- 1:28or you get useless captions like a photo of a thing.
- 1:31It's one-time work, and it's the difference between a searchable archive and noise.
- 1:35On time, for a 200,000-image archive, CPU only runs 1 to 5 hours, depending on the model.
- 1:45A modest GPU does it in 7 to 40 minutes.
- 1:49Either way, it's a one-time pass.
- 1:51The full pipeline's in the show notes.
- 1:53That's your brief.