fix(workers/people): add HEIC decode support via pillow-heif #945

Merged
chris merged 2 commits from fix/people-heif-support into main 2026-09-28 19:21:46 +02:00
Owner

Summary

  • workers/people could not decode HEIC (missing pillow-heif → PIL.UnidentifiedImageError) so discovery_people failed for all image/heic items — 1,686 active HEIC photos never had face detection (ISSUE-073, surfaced as 743 terminal failures during the PR#942 EXIF migration).
  • Adds pillow-heif>=0.21,<1 (same pin as workers/ml), registers the opener once at face_model import time — covering both the detection path and the embedding-backfill path (main.py imports face_model), mirroring the workers/ml pattern.
  • CI smoke job installs pillow-heif; two new tests (plain HEIC decode + orientation-6 HEIC vs pre-rotated equivalence, camera-realistic irot-style fixture) prove the PR#942 EXIF fix composes with HEIC.

Tests

  • PYTHONPATH=src python3 -m pytest -q tests → 109 passed (107 + 2 new). Fail-proof verified: new tests fail without the change.
  • Note: pillow-heif ≥0.13 resets the EXIF orientation flag at decode (libheif applies irot/imir during decode) — camera-realistic files decode into the display frame, so the existing exif_transpose stays correct. Flag-only HEICs (no irot box, non-camera re-encodes) are a known latent gap, documented in the test helper docstring.

Resolves the people-worker part of ISSUE-073.

## Summary - workers/people could not decode HEIC (missing pillow-heif → PIL.UnidentifiedImageError) so `discovery_people` failed for all image/heic items — 1,686 active HEIC photos never had face detection (ISSUE-073, surfaced as 743 terminal failures during the PR#942 EXIF migration). - Adds `pillow-heif>=0.21,<1` (same pin as workers/ml), registers the opener once at `face_model` import time — covering both the detection path and the embedding-backfill path (main.py imports face_model), mirroring the workers/ml pattern. - CI smoke job installs pillow-heif; two new tests (plain HEIC decode + orientation-6 HEIC vs pre-rotated equivalence, camera-realistic irot-style fixture) prove the PR#942 EXIF fix composes with HEIC. ## Tests - `PYTHONPATH=src python3 -m pytest -q tests` → 109 passed (107 + 2 new). Fail-proof verified: new tests fail without the change. - Note: pillow-heif ≥0.13 resets the EXIF orientation flag at decode (libheif applies irot/imir during decode) — camera-realistic files decode into the display frame, so the existing exif_transpose stays correct. Flag-only HEICs (no irot box, non-camera re-encodes) are a known latent gap, documented in the test helper docstring. Resolves the people-worker part of ISSUE-073.
chore: version bump 1.21.56
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 6s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 6m0s
4a14b0c423
chris merged commit 590b660b8a into main 2026-09-28 19:21:46 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!945
No description provided.