Bug 461853

Summary: MS People Tags with no face region are not read when image contains face rectangles with no names associated.
Product: [Applications] digikam Reporter: José Oliver-Didier <jose_oliver>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.9.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 8.0.0
Sentry Crash Report:
Attachments: Sample File

Description José Oliver-Didier 2022-11-15 02:56:23 UTC
SUMMARY
***
MS People Tags with no face region are not read when image contains face rectangles with no names associated.
***

STEPS TO REPRODUCE
1.  Load attached sample file - test.jpg

OBSERVED RESULT
- No digikam people tag is generated, even though the MS People Tag "Mildred" is contained in the file.

EXPECTED RESULT
- People tag with no face region associated "Mildred" is read.

SOFTWARE/OS VERSIONS
Windows 11

ADDITIONAL INFORMATION
- I replaced the image file / xmp block with another image given that the original had faces I wish to respect their privacy.
- The MS People Tag XMP list block in the sample file is as follows. Note that there are empty face regions, and a name  (PersonDisplayName) "Mildred" with no face associated. This behavior is completely valid in the MS People Tag spec and was created using MS Windows Photo Gallery.

   <MPRI:Regions>
    <rdf:Bag>
     <rdf:li rdf:parseType='Resource'>
      <MPReg:Rectangle>0.161719, 0.117233, 0.021094, 0.031653</MPReg:Rectangle>
     </rdf:li>
     <rdf:li rdf:parseType='Resource'>
      <MPReg:Rectangle>0.277344, 0.055100, 0.020313, 0.030481</MPReg:Rectangle>
     </rdf:li>
     <rdf:li rdf:parseType='Resource'>
      <MPReg:Rectangle>0.385937, 0.113716, 0.039844, 0.059789</MPReg:Rectangle>
     </rdf:li>
     <rdf:li rdf:parseType='Resource'>
      <MPReg:PersonDisplayName>Mildred</MPReg:PersonDisplayName>
      <MPReg:PersonSourceID>FB:123456789</MPReg:PersonSourceID>
     </rdf:li>
    </rdf:Bag>
   </MPRI:Regions>
Comment 1 José Oliver-Didier 2022-11-15 02:57:05 UTC
Somewhat inversely related to Bug 432048.
Comment 2 José Oliver-Didier 2022-11-15 03:01:11 UTC
Created attachment 153755 [details]
Sample File
Comment 3 José Oliver-Didier 2022-11-15 03:10:16 UTC
Hmm now this is odd... I closed and re-launched Digikam and clicked on the "Reread Metadata from the File" and the people's names are being read correctly. Curiously the group of images have similar conditions. Might be time forcing Digikam to re-sync all file metadata to the db.