IM keeps flagging PersonInImage info for writing

Started by jch2103, March 22, 2020, 07:41:35 PM

Previous topic - Next topic

jch2103

I have a set of 131 images that IM keeps flagging as needing metadata write-back (for XMP::iptcExt\PersonInImage). I've clicked the write pen which clears the queue, but later the files reappear in the Pending Metadataq Write-back collection. I've gone through this cycle several times for these images; it hasn't happened for other images with PersonInImage information.

I've attached the Metadata Analyst report for one of these images. After running the write-back (which cleared the queue), I ran Diagnostics (no errors) and after that the 131 images reappeared in Pending Metadata Write-back. I've also attached the IM log (collected after closing IM following the above activities).
John

jch2103

John

Mario

Any ideas under which conditions this happens?
Do you copy face annos? Use annotation propagation? Copy files with annos?

I need to repro this here to fix it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Quote from: Mario on March 23, 2020, 08:04:08 PM
Any ideas under which conditions this happens?
Do you copy face annos? Use annotation propagation? Copy files with annos?

I need to repro this here to fix it.

"Any ideas under which conditions this happens?" --> Not really. I currently have 884 images with People in them. These problem images are a small subset (131 images) of the total. Some of the affected images were taken at almost the same time as unaffected images.

"Do you copy face annos?" --> I have, but am not sure I did for these particular images. But it's quite possible.
"Use annotation propagation?" --> No.
"Copy files with annos?" --> Not these images.

In some cases, there's both a NEF and JPG that are affected; in other cases it's just the NEF that's affected, not the related JPG. In some cases, the affected images were JPGs copied from my Nikon Z6 to my phone via SmartBridge and subsequently run through face recognition in IM 2020. Other images weren't. (Not directly relevant to this issue, but I probably need to go through these 'Camera Roll' images copied via SmartBridge and delete them; they're all 2K copies of images I have in higher resolution NEF and JPG images. By now, I've either sent social media copies out or I'm not going to. One more item for my IMatch Notepad list of to-dos.)

Let me know if there's anything else I should be looking for re these 'problem' images.


John


Tveloso

I haven't done a thorough enough analysis to see if this theory really holds water, but it seems like the files that exhibit this issue contain more than one person, and the cause might possibly be that the order of the persons in the Person In Image list, and the Region Name list differs.

For example, I have a folder containing just 46 images, of which only 1 file exhibits this issue.  In spot-checking the files with multiple annotations, that don't revert to needing write-back, following a Database Diagnostic, it seems that all have the persons listed in the same order, in both the Person In Image , and the Region Name Tags.  But the file with the problem, lists Person-1, Person-2 in the Region Name Tag (which is the order in which the Annotations "visually" appear in the image), while the Person In Image Tag lists them as Person-2, Person-1.  Could this possibly be why the the diagnostic is "resetting" the Needs Writeback status for that Tag for this file?...
--Tony

jch2103

#6
Quote from: Tveloso on March 25, 2020, 02:52:32 AM
I haven't done a thorough enough analysis to see if this theory really holds water, but it seems like the files that exhibit this issue contain more than one person, and the cause might possibly be that the order of the persons in the Person In Image list, and the Region Name list differs.

For example, I have a folder containing just 46 images, of which only 1 file exhibits this issue.  In spot-checking the files with multiple annotations, that don't revert to needing write-back, following a Database Diagnostic, it seems that all have the persons listed in the same order, in both the Person In Image , and the Region Name Tags.  But the file with the problem, lists Person-1, Person-2 in the Region Name Tag (which is the order in which the Annotations "visually" appear in the image), while the Person In Image Tag lists them as Person-2, Person-1.  Could this possibly be why the the diagnostic is "resetting" the Needs Writeback status for that Tag for this file?...

Very astute observation! I set up a specific panel layout to show the Person In Image , and the Region Name tags, and reviewed a number of images that did and didn't show the problem. Just as you've observed, images that have the names in these tags in the same order don't show the problem, but images with names in a different order do.

Now the question is, how to fix this w/o having to do it on an individual image basis? And, how to prevent this from happening in the future (if manually adding faces, is it necessary to do so in strictly left-to-right order, for example)?

EDIT: I tried manually editing Region name to put the names in the same L-R order as in the image and in Person In Image. After I wrote the changes (green checkmark), names in Region Name were rewritten in the original (wrong) name order. Although the 'unwritten metadata' pen vanished, it returned after I ran diagnostics, so doing that doesn't seem to be a repair option. I really don't want to delete and replace the green Face boxes individually in several hundred 'wrong' images...
John

Tveloso

Thank you John.

I wonder if doing the opposite update would stick?...(updating the Region Info tags to match the order of Person in image).  Of course that would mean updating all of the "pixel percentage" lists as well (a pretty error prone thing to do manually).

Hopefully this gives Mario enough to work with, to get the underlying issue corrected...(and if there isn't an easy work-around under the current version, at least we'll know that the next release will fix it)
--Tony

Mario

#8
The RegionInfo tag is a complex tag, you cannot manipulate it directly.
IMatch fills it during write-back from the face annotations.

The problem with the different sequence of person labels in PersonInImage and the corresponding variables / file window attributes has been resolved already. See https://www.photools.com/release-notes/
The "PersonInImage" tag was not always updated when the user changed the annotation order in the Viewer. But this tag is unrelated to the XMP face regions which are also filled by IMatch during write-back.

Not sure why the PersonInImage tag could cause repating write-backs.
I cannot reproduce this here (Maybe 40% of my test images have 2 to 10 persons) and so far we could not identify steps or a workflow which produces this.
It is possible that this was a side effect of one of the bugs I have fixed for the next release.

I have 19 open bugs in my list for the next release. The critical last bug I fixed took over two days. Sometimes I fix 10 bugs in an hour. You can never tell before, unfortunately.

If somebody figures out a way to reproduce this, let me know. I can then test it here and see if its i
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook