Some time ago, Windows Photo Gallery introduced a nifty face recognition feature dubbed People Tags. Windows Photo Gallery would detect and recognize faces which you could then tag with the names of your contacts.
The face information would be saved back to the file as XMP metadata using the Microsoft People Tags Schema. This means that the Face recognition information was saved within file instead of being kept seperate in the app’s database. This is a plus for archivists which would like to preserve this information within the file, but also comes with certain privacy issues.
An amazing additional feature is that you could optionally connect your Facebook account to Windows Photo Gallery and upload photos to that social networking service from the app. Windows Photo Gallery would maintain a link from the photos on your PC to the copy in Facebook. If any of the faces in the uploaded photos were tagged in Facebook by you or others, it would be then also tagged back to the original photo on your PC via Windows Photo Gallery. In a way, you could leverage Facebook to crowd source your people tagging efforts. Quite useful for class reunions or large family gatherings and you wanted others to do the heavy lifting of identifying people in photos. Sadly, this particular functionality was shut down when Facebook decided to pull the plug on Facebook Connect.
Microsoft’s People Tags can be read by Windows Explorer and some third party applications such as Google’s Picasa, Digikam, Photo Supreme, Photo Station, GeoSetter . The People Tags schema never gained much support with other photo organizing apps as many opted to use the more industry accepted Metadata Working Group Face Regions schema, which interestingly Microsoft worked on as well, but never embraced it in Windows.
There are various options to storing People/Face information, either by storing within the file metadata or in an external file or database. I will try to highlight some these options with this post. In all you may have devoted a lot of time in manually including People Tags in your photo collection, so here are some ways to ensure that effort has effort was not in vain. Select the option or options best suited for your workflow.
All of these options can be accomplished using the very nifty exiftool utility. In my previous post I described how to install this utility, so I will not delve into that how to on this one.
First things first, as with any file operation which involves modifications, ensure you have backed-up your photos before proceeding.
Exporting People Tag Data to a File
The following command will export the people tag persons displayed names to a tab-delimited file named PeopleTags.txt which can be opened in Microsoft Excel or a database such as Microsoft Access. This is particularly helpful when you wish to create an index or analyse you photos’ metadata fields in ways your photo manager may not be capable of.
exiftool -T -Directory -Filename -RegionPersonDisplayName -r *.jpg > PeopleTags.txt
The -r flag stands for recursive and will ensure that files within subdirectories are included in PeopleTags.txt.
Converting People Tags to MWG Regions
Given Windows Photo Gallery end of support, you may be considering using then the more established Metadata Working Group Face Regions schema for storing such information back to their photo files. Adobe Lightroom, for example, uses MWG Face Regions for the same purpose of labeling faces in photos.
In addition to the exiftool executable, you will need to ensure you have the proper exiftool config file for converting mp tags to mwg. The config files extend exiftool functionalities to do other things. In this case, the config file needed is the convert_regions.config which can be obtained in the full Image-ExifTool (.tar.gz) distribution or downloaded from here. A forum discussion thread on the subject can be found here.
The command to use to convert Microsoft People (MP) Tags to Metadata Working Group (MWG) Regions is:
exiftool -config convert_regions.config "-regioninfo<myregion" *.jpg
Copy People Tags to photo keywords (XMP Subject)
For Face Regions to be displayed in Adobe Lightroom, the MWG Face region name needs to be accompanied by a keyword. As far as I know, this is not mentioned in the MWG spec, but it is a quirk in Lightroom. To accomplish this you can use the following command. Also, as keywords/tags are read by many photo management applications this is a good way to make person’s names available, or when uploading files to a site such as Flickr which reads this information and adds them as tags to the photo.
exiftool *.jpg -"xmp-dc:Subject+<RegionPersonDisplayName"
Copy People Tags to “Person Shown in Image”
The IPTC Extension Schema has another way to record persons depicted in the image which can also be a useful way to preserve the names of the people in the image as well. The exiftool tag is PersonInImage.
exiftool *.jpg -"PersonInImage<RegionPersonDisplayName"
Recently I came across Tag That Photo, which is a Windows desktop application which has a face detection and recognition functionality similar to Windows Photo Gallery’s. It can read Microsoft People Tags as well as MWG Face regions. The fully licensed version writes face metadata back to the file as MWG Face Regions. The app seems like a good option to support other photo management apps which read MWG by providing a decent face recognition engine.