Faces in archive videos: frames through the photos' engine, appearances in the same face groups #72

Merged
spark merged 1 commits from task/archive-video-faces into main 2026-10-20 20:33:19 +01:00
Owner

Faces in archive videos, the photos' way (docs/archive.md, "Faces in videos").

  • Face worker (after the photos, one video at a time): ARCHIVE_VIDEO_FACE_FPS frames a second (default 5) from the web copy, a minute at a time, each analysed by the same engine and filters as a photo. The same face in consecutive frames is one appearance (video_faces: start, end, clearest frame kept at 960 px, mean of the sharp embeddings); glimpses under half a second are dropped.
  • Appearances join the event's face groups with groupEvent's rule (batched, own short transactions), so suggestions, confirming, "não é", false positives, recognition off and merging are the photos' own. joinSamePerson / merge move them with the photos' faces.
  • Robust runs: progress touched per part, stale runs requeued every 10 min (30 min untouched), failed ones after 6 h, a stopping worker puts the video back; a run superseded meanwhile (folder moved, copy made again) writes nothing. A folder getting an event (also from none) has its videos' faces looked for again.
  • Viewers: "Rever rostos" shows video appearances beside photo faces (rights: every folder of the group's photos and videos); gallery videos carry who appears and when, the player jumps to each moment; a person's page lists their videos. Frames by signed URL /v1/files/video-faces/:id (published folders only).
  • Migration 20261020190000_archive_video_faces: adds a column, a table and indexes; queues the videos already made where face recognition is on. Nothing is deleted.

Tests: API 335 passed (new: track unit tests, end-to-end faces in videos with a photo in the same group, a 65 s video read in parts, superseded/stopped runs). Site: typecheck, tests, next build; screens checked on desktop and phone. Reviewed by a separate agent; its findings are fixed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo

Faces in archive videos, the photos' way (docs/archive.md, "Faces in videos"). - Face worker (after the photos, one video at a time): `ARCHIVE_VIDEO_FACE_FPS` frames a second (default 5) from the web copy, a minute at a time, each analysed by the same engine and filters as a photo. The same face in consecutive frames is one appearance (`video_faces`: start, end, clearest frame kept at 960 px, mean of the sharp embeddings); glimpses under half a second are dropped. - Appearances join the event's face groups with `groupEvent`'s rule (batched, own short transactions), so suggestions, confirming, "não é", false positives, recognition off and merging are the photos' own. `joinSamePerson` / `merge` move them with the photos' faces. - Robust runs: progress touched per part, stale runs requeued every 10 min (30 min untouched), failed ones after 6 h, a stopping worker puts the video back; a run superseded meanwhile (folder moved, copy made again) writes nothing. A folder getting an event (also from none) has its videos' faces looked for again. - Viewers: "Rever rostos" shows video appearances beside photo faces (rights: every folder of the group's photos and videos); gallery videos carry who appears and when, the player jumps to each moment; a person's page lists their videos. Frames by signed URL `/v1/files/video-faces/:id` (published folders only). - Migration `20261020190000_archive_video_faces`: adds a column, a table and indexes; queues the videos already made where face recognition is on. Nothing is deleted. Tests: API 335 passed (new: track unit tests, end-to-end faces in videos with a photo in the same group, a 65 s video read in parts, superseded/stopped runs). Site: typecheck, tests, next build; screens checked on desktop and phone. Reviewed by a separate agent; its findings are fixed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
spark added 1 commit 2026-10-20 20:29:38 +01:00
Find faces in archive videos the photos' way: frames through the same engine, appearances in the same face groups.
ci / rust (pull_request) Successful in 3m55s
ci / typescript (pull_request) Failing after 8m33s
6a5c3044f7
The face worker (after the photos, one video at a time) takes ARCHIVE_VIDEO_FACE_FPS frames a second (default 5) out
of a video's web copy and analyses each with the same engine and filters as a photo. The same face in consecutive
frames is one appearance (video_faces: start, end, its clearest frame, the mean of its sharp embeddings), and goes
into the event's face groups by groupEvent, so suggestions, confirming, "não é", false positives, recognition off and
merging are the photos' own.

Viewers: "Rever rostos" shows a group's video appearances beside its photos' faces (rights: every folder its photos
and videos are in); the gallery's videos say who appears and when, and the player jumps there; a person's page lists
the videos they are in, with each moment. Existing videos are queued where face recognition is on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SC7s5gwdivkoBXbRGxbnAo
paperclip-review-bot left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
founding-engineer left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
devops-engineer left a comment
Member

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success (gitea_auto_approve_open_prs_once.py)
spark scheduled this pull request to auto merge when all checks succeed 2026-10-20 20:33:18 +01:00
spark merged commit 99104abcf2 into main 2026-10-20 20:33:19 +01:00
Sign in to join this conversation.