What metadata does XMP / People look for?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
MrKuenning
Posts: 4
Joined: Mon Jan 22, 2024 11:04 pm

What metadata does XMP / People look for?

Post by MrKuenning »

I am trying to tag my photos with people and then use Everything to search for those people.
I found that 1.5 can index / view EXif and XMP data, and that there is an option to choose "People" under XMP.
However, I can not figure out what metadata "People" is looking at.

The most common people tagging in metadata is either:

Metadata Working Group Regions

XMP-mwg-rs
RegionName

This is what programs like Picasa or Windows Photo Gallery use to face-tag

Or

XMP-iptcExt
PersonInImage

Used by various other photo tools

I have tried using both of these and Everything still shows no People.
Could someone advise either what metadata it is using or how to get everything to display these fields?
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: What metadata does XMP / People look for?

Post by void »

Everything uses the Windows Property System "system.photo.peoplenames" property for the Everything "People" property.

Looks like this maps to XMP -> RegionInfo -> Regions -> PersonDisplayName
https://learn.microsoft.com/en-us/windows/win32/wic/-wic-people-tagging

Could you please select a jpg/png in Everything with a people tag.
Right click the result list column header and click Add Columns....
Right click the column header and check Preview.
Examine all property values. See if your people tags show up.
Please also check the Windows Property System tab on the left.

Could you please send a mock-up image with a people tag to support@voidtools.com
MrKuenning
Posts: 4
Joined: Mon Jan 22, 2024 11:04 pm

Re: What metadata does XMP / People look for?

Post by MrKuenning »

I have looked everywhere for the "check preview" option and I can not find it.

I have sent you an email with two photos in it, using each of the metadata I mentioned.
Last edited by MrKuenning on Wed Jan 24, 2024 11:51 pm, edited 1 time in total.
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: What metadata does XMP / People look for?

Post by void »

Thank you for the images.

Everything will only show the same properties you can see in Windows Explorer. (Right click -> Properties -> Details)

Some properties appear to work, while others do not.

I have on my TODO list to add native XMP support.
For now, Everything relies on the Windows Property System.

The Windows Property System does not appear to support Iptc4xmpExt:PersonInImage or Region -> RegionList -> Name

ExifTool might be able to bring these people tags into Region -> RegionList -> PersonDisplayName?


I have looked everywhere for the "check preview" option and I can not find it.
From the select property dialog, right click the column header and check preview:

MrKuenning
Posts: 4
Joined: Mon Jan 22, 2024 11:04 pm

Re: What metadata does XMP / People look for?

Post by MrKuenning »

I got a working script to copy the people data from Picasa-tagged images to people tags that everything can read.

It checks if the tags are different, and if they are it captures the modified time stamp, updates the metadata and then replaces the modified time stamp with the original.

It could be optimized, but it works.

Facetag.bat

Code: Select all

@echo off
setlocal enabledelayedexpansion

rem Path to exiftool
set "exiftool_path=C:\Exiftool\exiftool.exe"

rem Path to colortool
set "colortool_path=C:\ColorTool\ColorTool.exe"

rem ANSI escape codes for Colortool colors
set "ansi_red=[31m"
set "ansi_green=[32m"
set "ansi_light_blue=[94m"
set "ansi_navy=[38;5;18m"
set "ansi_grey=[38;5;8m"
set "ansi_light_grey=[38;5;7m"
set "ansi_dark_grey=[38;5;240m"
set "ansi_reset=[0m"

rem Check if Colortool exists
if not exist "%colortool_path%" (
    echo %ansi_red%Colortool not found at %colortool_path%. Please make sure the path is correct.%ansi_reset%
    exit /b 1
)

rem Check if exiftool exists
if not exist "%exiftool_path%" (
    echo %ansi_red%Exiftool not found at %exiftool_path%. Please make sure the path is correct.%ansi_reset%
    exit /b 1
)

rem Directory containing the script
set "script_dir=%~dp0"

rem Initialize counter
set /a count=0

rem Iterate over each photo in the directory and its subdirectories
for /r "%script_dir%" %%F in (*.jpg) do (
    rem Increment counter
    set /a count+=1

    rem Reset variables to blank
    set "modify_date="
    set "region_name="
    set "region_display_name="

    rem Check if the file exists
    if not exist "%%F" (
        echo %ansi_red%The file "%%F" does not exist.%ansi_reset%
        exit /b 1
    )

    rem Run command to extract metadata and store output in a temporary file
    "%exiftool_path%" -S -filemodifydate -XMP-mwg-rs:RegionName -XMP-MP:RegionPersonDisplayName "%%F" > "%temp%\metadata.tmp"

    rem Read contents of the temporary file to capture metadata
    for /f "usebackq tokens=1,* delims=: " %%a in ("%temp%\metadata.tmp") do (
        if "%%a"=="FileModifyDate" set "modify_date=%%b"
        if "%%a"=="RegionName" set "region_name=%%b"
        if "%%a"=="RegionPersonDisplayName" set "region_display_name=%%b"
        del "%temp%\metadata.tmp" 2>nul
    )

    rem Debug output
    echo %ansi_dark_grey%------------------------------------------------------------ %ansi_light_grey%#!count! %ansi_reset%
    echo File: %ansi_grey% %%F %ansi_reset%
    echo Modify Date: %ansi_navy%!modify_date!%ansi_reset%
    echo Picasa Name: %ansi_light_blue%!region_name!%ansi_reset%
    echo Live Photo Name: %ansi_light_blue%!region_display_name!%ansi_reset%

    rem Check if Live Photo Name matches Picasa Name
    if "!region_name!" neq "!region_display_name!" (
        rem Update metadata
        "%exiftool_path%" "-XMP-mwg-rs:RegionName>XMP-MP:RegionPersonDisplayName" "-filemodifydate=!modify_date!" -overwrite_original "%%F"
        echo %ansi_red%UPDATED%ansi_reset%

    ) else (
        echo %ansi_green%MATCHING%ansi_reset%
    )
)

echo %ansi_light_grey%Processed %ansi_reset%%ansi_green%!count!%ansi_reset%%ansi_light_grey% files.%ansi_reset%
echo Script execution complete.
pause
Updated with cleaner code.
Post Reply