Hierarchy Tag Separator Problem

Started by Lukas52, November 21, 2020, 12:56:18 PM

Previous topic - Next topic

Lukas52

Hello,
Im trying to get IMatch to write flat tags into xmp:dc:subject with a "/" instead of a "|" as separator, reason being my gallery server only supports "/" as level separator.

I was reading up in the online help as well as this thread: https://www.photools.com/community/index.php?topic=6067.0

What i know and understand is that "|" has to be used in fields that actually support hierarchy structures. As far as i know xmp:dc:subject is flat tags only, so using "/" shouldn't be an issue, i just don't know how to get IMatch to use it :)

When i write the keywords using my web gallery it writes them like this:


"XMP-dc": {
      "Subject": {
        "id": "subject",
        "table": "XMP::dc",
        "val": [
          "Meta/Photo"
        ]
      }
    },


And this is what i want IMatch to do as well.
It only matters for xmp:dc:subject. Everything else can stay the way it is since i don't need the other fields.
How do i do this?

Mario

IMatch automatically maps from XMP hierarchical subject to flat XMP keywords and legacy IPTC keywords during write-back, and, for convenience, automatically in the database every time you update keywords. Under Edit > Preferences > Metadata you can control how IMatch flattens hierarchical keywords during these steps.
Usually you have no levels in flat keywords. And if you configure IMatch to write hierarchies into flat keywords, it will always use the standard | pipe separator. You can only select arbitrary keyword separators for import.

If your "server" does not allow you to dial in the standard | separator, the only way I see is to manually replace the | in the flat keywords with \ using the Metadata Mechanic app. I would recommend to do this on copies of the images you have created before (in a separate folder).

Manually changing flat keywords may confuse the keyword mapping in IMatch (which always works from hierarchical keywords to flat keywords). Your changes may also be wiped out during the next write-back or re-import. Working against the automatic keyword management may be risky, which is why I would a) do it on a copy of the images and b) then delete these copies after uploading.



-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Lukas52

#2
Hmm, that does complicate things... I was hoping there might be a profile or something i can edit that is used to flaten tags :(

Problem is i don't want to keep that many copies of my files. Working with a Copy would me [Local for IMatch] [Working Copy for Server] [Server Backup], storing so much locally simply isn't possible on my setup. I could simply not safe the files locally and not monitor the server using IMatch, but i was hoping to keep them in my Database for things like Face Recognition.

This brings me to a sort of "of topic" question: How are Faces stored in IMatch? I've seen software that compares faces to known images (which means you need to have a couple of Photos of the same person for it to work well) but also the more sophisticated solution of simply creating a mathematical model for every persons face and storing that, rather than linking it to Images. Version 2 means i don't need to keep local versions of my Files since the Faces are already stored :)



Mario

Since version 5, IMatch has never used anything other that |, if a user really needs to somehow maintain a hierarchy even in flat keywords. Hence, no option or 'profile' you can edit. Just not needed.
Using \ for keywords is quite uncommon, which software do you use on that server?

The IMatch AI uses complex mathematical models to represent faces in the database. Access to the original files is not needed for things like face recognition, image matching, finding dupes, copies or visually similar images. IMatch only needs access to the original files when it needs to write-back metadata or to display the file when no cache image has been generated yet (or always in case of JPEG files, which are usually not cached).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Lukas52

Im using Picapport with some modifications. It technically does support | for hierarchies, but not the same way it does / (Forward not backward Slash)
It uses the forward slash as default in all of its front ends. Auto completion doesn't work with |, just as an example.

I tried using the Metadata Mechanic app to change my XMP::dc\subject\Subject\0 using replace. Simply putting | and / into the fields didn't work, so i assume i need some form of regex?

Plan is to use this Workflow:

1. Add all the tags using IMatch excellent thesaurus and person features
2. Write Metadata to Files
3. Use Metadata Mechanic to replace level separators
4. Use ExifTools Processor to empty the hierarchical keywords to prevent warnings during Import in other software due to mismatches
5. Upload Files to Server
6. Delete Local Files

Mario

I've had no problems replacing | with / using the Metadata Mechanic. Just did a simple

to produce

to produce

Make sure you have no extra blanks or similar in the "Replace" field.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Lukas52

Ah ok, i found my mistake :)

I wasn't writing the Metadata to the File before checking it again with the Metadata Analyst...

Thanks for your help :)

Mario

#7
The Metadata Mechanic operates on the data in the database.
Probably the keywords for this file were never changed in IMatch and it was also never written back.
In that case you basically have the origin state.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook