• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

How can I export people tags with associated faces to the web?

Explorer ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

I have some vintage photos (taken at least 100 years ago) that I've carefully tagged using facial recognition in Lightroom Classic CC. I'd like to share these photos with each photo tag preserved above each face with family and genealogical societies. In some cases, I have class or sports team photos, and identification of the individuals in the photo holds a great deal of value for the people I'm sharing the photos with. Is there any way of exporting people tags with associated faces to the web?

Views

6.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 26, 2021 Feb 26, 2021

Copy link to clipboard

Copied

I think I misread some of the postings about what LRc will export in terms of people's name set up with Facial Recognition. It does export the names in both and XMP and IPTC metadata tags.

Now, back to the original question " Is there any way of exporting people tags with associated faces to the web?" this thread identifies that:

  • The FaceLabellingExportLrPlugin if you want the name in the picture
  • As metadata XMP:Subject and IPTC:Keywords. However, this does not identify the name with the face.

Here's what I found from playing around. I also changed names to see how things were affected.

$ exiftool -xmp:subject -iptc:keywords S-026-T-001.jpg
Subject                         : ?, Bill, Gail, LOW RES, Richard, Rose, SLIDE
Keywords                        : ?, Bill, Gail, LOW RES, Richard, Rose, SLIDE

$ REM Change Some Name Assgigned to Faces

$ exiftool -xmp:subject -iptc:keywords S-026-T-001.jpg
Subject                         : Betsy, Bill, LOW RES, Richard, SLIDE, Sally, Shella, Sue
Keywords                        : Betsy, Bill, LOW RES, Richard, SLIDE, Sally, Shella, Sue

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 07, 2021 Mar 07, 2021

Copy link to clipboard

Copied

Hi @DS256, for well labelled image files with exif data available, I suspect you should probably be able to find what you need in the exif metadata. 

Context

The way I read this thread, I interpreted there are 2 levels of detail ... firstly just /having/ the person metadata, and secondly /visually/ showing that on an image. The second point is where I started with the LRc plug-in concept, since I had lots of carefully labelled images with person metadata in EXIF, and there are plenty of programs and online platforms where you can point at people one at a time to see who they are, but I had never found anything that allowed visual annotation of all the people on the image for publishing, whether online or in print.

As you say, LRc can include the person metadata in the image export, though it can be enabled/disabled in the export dialog settings, so needs some care to get what you need.

ExifTool and Region Metadata

You have found and used the amazingly powerful exiftool, which has both a wealth of helpful information online and an expert and active community using it and answering questions. As mentioned above, my plugin uses exiftool to access the image file metadata. I have chosen to put much of the complexity into an exiftool 'config file' (basically a bunch of exiftool supported perl code) to handle different metadata standards (e.g. Microsoft, MWG, IPTC) and the different tag names and coordinate systems that they use. I'm sure it is not the most streamlined implementation, so could well show its limitations on bulk exports, but it felt like a decent partitioning of functionality for clarity and future maintenance. See file currently named "get_regions.config" in the github repository as per link above (I won't give a file link here since I might break it in future if I do any file renaming or structuring in my FLE plugin).

In that exiftool 'config file', I also try to handle the surprisingly complicated implications of rotation and crop, and whether those have been already applied or not. I didn't find any good documentation or examples on how to handle that, beyond a few useful illustrations of what the rotation scenarios looked like, and from what I have seen I have the impression there are many variations and inconsistencies in how these fields are used in the wild. So I fully expect to find cases that I have not handled correctly.

Anyway, that is complicated background on why there isn't a one-line answer, but not yet addressing your question about names per face/person ... see the following which might help:

Examples of viewing region metadata

If you want to see all the region data, including names per face-region (if image file is appropriately labelled in metadata), then if it is in MWG format (from the 'Metadata Working Group') then you should be able to use:

exiftool <image_file> -j -XMP-mwg-rs:all

If the region data is in Microsoft format then this should help:

exiftool <image_file> -j -XMP-MP:all

Notes:

  • If exiftool isn't in your search path then include full executable path & filename
  • Insert your image file path & name in place of <image_file>
  • There is also an IPTC format which I support in config file but haven't given an example above
  • If you try to do anything with these regions, be aware that the different formats use different coordinate systems (e.g. centred vs top-left) to locate the face regions

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 14, 2023 Oct 14, 2023

