Suggested Update to PhotoTaggingGramplet to Support XMP Face Regions

I manage all my image metadata and face tags in DigiKam and then add the photos to Gramps. Currently, Gramps doesn’t read the XMP Face regions embedded in the image files. I use the Windows AIO and therefore can’t use face detection. So I have been left to manually redraw the regions and tag people.

I found this support topic - 0007442: [PhotoTagging] Read face metadata created by Digikam (KDE) from image (jpg) XMP metadata and autolink to persons - Gramps - Bugtracker – Free Genealogy Software and I’ve been expanding on some programming that was in the discussion. The code in the discussion was never added to the Gramplet. While the ticket requests reading XMP Face tags and Autolinking to persons, I am focusing only on reading the Face Tags. I am not endeavoring to Auto-link.

Currently,

  • I have integrated the code into the Gramps5.1 PhotoTaggingGramplet. (Add support XMP-mwg-rs regions in PhotoTaggingGramplet · gramps-project/addons-source@eb04653 · GitHub)
  • The XMP Regions will be visible if there are no regions already defined in Gramps for an image. If a user has already tagged an image manually, the XMP Regions are not displayed so as not to confuse the user.
  • I have added a new column that shows the “XMP Region Name” defined in the image file.
  • I have made the columns (Person, Age, XMP Region Name) resizable and allow the order to be changed. I think this makes comparing the ‘XMP Region Name’ to the Person easier.
  • I have only tested in on Gramps 5.1.3 / Windows 10 AIO.

This a screen capture of the interface when an image with XMP Regions is loaded and has not yet been tagged in Gramps.

I am hoping this may be useful to other users and I am looking for guidance on how to proceed with contributing to the Gramplet. I have read the developing addons section of the wiki and it seems focused on new add-ons rather than contributing to existing addons.

Thanks for any guidance you can provide.
Bruce.

4 Likes

Do you know if the Digicam regions are supported more widely? Do other programs generate these as well?

This seems like a great idea, especially if more programs will support this in the future. Please make this into a PR, so we can get it integrated to the addon for everyone’s use.

There’s a mention of XMP data in the Edit Image Exif Metadata Gramplet. Perhaps it could be adapted?

I’ve never used that or the Image Metadata Gramplet. (The GExiv2 for Image metadata prerequisite documentation was fairly convoluted.)

Interesting.

We could also add the XMP file (which is a standard format for photo management tools - ligthroom, darktable and others) that DigiKam generates among the gramps media. This xmp media could be associated with a source and a citation (eg Automatic recognition on a given date of the faces on the photo representing xxxxx, validated by xyz). The citation would then be applied to the photo media from which the clipping of individuals comes out while transporting it with the media of this source.

  • It would allow to have a more standardized “photo” file (xmp) than the gramps xml file associated with this photo media.
  • It would fill the gedcom gap which does not convey (I’m not sure) the notion of coordinates of people (or signatures) on the image. There they would be included through the source represented by the xmp file.

Yes. The regions are part of a larger metadata standard and are not proprietary or unique to DigiKam. Other programs do support this. Lightroom, Darktable, I believe Piscasa did. The tags are read by tools like exiftool and Exiv2.

I had not considered that the data may be in a sidecar XMP file. That’s a good point. I will look into it reading the data from a sidecar file, if it exists.

On your other idea, you are way ahead of me in understanding Gramps and how everything relates.

I’ve just reviewed the GExiv2 documentation and run a quick test and Gexiv2 doesn’t appear to support reading XMP data from sidecar files, only data embedded directly in the image. So I have gone ahead with the PR#478 (Add support for XMP-mwg-rs Regions in Image Files - Maintenance/gramps51 by brucejackson · Pull Request #478 · gramps-project/addons-source · GitHub)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.