Converting and Exporting Windows Photo Gallery People Tags

Some time ago, Windows Photo Gallery introduced a nifty face recognition feature dubbed People Tags. The face information would be saved back to the file as XMP metadata using Microsoft People Tags Schema. While Windows Explorer and some third party applications such as Google’s Picasa, Digikam, Photo Supreme can read People Tags others may not or some users may wish to use 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. Also you may have devoted a lot of time in manually including People Tags in their photos.

Windows_People_Tags.png

Windows_People_Tags_2.png

 

Given Windows Photo Gallery end of support, you may consider exporting and/or converting People Tag information to MWG Face Regions or as photo keywords. This 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.

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:

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

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.

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

For Face Regions to be dosplayed 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.

exiftool *.jpg -"xmp-dc:Subject+<RegionPersonDisplayName"

Accessing Windows Photo Gallery Metadata using Exiftool

With the demise of support to Windows Photo Gallery, it may be a good time to plan an app migration. I have seen various posts and comments on this, particularly after all the time and effort you may have spent tagging photos. The app which is meant to replace Windows Photo Gallery is the Windows Photos App. Unfortunately, the Windows Photos app does not support Captions, Descriptive Tags, People Tags nor GeoTags and to date I have not found any information which points that those features will be supported in the future.

So do not fret, as one of the pluses of using Windows Photo Gallery is that most of this information is stored into the image file and is accessible in Windows Explorer as well as any other apps which support photo metadata standards. Only in some instances this data is not stored to the file itself, such as “Flags” or if the image file in PNG or is set to “read-only”.

Understanding where the metadata is stored

Windows Photo Gallery stores much of this information as photo metadata using standards such as EXIF, IPTC IIM, and XMP (IPTC Core, IPTC Extension, Dublin Core and Microsoft Schemas) . I will not delve into the specifics of these standards but it is worth knowing to which fields the information is mapped to. In some occasions some information may be stored in multiple fields. For example, WPG captions information is stored in the XMP:Title, XMP:Description as well in other IPTC and EXIF fields.

The following table lists some of the photo information displayed in Windows Photo Gallery and the corresponding metadata fields from where the information is read and written to. I created this table from plain observation, if you find any other behavior let me know.

For reading and writing to these tags I highly recommend the excellent Exiftool command line utility. It may be daunting for some users to use the Windows Command line so I will try to be as specific as possible.Reading Windows Photo Gallery Metadata using Exiftool

Installing Exiftool

  1. (For Windows Users) Download the stand-alone Windows Executable from the Exiftool site.
  2. Unzip the exiftool(-k).exe and rename it exiftool.exe
  3. Copy the exiftool.exe to your c:\windows folder or to a folder contained in the PATH variable so it is accesible in any directory/folder.Detailed installation information can be found here.

Using Exiftool

  1. Open your command prompt in a folder containing photos either by running the Command Prompt shortcut in the Windows App Menu or by right mouse clicking on a folder while pressing the <Shift> key  and selecting “Open Command Window here”.
  2. Confirm you have the current exiftool version by typing into the command prompt:exiftool -ver
  3. Pressing <Enter> will return the version number.

Just typing the exiftool and the image file name will bring a host of information.

Exporting Windows Photo Gallery information to a File

This example will produce a file named “PhotoMeta.txt” which will contain a table with the filepath, filename, date and time photo was taken, camera maker, camera model, wpg caption, wpg descriptive tags, and wpg people tags contained in the current directory and its subdirectories.

Example:

exiftool -T -Directory -Filename -DateTimeOriginal -Make -Model  -xmp-dc:Title -xmp-dc:Description -xmp-dc:Subject -RegionPersonDisplayName -r *.jpg > PhotoMeta.txt

Using the “-T” option will output tab-delimited results. The “-r” option is used to include all the subdirectories contained within the specified “Pictures” directory. You can later open this table in Excel or import it to a database such a Microsoft Access for quick analysis.

 

 

Using IPTC location identifiers to link your photos to knowledge bases

In 2014, IPTC released an update to its photo metadata standard which supports the adding of “location identifiers” to photos. In simplest terms, a url can be added to the photo metadata which links the photo to geolocation identifiers (in the form of a URI) provided by services like WikiData, Foursquare, Facebook, DBpedia, Geonames, among others.

Wikidata_LocationIDWhy is this interesting?

