Skip to content

v2.43.0

Choose a tag to compare

@samuelgursky samuelgursky released this 10 Jun 15:49

Embeddings + similarity search — Phase C of the analysis + edit-engine program. "Find clips/shots like this," locally, with no vendor token cost.

Added

  • Schema v10 embeddings table (float32 vectors per entity/kind/model, content-hash staleness) + src/utils/embeddings.py with brute-force cosine search.
  • media_analysis actions: build_embeddings (idempotent — clip summaries, shot descriptions + deep field groups, transcript segments, sampled frames with per-shot mean vectors) and find_similar (free text, clip, or shot; kind="text"|"visual"; free-text visual queries via the CLIP text encoder).
  • Backend detection, never installation: text = ollama nomic-embed-text or sentence-transformers; visual = open_clip ViT-B-32. Diagnostics → Tools lists availability with install guidance.
  • Panel: Semantic toggle on Review search (shown when a text backend is detected), backed by /api/search/semantic.

Validation

  • Full offline suite: 1095 tests (14 new, backends mocked); 3 known live-Resolve environmental failures only.
  • Live on the real sample root: 54 text vectors in 1.2s via ollama with correct top hits for three editorial queries; 27 CLIP vectors with "cracked broken windshield glass" ranking the shattered-windshield frame first; panel endpoint verified; screenshots regenerated.