Copy link to clipboard

Copied

I am developing a Plugin for Photoshop 2024 to label faces.

Download FaceTag.cxx. Open it, which should open the PlugIn installer for Photoshop and it install it in Photoshop

https://github.com/rrlyman/FaceTags/blob/dd13d531c2d5b36789a27d645c03e51fabb5a399/FaceTag.ccx

Identify the people in Lightroom Classic or some other program that writes face rectangle metadata.

Save the metadata to the files via the menu or control S (windows) or command S (Mac)

Open Photoshop 2024 and use the plug in to apply the face labels. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

To see what you have in a photo, a convenient viewer of photo metadata can be found in Adobe Bridge by right clicking on a photo file name and selecting Raw Data.
Also PhotoShop Desktop has a viewer, under the File Menu, select File Info/Raw Data

The old Microsoft Person rectangle regions metadata looks like thiis:

<MP:RegionInfo rdf:parseType="Resource">
<MPRI:Regions>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<MPReg:PersonDisplayName>Sally Armon</MPReg:PersonDisplayName>
<MPReg:Rectangle>0.192657, 0.333641, 0.035623, 0.045161</MPReg:Rectangle>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<MPReg:PersonDisplayName>Jackie Howell</MPReg:PersonDisplayName>
<MPReg:Rectangle>0.255180, 0.517512, 0.037804, 0.047926</MPReg:Rectangle>
</rdf:li>

The MetaData Working Group Person rectangles that Adobe uses looks like this:

<mwg-rs:AppliedToDimensions rdf:parseType="Resource">
<stDim:w>2751</stDim:w>
<stDim:h>2170</stDim:h>
<stDim:unit>pixel</stDim:unit>
</mwg-rs:AppliedToDimensions>
<mwg-rs:RegionList>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<mwg-rs:Rotation>0.00000</mwg-rs:Rotation>
<mwg-rs:Name>Sally Armon</mwg-rs:Name>
<mwg-rs:Type>Face</mwg-rs:Type>
<mwg-rs:Area rdf:parseType="Resource">
<stArea:h>0.04516</stArea:h>
<stArea:w>0.03562</stArea:w>
<stArea:x>0.21047</stArea:x>
<stArea:y>0.35622</stArea:y>
</mwg-rs:Area>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<mwg-rs:Rotation>0.00000</mwg-rs:Rotation>
<mwg-rs:Name>Jackie Howell</mwg-rs:Name>
<mwg-rs:Type>Face</mwg-rs:Type>
<mwg-rs:Area rdf:parseType="Resource">
<stArea:h>0.04793</stArea:h>
<stArea:w>0.03780</stArea:w>
<stArea:x>0.27408</stArea:x>
<stArea:y>0.54148</stArea:y>
</mwg-rs:Area>

In Microsoft, x and y coordinates are the upper left of the rectangle. In Adobe, the x and y coordinates are the middle of the rectangle.

In Lightroom Classic, if the person is unidentified, showing a ? on the rectangle, then the Name entry will be absent from the RegionList but the rectangle will still be there.

In Lightroom Classic, if the Person recognition is not being written into the photo file, use ctrl S (windows) or cmd S (Mac)

There is a conversion file for switching between Microsoft and Adobe here:
https://github.com/exiftool/exiftool/blob/master/config_files/convert_regions.config

My Face Tagging plug for Photoshop Desktop can be found here:
https://github.com/rrlyman/FaceTags
Download and double click the .ccx file to install the plugin for Photoshop.
tagMetadata.js reads the Adobe version of the metadata showing 2 ways to read, XMPFile or batchPlay

Key features of the Facetags plugin are:
-Leave each person's Name Tag in a separate layer or merge them together into one.
-Portrait mode, puts the original photo on the top of the page and a grayed out annotated version on the bottom half of the page
-Set the text and border colors
-Batch or single photo tagging.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

LATEST

@richard27766762y1wb   You are a genius. Out of interest I tried your Plugin and it works wonderfully. It will fill a need for many that want to document names for geneaology purposes.

 

Regards. My System: Lightroom-Classic 13.2 Photoshop 25.5, ACR 16.2, Lightroom 7.2, Lr-iOS 9.0.1, Bridge 14.0.2, Windows-11.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines