Link Person to file annotation box is green (instead of blue) on some images

Started by abgestumpft, November 14, 2021, 12:54:28 PM

Previous topic - Next topic

abgestumpft

Usually when I assign persons via "Link persons..." to a file iMatch creates a blue face annotation boxes (starting from top right to bottom).

From time to time I see some of those boxes being green instead of blue. Is the face annotation type (linked, instead of a "real" face annotation stored in the file itself?

I managed to reproduce it like this:
1. Link a person to a file -> "blue" face annotation created.
2. Write metadata to the file
3. Delete the linked face annotation from the file
4. Reload Metadata
5. Now the face annotation is loaded again from file, but now it is green.

Mario

Quote from: abgestumpft on November 14, 2021, 12:54:28 PM
2. Write metadata to the file
3. Delete the linked face annotation from the file
4. Reload Metadata
5. Now the face annotation is loaded again from file, but now it is green.

This is the expected result.

2. Writes the XMP face regions for the face into the file.
3. Deletes the person link.
4. Load the XMP face region and IMatch automatically creates a regular face annotation for each XMP face region found.

Since you have deleted the link in step 3, IMatch has no info anymore that one or more of the XMP face regions in the file are links.

See: Working with XMP Face Regions
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

I'm not sure if I did it that way, but that's how I was able to reproduce it.
The only issue I have with this those are now popping up in the face manager.
Maybe I can fix this by filtering on keyword (I have one assigned for each person) and face annotation size / position

Mario

There is nothing to "fix". If you perform these steps (write-back, delete person link, re-import metadata) you will always create real face annotations - because the image now has embedded XMP face regions, which are (and should!) converted to real face annotations during import.
Just don't delete the person link to avoid this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

I have found hundreds of those "green-linked" face annotations.
By fixing I mean replacing them with blue ones again, especially to avoid them being shown in the face manager.

I should be able to do so by filtering on the face annotation position ({File.MD.MWG::Regions\RegionsRegionListAreaX\RegionAreaX\0} = 0.925000) in the people view of a person.
There I assign a temp keyword, delete the person faces in the face manager (filter still active on face annotation position) and then link the person again on the images that have the temp keyword assigned.

abgestumpft

I to change them from "green" back to "blue" with the procedure I've written above.

I also found another scenario were the linked face annotations become normal green ones:
When you have a RAW file with linked person(s) and all metadata saved. Then you process this RAW file in an external application and export e.g. as JPG.
After this new file was imported into iMatch, this will also contain the "green" face annotations.

Mario

Insufficient details.
Which file do you refer to? The new JPEG or the original RAW?

Again: When a file is imported that has XMP face regions but no matching annotations in the database, IMatch will create real face annotations from the data. That is normal.
It will not replace the link when the file is a) already in the database and b) the link still exists.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

E.g. scenario like this:
1. Starting point: RAW file with linked face annotation(s) and all metadata saved
2. Edit this RAW File in Photoshop, DXO, whatever
3. Save the edit as JPG in same folder
4. iMatch will load this JPG and import the contained face annotations as normal faces (not linked as in original RAW file).

I understand why this is happening (technically similar to deleting the linked annotation and reloading the annotation from the file again). The issue here is that the information that the face annotations are linked faces (iMatch special) is not written to the metadata of the file (only stored in iMatch DB) and therefore the information is lost in such a scenario.
Maybe use the tag "RegionDescription" to store that information in the file?

Mario

This behavior is exactly as it should be.

Links are just crutches for people not wanting to create real face annotations.
They are not the real thing and should be replaced by real face annotation as soon as time permits.

Links are not a concept that matches anything outside IMatch. There is only one type of XMP face regions.
And when IMatch imports a new file which contains face regions, it will always create real face annotations. Not links. And this is how it should be.

For your workflow, I suggest you don't use links but let IMatch create face annotations using face recognition. Don't use links.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

I had a lot of older fotos where I used keywords for Persons. With IMatch I have transferred those keywords in linked Persons.
Then I can also use the person related features (like displaying name and age below each foto). Also for new fotos I use the link person to files sometimes.
E.g. when I have 20 fotos with the same three persons I can assign them via link person to files within seconds.
With face recognition usually not all faces are detected (person from side / back / ...) -> I need some additional manual work to for creating manual face annotations and also later to check / confirm the faces.
Maybe I'm using it the wrong way, but that's what I'm doing at the moment  :)

Mario

This is how it works.
If you import files containing XMP face regions, IMatch will add a real face annotation, link to the person based on the tag included in the face region. No links needed anymore.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

QuoteThis is how it works.

I have run into this issue as well and I understand this is the way it works now.
Linked persons is a great feature and saves a lot of time as you don't have to worry about placing a rectangle on faces and can still use all the people features. It's too bad that the feature has its limits with propagation and meta data refresh.

QuoteLinks are not a concept that matches anything outside IMatch. There is only one type of XMP face regions.
Just curious, how is the manual face annotation handled? To me it looks like it is part of the region data written to the file. It's not changing when metadata are refreshed or the file is removed and imported back into the database. Could that tag be used to indicate a linked person?


Heiner

Mario

I don't understand.

You place a link to a person on a file.
You write the metadata.
The link is persisted as a face annotation in XMP, with the tag. Same as any regular face annotation.
You re-import the file. Nothing changes. The link is still in place. IMatch detects that an annotation already exists.

Only when you a) delete the link and b) then re-import the file, a regular face annotation is created. Because the link is no more because of your action.
But that does not change anything. IMatch links that annotation to the same person as before. Just not as a link but as normal face annotation. You don't lose anything.
This is how the XMP face region import works. If you don't want this, disable XMP region to annotation import.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

Maybe the solution would be a new feature:
Link Person to keyword (working the other way around like the existing "keyword" feature): in Person editor one can specify the keyword(s) for that person. Everytime this keyword is assigned to an image this is also an assignment of the person. This way there would be no need to write "fake" face annotations like it is done with "link person to file" feature.
Or is there a catch if it's done that way?

Mario

Persons are not keywords. That you can link keywords to persons in IMatch is just one of the many benefits IMatch offers.
The core concept of face recognition and people is the IMatch AI. The person links are just a bad crutch and I don't like it much.

Also, XMP has official support for face regions and IMatch fully supports that. This makes your face annotations portable and usable in all other applications.
This is why IMatch both reads XMP regions and converts them automatically into real face annotations - and links them to the correct person via the region tag.
And on write-back IMatch stores face annotations as XMP face regions. In case of links, which are treated as confirmed manual face annotations internally, you'll end up with proper XMP face regions, linked to the person via the tag. XMP face regions don't do anything with keywords.

I really don't see a need to add a crutch (create person link when keyword is found) to the person link crutch. A can of worms which can cause all kinds of strange side effects. And what is with existing XMP regions in the file in that case? And it would not change anything. When you write back, the person link will produce a XMP face region, the same as when you assign a link directly. Or just let the IMatch face AI do it's job.

Feel free to add a feature request and when a very substantial number of users supports it, I may consider to add this as yet another special case on top of another special case for a later IMatch version.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

Years ago (no face tags available back then) I started tagging people in photos by using keywords.
Once Lightroom introduced face recognition I have used it for a while, but then switched back to keywords again (was too much of a hassle).
Since iMatch 2020 I'm using face annotations again.

What I did when "link person to files..." was introduced in iMatch:
I filtered on the persons keywords on by one and used the "Link person to files..." to assign the matching person.

This way I could make use of the people features i Imatch (which does not work for keywords):
-display the photos in people view when person is selected
-In the layout I can make use of "Person:tag (Age)"
-Search for People (also combinations) is easier (though possible via keywords too)

What I mean by "Link Person to keyword" feature is not to automatically create those person link face annotation.
IMatch should not create any additional face annotations. What it should do is to handle the photos with those keywords as if that person was assigned (but physically it's not assigned).

As example:
I have a keyword: "Persons|Family|John Doe"
And I have a person configured called "John Doe"

With that new feature in the Person Editor of "John Doe" I have a new configuration: e.g. called "Link Keyword to Person" (maybe there is a better description).
Here I then configure "Persons|Family|John Doe"

Now all photos that have the keyword "Persons|Family|John Doe" are treated by iMatch as if person "John Doe" was assigned.
E.g.:
-they appear under the persons photos in the people view
-In the layout the "Person:tag (Age)" also shows "John Doe (34)"

As said before I'm not 100% sure if this is a good idea. But this way IMatch would not have to create those fake face annotations (as in "Link person to files...") and I could still make use of iMatch special features on people.