Bug 505483 - Issue with recognition of faces on a collection with already face data
Summary: Issue with recognition of faces on a collection with already face data
Status: RESOLVED DUPLICATE of bug 472266
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Recognition (other bugs)
Version First Reported In: 8.7.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-11 17:26 UTC by MassimoS
Modified: 2025-06-11 18:09 UTC (History)
1 user (show)

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


Attachments
people tag list - 001 (38.70 KB, image/jpeg)
2025-06-11 17:26 UTC, MassimoS
Details
faces under the same name all automatically confirmed (103.51 KB, image/jpeg)
2025-06-11 17:27 UTC, MassimoS
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MassimoS 2025-06-11 17:26:47 UTC
Created attachment 182190 [details]
people tag list - 001

SUMMARY
I’ve mapped more or less 100 people I’m interested in with lightroom, then I wrote all those info in the images in the XMP data so that I have the name/hierarchy and the region.
I’ve imported the pictures in a new database in digiKam and the result is a total mess.
the contact structure is messed up: I have tags outside of the hierarchy: see attachment 001 [details]

it screwed up all faces putting tens or hundreds of faces under a name as Confirmed when they are not, this should be all the same face :frowning:
(I'll attach a second one ) 

this is a MESS no face identical

It appears the face recognition algorithm is not trained correctly and it add all random faces as confirmed

Also the tags are not imported correctly as some of them are out of the correct tree structure

STEPS TO REPRODUCE
1. create a library of images with faces, saved as Region in XMP data
2. hierarchical subject and PeopleInPicture tags are populated
3. add folder to digiKam

OBSERVED RESULT
1) hundreds of wrong faces as confirmed in existing tags
2) tags not imported correctly


EXPECTED RESULT
1) confirmed faces to be imported
2) AI to be trained on confirmed faces
3) new faces proposed for confirmation after training
4) people tag in pictures imported correctly

SOFTWARE/OS VERSIONS
Windows: Windows 11 - latest

ADDITIONAL INFORMATION
Comment 1 MassimoS 2025-06-11 17:27:15 UTC
Created attachment 182191 [details]
faces under the same name all automatically confirmed
Comment 2 Maik Qualmann 2025-06-11 17:53:04 UTC
When you import images with faces, face matrices are not automatically created for performance reasons. You must rebuild the training database in the maintenance tool.

Maik
Comment 3 MassimoS 2025-06-11 17:57:38 UTC
Mike,
I marked it as grave as after I imported the images I was not able to re create the matrices as the "confirmed" faces were totally messed up.
I understood the matrices are built on the confirmed faces, am I right?

Now I've deleted all images as their metadata was overwritten by digikam, I'm copying them again and checking that confirmed faces are written in the xmp metadata.
then will import in digiKam and will check if the faces are correct then will run the matrice creation.

is it ok?
Comment 4 Maik Qualmann 2025-06-11 18:01:03 UTC
You don't need to delete any metadata at all, just rebuild the training database for the faces.

https://docs.digikam.org/en/maintenance_tools/maintenance_faces.html#

Maik
Comment 5 MassimoS 2025-06-11 18:03:57 UTC
but if I rebuild it it will use wrong faces as confirmed, if you look at the image almost all the faces are wrong, you can see they are not the same person.
From the documentation " Use this to clear all training data from the face recognition database and rebuild it using the face tag thumbnails. This is useful if you have changed the face tag regions on several images, or if the recognition process isn’t returning as many results as you expect."
I cannot use it.
I need to import the images with the correct face tags and then rebuild the training database before Digikam marks hundreds of random faces as confirmed
Comment 6 Maik Qualmann 2025-06-11 18:05:29 UTC
And we already have Bug 472266 on this issue.

Maik

*** This bug has been marked as a duplicate of bug 472266 ***
Comment 7 Maik Qualmann 2025-06-11 18:08:24 UTC
You should not run background face recognition when importing images with faces.

Maik
Comment 8 MassimoS 2025-06-11 18:09:33 UTC
ok,
I'll disable it