As more cameras are GPS enabled it aides in establishing the “where” the photo was taken. A common example, is when you take a photo with your smartphone and share it on Instagram. During the upload process, Instagram provides a way to add the location where the photo was taken. Instagram uses the GPS data of the photo and looks up locations from the Facebook Places database (Instagram switched from using Foursquare to Facebook Places after being acquired by Facebook). After your photo is uploaded Instagram the photo is “linked” to that location. You can quickly see the photos you and other took in that same location.This IPTC standard simply allows you to save that association within the file.

Now, the benefits from this may not become entirely clear now but if such a “location identifier” is already included within the photo it could bring with it some benefits. From the previous example, it could ease the upload process since Instagram or any other photo service may be able to deduce quickly the location of a photo. I am not sure of any photo services which does this yet, but for example, Flickr for some time has implemented something similar using machine tags

In Flickr if you add a tag to a photo pointing to a foursquare location in the form of foursquare:venue=, Flickr recognizes the location and adds a map with the foursquare location.

A Smarter Search

Say you attend a basketball game in Madison Square Garden, and take some photos. Your smartphone recognizes where you are and “tags” the photo with the WikiData entry for “Madison Square Garden” (Wikidata Q186125). You upload a photo to an online photo sharing service, such as Google Photos and perform a search for “basketball game” or the team which played on that date. Given that the Wikidata identifier is associated with the type of venue and the type of games played there, a search engine with some “smarts” can deduce that a basketball game was played on the date you took that photo. Similarly, if Google Photo employs some of its image recognition on the photo it can have some additional information to make a better analysis of the image.

Also, a location may have different names and may be spelled differently in several languages. Linking a location to a Knowledge Base such as Wikidata allows a search engine to better understand the context of a photo.

So you see, the IPTC Location identifiers opens up some interesting scenarios and it is quite useful for photo archivists, librarians or a home user which may also be looking for ways to link photo to similar knowledge bases.

Saving OneDrive Photo Auto Tags to the file metadata

Last year Microsoft OneDrive introduced automatic tags to OneDrive. Like Flickr’s autotags, these employ some nifty image recognition algorithms to tag your photos.

03_iostags2

While not 100% accurate, they nevertheless help with finding photos. I am a big fan of tagging my photos using Windows Photo Gallery and was quick to check if these tags could be saved back to the file metadata, so that they can be used in the Windows desktop and other applications. I am not alone, seeing that this functionality has been requested in OneDrive’s Uservoice forum. Unfortunately, there is no direct way to save the auto tags back to the file but a workaround does exist, if you sync your OneDrive photos to your PC:

The temporary tag method:

1. On the OneDrive Photo Tags page select a tag which has been added automatically, for example “Sky” – All photos assigned that tag, “Sky” will be displayed.
2. Select all the photos displayed with that particular tag and click on “Edit Tag”.
3. Add the same tag with a “z” prepended, this will be a temporary tag. Example “zSky”.
4. Wait for OneDrive to sync the photos back to the PC. If you have a lot of photos with that tag and/or slow internet connection it may take a while.
5. On your PC, open Window Photo Gallery. Search for all photos with “zSky”.
6. Select all photos with “zSky” and add the tag “Sky”.
7. Remove “zSky” tag in Windows Photo Gallery

The result is that the “Sky” tag is written to the source files. The files will sync back up to OneDrive with “Sky” and the temporary tag “zSky” is removed.

At the moment Flickr does not expose their automatically added photos via the API. I hope they do, so that users can export these tags back to their files. The act of “confirming” these tags in the process should also help the image recognition algorithm “learn” how to better tag similar files, so it is a win win for the user and the service provider.

 

 

 

Make Windows Photo Gallery Awesome

Possibly the Windows application I turn to the most is Windows Photo Gallery. I have been using WPG ever since the Digital Image Suite days. WPG has helped me organize and manage a photo collection of more than 160,000 photos. However, I am saddened that the application has not been updated in a while. Further proof of the neglect can be seen as a recent issue arose with the Flickr Importer being broken and in which Microsoft has chosen to not fix it and leave it as it is – a broken functionality. Whatever the direction the company takes with photography enthusiasts, I would like to share a wish list of sorts of improvements I would have hope to see in a future version of Windows Photo Gallery (if there is one):

