Bug 505212

Summary: Faces read from xmp data is not shown correctly
Product: [Applications] digikam Reporter: MassimoS <massimo>
Component: Faces-RecognitionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.7.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 8.7.0
Sentry Crash Report:
Attachments: settings 1
settings 2
settings 3
test data 1
test data 2
test data 3
test data 4

Description MassimoS 2025-06-04 16:47:57 UTC
SUMMARY
I wrote the face data from lightroom to the file XMP data (region, type face) as well as metadata Subject, HierarchicalSubject, Keyword, PersonInPicture 
Digikam reads the metadata but the faces are not shown in the picture,
there is a tag under person but no are shown on the image
in some cases there is not even the person on the image

STEPS TO REPRODUCE
1. tag pictures with face info and region
2. add to library
3. check face data

OBSERVED RESULT
tags under people, no faces
no face box in the picture

EXPECTED RESULT
data to be imported correctly


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 MassimoS 2025-06-04 17:14:08 UTC
to check if the face regions were wrote correctly I've done:
1) create face on lightroom
2) write face data to images or XMP if raw format
3) start lightroom with a new catalog
4) import images
5) all faces appear to be imported correctly

so I do not understand why they are not correctly imported in digiKam
Comment 2 Maik Qualmann 2025-06-04 17:16:20 UTC
What are your sidecar settings in digiKam?

Maik
Comment 3 MassimoS 2025-06-04 17:45:28 UTC
Created attachment 182031 [details]
settings 1
Comment 4 MassimoS 2025-06-04 17:45:40 UTC
Created attachment 182032 [details]
settings 2
Comment 5 MassimoS 2025-06-04 17:46:00 UTC
Created attachment 182033 [details]
settings 3
Comment 6 MassimoS 2025-06-04 17:46:48 UTC
see attached files.
The images are jpg, heic, cr2 intentionally to check flat regions (heic), nested regions (jpg), and sidecar xmp files for raw format cr2
Comment 7 Maik Qualmann 2025-06-04 18:12:03 UTC
Your additional sidecar extension is incorrect (.xmp), so remove it. It won't be the cause, though. Send me a sample image + sidecar for testing.

Maik
Comment 8 MassimoS 2025-06-04 20:11:41 UTC
Created attachment 182036 [details]
test data 1

confidential - not to be disclosed - to be used only for bug resolution
Comment 9 MassimoS 2025-06-04 20:12:04 UTC
Created attachment 182037 [details]
test data 2

confidential - not to be disclosed - to be used only for bug resolution
Comment 10 MassimoS 2025-06-04 20:12:52 UTC
Created attachment 182038 [details]
test data 3

confidential - not to be disclosed - to be used only for bug resolution
Comment 11 MassimoS 2025-06-04 20:14:04 UTC
Created attachment 182039 [details]
test data 4

confidential - not to be disclosed - to be used only for bug resolution
Comment 12 MassimoS 2025-06-04 20:15:24 UTC
why you say .xmp is not correct? is the format used by Lightroom for sidecar files of raw files.
not sure I understand.
Also the correct behavior is that .xmp files are used only if the image cannot have the xmp or ipct data (i.e. raw)

I can remove it for test but no changes :)
Comment 13 caulier.gilles 2025-06-05 03:43:44 UTC
".xmp" extension for the sidecar is the default one in fact, used in standard. You don't need to append this in your settings.

The settings is to append extra sidecar extensions (and non standard).
Comment 14 Maik Qualmann 2025-06-05 05:36:03 UTC
I don't see any errors in your test images; unfortunately, an xmp file isn't included. Except for one image (20241013_151308414_iOSc.heic), which doesn't contain any face metadata, all other images have named face rectangles.

Maik
Comment 15 MassimoS 2025-06-05 07:14:55 UTC
The issue is that the images are not imported correctly, there are no rectangles in the picture nor the people is imported correctly.
The images are ok, happy to hear that.

M
Comment 16 Maik Qualmann 2025-06-05 07:42:37 UTC
I see all the face rectangles here. Have you tried rereading the metadata from the images?

If the images were already in the digiKam collection and you added the faces externally in LR, you need to enable the option to reread metadata when changes are made in the digiKam metadata settings. This option is currently disabled for you.

Maik
Comment 17 MassimoS 2025-06-05 11:01:38 UTC
I will try again and post the results.
I deleted all digikam database and configuration and restarted

M
Comment 18 MassimoS 2025-06-08 20:32:34 UTC
I had to destroy the DB and re create and now it looks like it worked :) I'll do more test
Comment 19 MassimoS 2025-06-11 17:28:35 UTC
now it appear to read the correct face boxes.