Bug 514156

Summary: Face Tags are not unique (Problem with unique assignment to image tags)
Product: [Applications] digikam Reporter: Andreas <Pandy_90>
Component: generalAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin, Pandy_90
Priority: NOR    
Version First Reported In: 8.7.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 9.0.0
Sentry Crash Report:

Description Andreas 2026-01-04 18:32:16 UTC
SUMMARY

Face Tags are not unique, since only the display name is stored and not the (nested) tag-name.

- In image metadata (XMP/MWG regions), face regions only store a display string, typically:
    - RegionPersonDisplayName = "Anna"
- The full hierarchical tag path is not stored (e.g. Family_A/Anna vs Family_B/Anna)

- When multiple tags share the same leaf name (Anna), the metadata becomes ambiguous
    - When DigiKam reads the file back, it:
    - Sees only "Anna"
    - Resolves it to the most recently used or last-created tag
    - Result: both faces get assigned to Family_B/Anna

- it would be create, that the display name is replaced by the tag name or the tag name is stored additionally for each face box

STEPS TO REPRODUCE
1. create two image tags Family_A/Anna and Family_B/Anna
2. add one face tag Family_A/Anna in image and a second face tag Family_B/Anna

OBSERVED RESULT

both face tags are assigned to Family_B/Anna
- face_tag1: Family_B/Anna
- face_tag2: Family_B/Anna

EXPECTED RESULT

- face_tag1: Family_A/Anna
- face_tag2: Family_B/Anna

SOFTWARE/OS VERSIONS
Linux/Ubuntu 24.04
Digikam 8.7.0
Comment 1 Maik Qualmann 2026-01-04 18:43:21 UTC
In digiKam-9.0.0, we added the feature that assigns a face name to the tag path in the image.

If the name appears twice with two different tag paths, it's impossible to reconstruct which face name belongs to which tag path.

Face names are stored in the metadata without a hierarchy.

Maik
Comment 2 Andreas 2026-01-04 19:16:30 UTC
   Thank you for your information. FYI: Why are face tags stored without
   a hierachy in the metadata? This should solve this issue quickly! Best
   regardsAndreas*Gesendet: *Sonntag, 4. Januar 2026 um 19:43*Von: *"Maik
   Qualmann" <bugzilla_noreply@kde.org>*An: *Pandy_90@gmx.net*Betreff: *[digikam]
   [Bug 514156] Face Tags are not unique (Problem with unique assignment
   to image tags)https://bugs.kde.org/show_bug.cgi?id=514156

   Maik Qualmann <metzpinguin@gmail.com> changed:

   What |Removed |Added
   ----------------------------------------------------------------------------
   CC| |metzpinguin@gmail.com

   --- Comment #1 from Maik Qualmann <metzpinguin@gmail.com> ---
   In digiKam-9.0.0, we added the feature that assigns a face name to the
   tag path
   in the image.

   If the name appears twice with two different tag paths, it's
   impossible to
   reconstruct which face name belongs to which tag path.

   Face names are stored in the metadata without a hierarchy.

   Maik

   --
   You are receiving this mail because:
   You reported the bug.
   You are on the CC list for the bug.
Comment 3 Maik Qualmann 2026-01-04 19:43:08 UTC
Neither XMP/MWG nor WLPG (Microsoft) store a tag path. The metadata standard only specifies a name, not a path. Well, some people didn't think that through.

We can't change it; it would be incompatible with all other programs.

Your only option is to either add Anna's last name or something similar.

Maik