Metadata As professional photographers, libraries, archivists organize data some of the current fields may not just cut it.

  1.  Copyright Notice – Rights information tells people how they may legally use an image. If you download an image, such information should be made available so people are aware of the rights associated to the image. As well as more prominently displaying this information, it should be easier to add. http://www.iptc.org/site/Photo_Metadata/Software_for_Rights_Test http://www.photometadata.org/meta-resources-field-guide-to-metadata#Copyright Notice
  2. Make more metadata fields available. Be able to create and add custom XMP Namespaces and be able fill those fields as well as more “standard” fields. Sure, there are pro applications out there which could handle these, but if one really one to make the most of this information useful they need to be accessible to most people.
  3. Do not erase the camera makernotes – When metadata is updated the makernotes are erased. This seems like a bug.

Better OneDrive Integration

  1. Better file metadata support – Tags, Geotags, Captions should seamlessly travel between OneDrive and Photo Gallery. A tag in onedrive.com should be written back to the file and read by Windows Photo Gallery.
  2. Camera Roll – The Onedrive Camera Roll folder should take more prominence in Windows Photo Gallery – This is becoming the first folder I check as all the photos taken with my iPhone are deposited there, as (less frequently) also when I Import my photos from my Canon SLR or Nikon Point and Shoot. I think of this folder as my photo inbox.
  3. Comments – Add an option in which comments added to the Photos in OneDrive should be written back to the photo (XMP) and displayed on Windows Photo Gallery. Particularly useful when you wish to preserve the comments made for a newborn, or a special event such as a wedding.
  4. Download Shared Photos from Onedrive – Make it easier to download photos or sync from Onedrive folders shared by someone else. Windows Live Photo Gallery had a feature like this which was removed.
  5. Smartfiles/OCR – OneDrive has a nice feature which performs an OCR on the image files. Thus if you take a picture in which words are present, these are read and can be used for searching files. Windows Photo Gallery could expand on this, adding a neat UI which could aid the user create photo captions and tags. Interesting scenarios could come out of this: Say you take a picture of a restaurant in new york. In the photo the name of the restaurant happens to appear. Using the GPS coordinates, the geotag could easily be the name of the restaurant. Tags could also be suggested such as “restaurant”, the name of the restaurant, ect.

Improve Photo GeoTagging

  1. GeoTagging is good, but it could be better. I often turn to other tools such as Picasa or GeoSetter to update the photo location. Sure, most smart phones and some point and shoot cameras append GPS location to the photo, but in many cases the needs adjusting. So, it would be great if Windows Photo Gallery would have a straightforward way of editing or adding latitude and longitude data to photos using a map, err bing maps. Here is a User Voice entry which describes it best – https://windows.uservoice.com/forums/265757-windows-feature-suggestions/suggestions/6511598-better-geotagging-and-people-tagging-in-photo-app
  2. Presenting photos on a map is too simplistic in Windows Photo Gallery. The 10 photos on a map just doesn’t cut it. Flickr does a great job in this area, and I wish that something like this be made available in Windows Photo Gallery.
  3. Easily add/edit locations – WPG currently relies on a web service to reverse geocode the locations. The location names should be front and center, yet the UI enphasasies the city, state, country. The location name is only displayed if it moused over. If the location name is available, not guessed by the web service, display it. Why not be able to use your Foursquare or Facebook checkins to aid in adding the place name location? Quite often, the WGP geotag location points to a neighborhood. Say I checked in Foursquare at a local restaurant last night and took some photos, WGP could be smarter and suggest a location using the photo location and timestamp.
  4. Store Foursquare Venue ID as XMP metadata. I often add the venueid as a machine tag so when it is uploaded to Flickr it is recognized. I feel it is more of a hack, but it would be great that this data is stored in the XMP metadata so that when upload to say flickr it can be read.

