Show face tags

Hi,

I'm new to zenphoto - I'm using it to display 10 years worth of digital photos, having replaced my self built site.

A large number of my photos have facial recognition tags embedded into their XMP data via Picasa. I've also tried the embedding facial recognition tags from Windows Photo Gallery. However, neither set show up against the photo in zenphoto, nor are any results produced when I do a search against the name.

I've also tried enabling the XMP plugin.

Does zenphoto support these types of tags and I'm doing something wrong, or is this a feature request?

Thanks

Richard

Comments

  • acrylian Administrator, Developer
    No, tags are just text tags. Supporting facial recognition would be the task of extra script within a theme or better via a plugin. I am sure there is a jQuery script or something for this somewhere.

    You can of course open a ticket for a feature request but I am sorry that I can already tell that this will not get any priority.
  • It's not so much running facial recognition - that task has already been done. It's a case of displaying the tags that it populated and cataloging these for search.

    I guess this is a feature request.

    Richard
  • acrylian Administrator, Developer
    Zenphoto imports tags assigned to an image via metadata like EXIF, IPTC or optionally XMP. I have no knowledge about these "facial recognition tags" but seems they are not embedded following that standard.

    As said feel free to open a feature request ticket on GitHub but please don't expect anything on this anytime soon. Seems a quite specific requirement to me. If you really need it right now best do it yourself or hire someone.
  • Looking at a site that shows me the detailed tags (http://regex.info/exif.cgi), a photo that I've tagged with a person's name using either Picasa or Windows Photo Gallery has the XMP tag of "Region Name" populated with their name and the tag of "Region Type" populated with "face". If there are multiple people in the photo, they are comma separated, and the "Region Type" becomes "face, face, face". My ideal would be that this "Region Name" data is also loaded into the database in a manner that is searchable.

    There are a number of other tags under XMP that also define a rectangle (i.e. region) that indicates on the photo where that face actually is. However, this is beyond what I am looking for.

    If you can point me in the direction of what I would need to change, then I could see if my rusty coding skills can identify what needs doing.
  • acrylian Administrator, Developer
    If you can store these tags in XMP you should look at the xmpMetaData plugin to add that needed field which is not imported currently. After reading those you would have to assign them as real tags. Best you make your own custom version of that plugin.
  • Hooray - it works for Picasa tags (having never coded PHP before!). The face name tags are lifted from the image XMP metadata, and recorded in a new column in the image table. These can now be displayed as part of the image info and, more importantly, searched for.

    I've had to make changes to both xmpMetaData.php and functions.php.

    It's never good having to make tweaks to core, as it means I can't upgrade going forwards. If others are interested, and someone can let me know how, then happy to get my changes implemented back into the core.

    Bells and whistles would be to have the names represented as tags at the bottom of the image, alongside the location based tags.
  • acrylian Administrator, Developer
    If you need modifications to the xmpMetaData plugin you should turn it into your own custom plugin and place it in the /plugins folder. Then you can still update.

    Core files like functions.php you indeed shouldn't modify. If you need a new column for storage in the database there is way to add those to each item's tabl mwithout needing to hack the core. You finde the tool within `zp-core/zp-extensions/custom/fieldextender.php`.

    It is however an rather invconvenient coder tool to do this programmatically and this will be easier on our next major update.

    Another way would be to read the info and assign it as real tags.
  • Acrylian - I've taken your suggestions onboard. Thanks for your help.

    I've turned this into a separate plugin, which then assigns the face names as real tags.

    http://www.birty.net/download/xmpMetadataPlusNameTags.zip

    Richard
  • acrylian Administrator, Developer
    Great, thanks, 3rd party plugins for specific needs are always welcome. But could you maybe create a page for the plugin with the download link and some documentation we can link to?

    If we create an entry on our extensions section we generally don't like to link directly to 3rd party downloads to avoid confusion. Please take also a look here:
    http://www.zenphoto.org/news/general-contributor-guidelines#providing-themes-and-plugins
  • I have been trying to download this plugin but with no success
    Where could I get it please ?
    Otherwise what should I change in the code ?
    All I am trying is to import the RegionName list (so all the names associated with the faces on Picasa) to a keyword list (in Tags field for example).

    Thank you
  • acrylian Administrator, Developer
    You probably are looking for this: http://www.birty.net/content/xmpmetadata-plus-name-tags
  • Hi,
    Inded that's what i was looking for but the download does not work and there is no way to contact onetoomany
    so i played around a bit with the code, and used another 'field' in xmpmetada.php to import the list of faces... i did manager to import some stuff... but not just the face list as tags
  • acrylian Administrator, Developer
    Sorry, just saw the download does not work. I fear I can't help, never used or even tried this as I have personally no use for it.

    Edit: I found a local copy and have for now uploaded it to our https://github.com/zenphoto/Unsupported/ repository.
  • Amazing thanks !
Sign In or Register to comment.