Convert facetags from WLPG to Picasa

Started by raldo, August 27, 2012, 05:53:31 PM

Previous topic - Next topic

dawson

#30
Hi.
Today I tried the following command:

exiftool -config ExifTool_config_convert_regions -r -overwrite_original "-regioninfomp<myregionmp" "D:\Lightroom6_Katalog\2015\2015-05-28"


On jpg-files, it worked well. Thanks for that.
But on my dng, it doesnt work.

What I have done:
- imported CR2 as DNG in Lightroom 6
- tagged a face/person in the DNG-file
- run the exiftool-command
- looked at the DNG with my Synology PhotoStation (newest version)
- there are no regions recognized, but they are there - I can see them with exiftool
- when face-tagging with PhotoStation (which uses xmp-mp, as far as I know), the Lightroom-XMP-MP-regions are overwritten.
- when I use exiftool then, to overwrite these tags again, PhotoStation doesnt recognize there own regions.

Could you tell me, what went wrong?
With exiftool, I can see the correct xmp-mp - contents.

Phil Harvey

This may require a bit of detective work, a few iterations, and some help from you to determine the problem.

Could you post both the XMP for which PhotoStation doesn't recognize the faces, then the XMP from the same file after tagging with PhotoStation?  I am assuming that PhotoStation will recognize the faces that it just wrote?

Extract the XMP at each stage with a command like this:

exiftool -xmp -b test.dng > out.xmp

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dawson

Hello,
so here are the xmp-files you asked for a few hours ago.

out_01.xmp
   before Import in Lightroom (but I have to say, that the dng was in lightroom 5.7 before - so this is a re-import in lightroom 6)

out_02.xmp
   after the (re-)import in Lightroom 6
   
out_03.xmp
   after tagging with lr6 (title, face and so on)

out_04.xmp
   after the exiftool-command

Command:
exiftool -config ExifTool_config_convert_regions -r -overwrite_original "-regioninfomp<myregionmp" "D:\Lightroom6_Katalog\2015\2015-05-28\IMG_7872.dng"
    1 image files updated


When I´m at home, I do some xmp-files after tagging the same dng with PhotoStation.

Phil Harvey

OK, thanks.  I'm assuming that PhotoStation doesn't recognize the faces from any of these?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dawson

When I´m home - I will check.

Right now I have checked Windows Live Fotogalerie.
It doesnt recognize the xmp-mp - Regions or Names. It displays the changend "title"-Tag correctly, but not the face/person-tags.
When I´m face-tagging with Windows Live Fotogaliere - the tags arent saved to the file. Guess by editing dng-files the software only stores the tags in the database.

dawson

So. Now I´ve checked PhotoStation.
I copied the file to my PhotoStation-Folder and opened it with PhotoStation.
No region and no face-tag where recognized.

Then I tagged the face on the picture with PhotoStation.
Here is the xmp after this tagging.
I tagged the face with "Max Mustermann" with Lightroom and with "MaxPS MustermannPS" with PhotoStation.

Phil Harvey

#36
Thanks for the sample.  I've taken an initial look, and there are structural differences in the XMP, but if these are the source of the problem then it could be difficult to solve.

Here is the ExifTool XMP that seems not to work in PhotoStation:

  <MP:RegionInfo rdf:parseType='Resource'>
   <MPRI:Regions>
    <rdf:Bag>
     <rdf:li rdf:parseType='Resource'>
      <MPReg:PersonDisplayName>Max Mustermann</MPReg:PersonDisplayName>
      <MPReg:Rectangle>0.59561, 0.24027, 0.29886, 0.44808</MPReg:Rectangle>
     </rdf:li>
    </rdf:Bag>
   </MPRI:Regions>
  </MP:RegionInfo>


Here is the PhotoStation XMP:

   <MP:RegionInfo rdf:parseType="Resource">
    <MPRI:Regions>
     <rdf:Bag>
      <rdf:li
       MPReg:Rectangle="0.227064, 0.042813, 0.516055, 0.428135"
       MPReg:PersonDisplayName="MaxPS MustermannPS"/>
     </rdf:Bag>
    </MPRI:Regions>
   </MP:RegionInfo>


You can see that PhotoStation used XMP shortcut notation for the region structure, while ExifTool used a parseType Resource, which is certainly legal.  Here is what Microsoft does, btw:

<MP:RegionInfo>
<rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <MPRI:Regions xmlns:MPRI="http://ns.microsoft.com/photo/1.2/t/RegionInfo#">
   <rdf:Bag xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <rdf:li>
     <rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <MPReg:Rectangle xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">0.510638, 0.146341, 0.125532, 0.205575
      </MPReg:Rectangle>
      <MPReg:PersonDisplayName xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#">Barack Obama
      </MPReg:PersonDisplayName>
     </rdf:Description>
    </rdf:li>
   </rdf:Bag>
  </MPRI:Regions>
</rdf:Description>
</MP:RegionInfo>


Which uses the longhand version of putting the structure inside an rdf:Description.  The parseType Resource syntax allows this extra rdfDescription to be omitted.

Anyway.  At first glance I can't see the problem.  I will look at this in more detail as soon as I get a chance, and make some suggestions as to how to proceed, but this may be a couple of days because I am really busy at the moment.

- Phil

Edit:  Aside: These files have an XMP mwg-rs Rotation tag that is not part of the MWG specification, but is apparently added by Lightroom 6.  Maybe I should add support for this.  Interesting, but not related to the problem.

Edit2:  Try putting the attached XMP back into the file (exiftool "-xmp<=in_00.xmp" FILE) and tell me if PhotoStation recognizes this.  In this test I took the XMP that worked and changed nothing but the formatting of the RegionInfo structure.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dawson

While testing your "in.xmp" I found out, that the problem might be PhotoStation itself.
I tagged a person with PhotoStation. Removed the pic von PhotoStation and moved it in again.
Guess what... PhotoStation doesn´t recognize the person anymore.

Do you have a Synology with newest DSM?
Can you (or any other reader) verfiy this "bug/feature"?

Btw: the option "face recognition" in settings of PhotoStation isn´t set. But however I can tag a person.

Phil Harvey

I was leaning towards this being a PhotoStation quirk.  Perhaps it would be a good idea to check with them on this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dawson

It took a while - but now I reactivated my old DS410 and installed the newest DSM with PhotoStation.
I activated face recognition on the Synology. I copied 5 dngs in PhotoStation. It took over 1 min. for a single DNG-File.
The PhotoStation didn´t recognize the already tagged persons (both versions in xmp).
It didn´t even recognized the persons tagged by PhotoStation itself.
So ... totally beta and therefore useless - at least for my workflow.

Thanks for all your help. Exiftool is absolutely great, I will use it maybe later to convert all Lightroom-Tags into PhotoStation-Tags, when Synology finally fixed it.

Newsky

Many thanks for the miracle of the program!I take the first steps to ExifTool. Please help, how to register the command line using ExifToolGUI?


Sorry for my english. I use Google translator

Phil Harvey

I think the problem is that you don't enter "exiftool" in the ExifTool Direct box.  This should start with "-config ...", not "exiftool -config ...".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Newsky

I tried that. All the same error. Truth is another.
Sorry for my english. I use Google translator

Phil Harvey

Bad luck then.  I should have guessed that ExifToolGUI inserts argments before the ones in the box.  So it seems that the -config option can't be used with ExifToolGUI.  You'll need to do this from the command line.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Newsky

Very, very sorry. Thank you very much for your answers, Phil.
Sorry for my english. I use Google translator