Mobile Version- Call it whatever: OneDrive Photos or MS Photo Gallery App. Nowadays we spend more time in our mobile devices, whether a smartphone or a tablet. It would be great if OneDrive or a Windows Photo Gallery app be made available for iOS, Android and of course Windows Phone, in which a user can tag, edit, share photos in a similar manner that Windows Photo Gallery in the desktop. Such a mobile app should allow me to correct the geo coordinates which most often have a degree of inaccuracy as well as add the location data (say using foursquare or facebook checkins). Adobe Lightroom mobile and Dropbox Carousel app are a good example of this. I often find myself cropping and adjusting my photos using Afterlight on my iPhone more than in Windows Photo Gallery. Look at apps such as the Flickr iOS app and you get the picture of where I am going. There is a great discussion on this subject the OneDrive User Voice Page: https://onedrive.uservoice.com/forums/262982-general/suggestions/6422670-onedrive-photos I hope it gathers great feedback and garners votes. Hopefully Redmond will listen. UI – Would like to see an updated UI. Overall, it has to be fast and smooth. Leverage a user’s graphics card.

  1. Emphasis on Photos – Most photo apps have a dark background, thus emphasising the photo before the app. I wish that Windows Photo Gallery would enable users to change themes to either the normal or dark theme.
  2. Tighter photo arrangement – If you look at how apps such as the upcoming Yosemite Photos app and services such as Flickr, Google+, and even Onedrive arrange photos in a tighter fit you get the picture on what direction should WPG needs to also go with as well.
  3. Add GeoTags to Navigation Pane – An option (like Date, and Descriptive Tags have) to display GeoTags in the Navigation Pane in the following order Country->City->SubLocation. If either country or city are left blank, then indicate so. This would help in also in ensuring the information is added to every picture.

Workflow Improvements It would be great if Windows Photo Gallery adds additional useful operations to help the user organize photos faster. Consider these scenarios

  1. A feature which will aid in quickly organizing a group of photos into a folder – Say I go to my Camera Roll folder (where all the photos taken by iPhone are sent thanks to OneDrive). From the hundred or so photos, 20 are from a specific event and I which to move to a different folder say “E:\Photo Archive\<CurrentYear>\<DateTaken>+{Prompt:EventName}”. I select the photos and right click to bring up the content menu. From there, I could select an operation such as “Move Photos To”. Upon selecting the “Move Photos To” I can pick from a list of pre-determined folder locations with parameters or recent locations. Windows Explorer has a similar functionality but it is too simplistic. Also the freeware app Irfanview is closer to what I have in mind, but WPG has the potential to nailing it.
  2. A feature which will aid in assigning certain pre-determined values – It would be nice if a user can quickly set pre-determined GeoTags, with latitude and longitude, Author ect. by right clicking and selecting a template. This is particularly useful when you take a lot of photos in the same location with no geo data.
  3. Computer Vision to add metadata – Yea, I know this is more complicated, but it would be nice if some work could be done with this. An example can be seen here: https://www.youtube.com/watch?v=OrhAbZGkW8k#t=18

Filters – Seems all the rage (Instagram, Flickr), no reason why Windows Photo Gallery should not have them as well. The options under “Effects” are just not enough. New Photo Tools

  1. Find photo duplicates – It would be nice that a feature which finds detect photo duplicates be added.
  2. Photo Renaming – There are several tools which do a great job in this, but I wish Windows Photo Gallery would sport such a feature in which users could use the existing metadata to create
  3. Histogram
  4. Allow for more 3rd party plugins for more photo effects and editing.
  5. Stories – Google introduced a nice feature for creating stories.

10/17 Update: Microsoft recently opened a User Voice soliciting feedback for Windows 10.  There are a couple of calls for improving Windows Photo Gallery. User Voice is driven by votes and comments left by people. There a couple of calls for improving Windows Photo Gallery. I guess it would not hurt to send some comments in that direction as well: https://windows.uservoice.com/forums/265757-windows-feature-suggestions/suggestions/6438954-dramatic-improvements-needed-for-the-photos-app

10/19 Update: Added GeoTagging User Voice Entry

Geotag Photos with Foursquare / Swarm / Instagram and Facebook Check-Ins

Following up on my previous post on Geotagging Photos with Foursquare / Swarm Check-Ins, I stumbled upon an interesting scenario- How about a solution in which you could use your Foursquare/Swarm check ins, but the location information from Foursquare, Facebook, and Instagram.

I did some research and found possibly the best app for managing such data- the aptly named PinDrop. With Pindrop you can aggregate your Foursquare, Facebook, and Instagram locations as well as add your own. The locations, or pins you add on the app can be either shared or kept private. This is great for when travelling and if you want to keep track of the places you visited, but don’t necessarily wish to share it with your friends.

Now, for the frosting on the cake – you can export this information to a KML file which you can load into Geosetter. So far you can only export the data by visiting the website settings section. With the KML file you can more easily append the location place names to your photo’s metadata.

Now, combine this app with Geotag Photos Pro, which can record your location for easier location tagging, and you have a pretty interesting photo geotagging solution.

Happy geotagging!