[PR #6455] [MERGED] feat(server): Import face regions from metadata #11191

Closed
opened 2026-02-05 14:35:02 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/6455
Author: @bugfest
Created: 1/17/2024
Status: Merged
Merged: 9/5/2024
Merged by: @mertalev

Base: mainHead: faces-from-metadata


📝 Commits (10+)

  • eca76ff feat: faces-from-metadata - Import face regions from metadata
  • 72662f8 chore(web): remove unused file confirm-enable-import-faces
  • 260477e chore(web): format metadata-settings
  • 3506bba fix(server): faces-from-metadata tests and format
  • c9c85e1 fix(server): code refinements, nullable face asset sourceType
  • 4dc738e fix(server): Add RegionInfo to ImmichTags interface
  • bfd601c fix(server): deleteAllFaces sourceType param can be undefined
  • cda160f fix(server): exiftool-vendored 27.0.0 moves readArgs into ExifToolOptions
  • c534237 fix(server): rename isImportFacesFromMetadataEnabled to isFaceImportEnabled
  • ba0ab48 fix(server): simplify sourceType conditional

📊 Changes

48 files changed (+1058 additions, -96 deletions)

View changed files

📝 e2e/src/api/specs/asset.e2e-spec.ts (+64 -0)
📝 e2e/src/api/specs/server-info.e2e-spec.ts (+1 -0)
📝 e2e/src/api/specs/server.e2e-spec.ts (+1 -0)
📝 e2e/test-assets (+1 -1)
📝 mobile/openapi/README.md (+3 -0)
📝 mobile/openapi/lib/api.dart (+3 -0)
📝 mobile/openapi/lib/api_client.dart (+6 -0)
📝 mobile/openapi/lib/api_helper.dart (+3 -0)
📝 mobile/openapi/lib/model/asset_face_response_dto.dart (+20 -3)
📝 mobile/openapi/lib/model/asset_face_without_person_response_dto.dart (+20 -3)
📝 mobile/openapi/lib/model/server_features_dto.dart (+9 -1)
mobile/openapi/lib/model/source_type.dart (+85 -0)
📝 mobile/openapi/lib/model/system_config_dto.dart (+9 -1)
mobile/openapi/lib/model/system_config_faces_dto.dart (+98 -0)
mobile/openapi/lib/model/system_config_metadata_dto.dart (+98 -0)
📝 open-api/immich-openapi-specs.json (+43 -0)
📝 open-api/typescript-sdk/src/fetch-client.ts (+14 -0)
📝 server/src/config.ts (+10 -0)
📝 server/src/cores/storage.core.ts (+1 -1)
📝 server/src/dtos/person.dto.ts (+4 -0)

...and 28 more files

📄 Description

Implements #1692 feature request

OpenAPI spec changes to accommodate metadata face import configs. New settings to enable the feature (disabled by default).

Proposed solution

  • Metadata existing parser extension
  • Does not require immich-machine-learning (but both features can coexist)
  • Supports multiple formats (e.g. Digikam, Adobe)
  • Creates new faces entries from the imported asset Exif data.
  • Creates new persons using the Exif face tag

Process

digiKam

Setup:

  • Preferences > Metadata: "Behavior" tab. Go to the subsection titled "Write this information to the metadata" and enable "Face Tags (including face areas)".
  • Preferences > Metadata: "Sidecars" tab. Go to the subsection titled "Reading and writing to sidecars" and enable "write to sidecar files": "Write to XMP sidecar only".

Face(s) creation:

  • Open picture(s) and add faces

XMP export:

  • Tools> Maintenance: "sync metadata and database": "from database to image metadata"

Immich:

  • Enable Metadata Import faces
    Administration > Settings > Metadata Settings > "Import faces from metadata". Toggle the "Enabled" switch and click "Save".
  • Run job metadata sync
    Administration > Jobs > Extract Metadata: All

Current limitations / Warnings

  • Only tested with faces in metadata created by digikam

Future work


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/6455 **Author:** [@bugfest](https://github.com/bugfest) **Created:** 1/17/2024 **Status:** ✅ Merged **Merged:** 9/5/2024 **Merged by:** [@mertalev](https://github.com/mertalev) **Base:** `main` ← **Head:** `faces-from-metadata` --- ### 📝 Commits (10+) - [`eca76ff`](https://github.com/immich-app/immich/commit/eca76fff66b54097a2037dd7c1a47e516b8e1b1f) feat: faces-from-metadata - Import face regions from metadata - [`72662f8`](https://github.com/immich-app/immich/commit/72662f8650d37c30ad731ab7203b0457f2f85af1) chore(web): remove unused file confirm-enable-import-faces - [`260477e`](https://github.com/immich-app/immich/commit/260477e787f4721e3d3dcb4d25ab4feb4bccd496) chore(web): format metadata-settings - [`3506bba`](https://github.com/immich-app/immich/commit/3506bba39b7c75effbaa6ba903f8509faf3aae43) fix(server): faces-from-metadata tests and format - [`c9c85e1`](https://github.com/immich-app/immich/commit/c9c85e115d5ebc2d46fcc80d474ae8736b0810d9) fix(server): code refinements, nullable face asset sourceType - [`4dc738e`](https://github.com/immich-app/immich/commit/4dc738ecaf91314910ea0e1aa3ed4d9327b15bab) fix(server): Add RegionInfo to ImmichTags interface - [`bfd601c`](https://github.com/immich-app/immich/commit/bfd601c594308a09f3ccea25963230cd4bc3e8a0) fix(server): deleteAllFaces sourceType param can be undefined - [`cda160f`](https://github.com/immich-app/immich/commit/cda160fb24aa7b1676ad3743d502b7e8fdeb40a9) fix(server): exiftool-vendored 27.0.0 moves readArgs into ExifToolOptions - [`c534237`](https://github.com/immich-app/immich/commit/c5342378c948f488ddd47241b6ed879a7d8f2b3f) fix(server): rename isImportFacesFromMetadataEnabled to isFaceImportEnabled - [`ba0ab48`](https://github.com/immich-app/immich/commit/ba0ab48ca6368fc46a12380f3d1e352a29b9c535) fix(server): simplify sourceType conditional ### 📊 Changes **48 files changed** (+1058 additions, -96 deletions) <details> <summary>View changed files</summary> 📝 `e2e/src/api/specs/asset.e2e-spec.ts` (+64 -0) 📝 `e2e/src/api/specs/server-info.e2e-spec.ts` (+1 -0) 📝 `e2e/src/api/specs/server.e2e-spec.ts` (+1 -0) 📝 `e2e/test-assets` (+1 -1) 📝 `mobile/openapi/README.md` (+3 -0) 📝 `mobile/openapi/lib/api.dart` (+3 -0) 📝 `mobile/openapi/lib/api_client.dart` (+6 -0) 📝 `mobile/openapi/lib/api_helper.dart` (+3 -0) 📝 `mobile/openapi/lib/model/asset_face_response_dto.dart` (+20 -3) 📝 `mobile/openapi/lib/model/asset_face_without_person_response_dto.dart` (+20 -3) 📝 `mobile/openapi/lib/model/server_features_dto.dart` (+9 -1) ➕ `mobile/openapi/lib/model/source_type.dart` (+85 -0) 📝 `mobile/openapi/lib/model/system_config_dto.dart` (+9 -1) ➕ `mobile/openapi/lib/model/system_config_faces_dto.dart` (+98 -0) ➕ `mobile/openapi/lib/model/system_config_metadata_dto.dart` (+98 -0) 📝 `open-api/immich-openapi-specs.json` (+43 -0) 📝 `open-api/typescript-sdk/src/fetch-client.ts` (+14 -0) 📝 `server/src/config.ts` (+10 -0) 📝 `server/src/cores/storage.core.ts` (+1 -1) 📝 `server/src/dtos/person.dto.ts` (+4 -0) _...and 28 more files_ </details> ### 📄 Description Implements #1692 feature request OpenAPI spec changes to accommodate metadata face import configs. New settings to enable the feature (disabled by default). # Proposed solution - Metadata existing parser extension - Does not require immich-machine-learning (but both features can coexist) - Supports multiple formats (e.g. Digikam, Adobe) - Creates new faces entries from the imported asset Exif data. - Creates new persons using the Exif face tag # Process ## digiKam Setup: - Preferences > Metadata: "Behavior" tab. Go to the subsection titled "Write this information to the metadata" and enable "Face Tags (including face areas)". - Preferences > Metadata: "Sidecars" tab. Go to the subsection titled "Reading and writing to sidecars" and enable "write to sidecar files": "Write to XMP sidecar only". Face(s) creation: - Open picture(s) and add faces XMP export: - Tools> Maintenance: "sync metadata and database": "from database to image metadata" Immich: - Enable Metadata Import faces Administration > Settings > Metadata Settings > "Import faces from metadata". Toggle the "Enabled" switch and click "Save". - Run job metadata sync Administration > Jobs > Extract Metadata: All # Current limitations / Warnings - Only tested with faces in metadata created by digikam # Future work - Manage ML/Exif face duplicates - see https://github.com/immich-app/immich/pull/6455/#discussion_r1697659582 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:35:02 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#11191