Bug 498320 - Renaming a face tag fails to move over the training data
Summary: Renaming a face tag fails to move over the training data
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 8.5.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-06 15:02 UTC by Steven Robbins
Modified: 2025-01-31 18:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Robbins 2025-01-06 15:02:45 UTC
I have encountered situations where I wanted to change the tag name for a person.  For example, I have started a tag with their first name and later changed to First+Last.  Or I accidentally entered a trailing space -- e.g. "Steve " -- that I later changed to "Steve".  In either case, it was easy enough to rename the tag using the People tag, selecting the desired tag and selecting  "Properties" from the right-click context menu.

The bug is that after a further round of face recognition, the old tag name reappears.

Michael Miller supplied a workaround: Retrain your face DB by going to Tools->Maintenance->Detect and Recognize Faces.  Select “Rebuild all training data” and click ok.

https://mail.kde.org/pipermail/digikam-users/2024-December/036856.html




SUMMARY


STEPS TO REPRODUCE
1. Create people tag "A"
2. Detect some faces of A
3. Rename "A" --> "B"
4. Re-run detection 

OBSERVED RESULT
At step 4, people tag "B" reappears.

EXPECTED RESULT
At step 4, only people tag "B" is present.
Comment 1 Michael Miller 2025-01-06 15:19:50 UTC
(In reply to Steven Robbins from comment #0)
> I have encountered situations where I wanted to change the tag name for a
> person.  For example, I have started a tag with their first name and later
> changed to First+Last.  Or I accidentally entered a trailing space -- e.g.
> "Steve " -- that I later changed to "Steve".  In either case, it was easy
> enough to rename the tag using the People tag, selecting the desired tag and
> selecting  "Properties" from the right-click context menu.
> 
> The bug is that after a further round of face recognition, the old tag name
> reappears.
> 
> Michael Miller supplied a workaround: Retrain your face DB by going to
> Tools->Maintenance->Detect and Recognize Faces.  Select “Rebuild all
> training data” and click ok.
> 
> https://mail.kde.org/pipermail/digikam-users/2024-December/036856.html
> 
> 
> 
> 
> SUMMARY
> 
> 
> STEPS TO REPRODUCE
> 1. Create people tag "A"
> 2. Detect some faces of A
> 3. Rename "A" --> "B"
> 4. Re-run detection 
> 
> OBSERVED RESULT
> At step 4, people tag "B" reappears.
> 
> EXPECTED RESULT
> At step 4, only people tag "B" is present.

Hi Steve,
I'll look at the root cause next week.  It will be fixed in 8.6.0.

Cheers,
Mike
Comment 2 Michael Miller 2025-01-31 18:45:49 UTC
Git commit 13fbc1ae5309e5dbd6b1ef24244f3f486ca45d97 by Michael Miller.
Committed on 31/01/2025 at 18:45.
Pushed by michmill into branch 'master'.

498320 - Renaming a face tag fails to move over the training data
FIXED-IN: 8.6.0

M  +12   -0    .gitignore
M  +1    -1    NEWS
M  +5    -0    core/libs/facesengine/common/identity.cpp
M  +2    -0    core/libs/facesengine/common/identity.h
M  +34   -0    core/libs/facesengine/recognition/identityprovider.cpp
M  +6    -1    core/libs/facesengine/recognition/identityprovider.h
M  +9    -3    core/libs/tags/engine/tagmodificationhelper.cpp

https://invent.kde.org/graphics/digikam/-/commit/13fbc1ae5309e5dbd6b1ef24244f3f486ca45d97