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

Automatically tag and export people

Participant ,
Jun 12, 2023 Jun 12, 2023

I want to use LR to find the number of people in my photos so that I can use it (the people count) outside LR.

 

This is the process I envision.

 

:white_heavy_check_mark: LR can find faces (I am fine with LR finding only people with visible face)

:white_heavy_check_mark: LR can convert people to keywords by their name

:cross_mark: I have to manually name people even though I do not care about the specific name

:white_heavy_check_mark: LR can export people keywords, which can be counted by some external script to get people count

 

Even though the process is not as straightforward as it could be (for example write people count to metadata), it works and can be somewhat automated.

The only missing step is automatically naming people. As far as I know, I have to name them manually which is impossible to do efficiently if you have 1000 group photos. I would be naming 1000+ people tags.

 

Does anybody know of a way to name people automatically? I do not care about the names - it can be p1, p2,... and I don't care if one person is named twice. All I care about is people count per photo.

 

Or any other workflow that would work for this?

TOPICS
Experiment , macOS , SDK , Windows
1.5K
Translate
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

correct answers 1 Correct answer

LEGEND , Jun 12, 2023 Jun 12, 2023

"Are you sure, that LR stores the untagged regions directly in the XMP?"

 

Yes. For exported photos, uncheck the export option Metadata > Remove Person Info and select Include: All Metadata.  If you're accessing the original photos, select them and do Metadata > Save Metadata To File or select Catalog Settings > Metadata > Automatically Write Changes Into XMP.

 

The regions along with any tags applied to them are stored in the XMP metadata -- use the Exiftool utility to examine it:

$ exiftool -xmp:al
...
Translate
LEGEND ,
Jun 12, 2023 Jun 12, 2023

"Does anybody know of a way to name people automatically? I do not care about the names - it can be p1, p2,... and I don't care if one person is named twice. All I care about is people count per photo."

 

The best you can do is count the number of face regions (tagged or untagged) in a photo by examining a photo's XMP photo metadata with an external tool like Exiftool.    But without confirming the suggested face names or assigning them explicitly in View > People, there's no way to know how many unique people are represented by the face regions in a set of photos.

Translate
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
Participant ,
Jun 12, 2023 Jun 12, 2023

Hello, that sound interesting. I do not care about unique people in a set. I care only about people in single photographs.

Are you sure, that LR stores the untagged regions directly in the XMP? That would work nicely.

Translate
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
LEGEND ,
Jun 12, 2023 Jun 12, 2023

"Are you sure, that LR stores the untagged regions directly in the XMP?"

 

Yes. For exported photos, uncheck the export option Metadata > Remove Person Info and select Include: All Metadata.  If you're accessing the original photos, select them and do Metadata > Save Metadata To File or select Catalog Settings > Metadata > Automatically Write Changes Into XMP.

 

The regions along with any tags applied to them are stored in the XMP metadata -- use the Exiftool utility to examine it:

$ exiftool -xmp:all zyx.HEIC
...
Region Applied To Dimensions W  : 2316
Region Applied To Dimensions H  : 3088
Region Applied To Dimensions Unit: pixel
Region Rotation                 : -1.57080, -1.57080, -1.57080
Region Name                     : Karyn
Region Type                     : Face, Face, Face
Region Area H                   : 0.39583, 0.24999, 0.22667
Region Area W                   : 0.29688, 0.15885, 0.21214
Region Area X                   : 0.37109, 0.72950, 0.71696
Region Area Y                   : 0.67057, 0.77156, 0.22007
Translate
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
Participant ,
Jun 12, 2023 Jun 12, 2023
LATEST

It really does! Thank you, sir.

 

That actually makes the process a bit faster. Just let LR find regions, save metadata and just count the number of regions in XMP.

Translate
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