Recreate Face Annotations from XMP slow and not working.

Started by Damit, February 12, 2024, 10:32:01 PM

Previous topic - Next topic

Damit

I have done extensive face recognition in Lightroom. As much as I would love to just use iMatch for everything, it has proven to be very poor, in my experience, in face matching. I have tried lots of suggestions and the performance is sub-par, especially comparing it to lightroom.  While doing this in the previous version of iMatch, I found the metadata updating, especially replacing or adding new face regions and annotation very inconsistent.  Sometimes a simple rescanning would bring in the information, other times I had to recreate XMP using the recreate XMP face... command, and other times still I had to delete all faces then rescan again. Each time, I made sure to save metadata changes in Lightroom prior to updating them in iMatch, and I checked if Lightroonm had indeed updated the file. 

Unfortunately, iMatch 2023 is performing even worse in this regard. When it scans the XMP for face information it takes a very long time compared to the previous version, but, worse still, it is not updating the face regions or the names very consistently. I have gotten it to do it, but only after multiple passes, so I ran an experiment.  I used the exiftool prior to asking iMatch to update the face annotations and exiftool itself shows the new regions ([XMP-mwg-rs] Region Name: Haydee Fernandez Sal..., Mary Gene Sal...., Jorge Sal...), but when I tell iMatch to find and write this information, it does not. Obviously, I need this to work much more consistently.  Any ideas on why this is happening and how to fix it? The only way I got it to bring in the new face information was to first do a rescan and then recreate the face information using XMP data, but I would swear that I had done that previously and it did not update before.  As I said, the updating of this data has been very inconsistent ever since I started using the program and I find the most recent version even moreso.

Here is a copy of the file with the three face regions.  Exiftool sees them. but when I instruct iMatch to update the file it will not create the three regions but only reports the 2 that were previously there.

Damit

After experimentation, I think I found the process to get this to work. It seems that I must first rescan the file before asking iMatch to Re-create Face Annotations from XMP data. At least the last dozen times I have done this, it has worked.

I still don't understand why it is taking a while to recreate the face annotations in this version.  I believe the last version of iMatch completed this process much faster.

Mario

The feature to import XMP face regions was introduced at the same time face recognition in IMatch was introduced in 2021.
Except for the change to deal with broken XMP face regions produced by many Apple devices (where the region has a width and height of zero), I don't see any change.

IMatch imports the face regions, then performs a face recognition inside the region. When a face is detected, IMatch creates a regular face annotation and uses the tag associated to the region to assign an existing person or to create a new person. If no face is detected, IMatch creates a manual face annotation and uses the tag associated to the region to assign an existing person.

I have downloaded the sample image. It contains one face region for the person in front.
IMatch imports it and since the face is mostly away from the camera, it creates a manual face annotation and person and assigns it to the face.
According to the log file, re-importing the XMP face regions for that image took 0.25 seconds end-to-end. If you process multiple files, IMatch processes multiple files in parallel, which means that about "number of available processor cores" of images are processes in 0.25 seconds.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Damit

Unfortunately, the wrong picture was uploaded :-[ . The one I was working on showed three face regions using the exiftool within iMatch, but when I asked iMatch to recreate face annotations using XMP data, it would not see those face regions until I rescanned it. 
This has occurred at least consecutive 20 times, probably many more, while performing this exercise. I am only reporting this so that you are aware of it in case you want to modify the instructions and have users rescan the photo prior to recreating face annotations from XMP data, because, in my experience, it will not update the face regions until you do so. 
If you want to confirm this, import a photo and create face regions on it.  Then go to another program (I used Lightroom) and create more face regions and save the metadata to the file.  Then go to iMatch and ask it to re-create the face annotations from XMP data and see if it does so. I doubt it will, but if it does, please let me know, as I have to figure out why that is not working here. If it does not, use the exiftool and see if the regions are there.  They should be, as you saved the metadata in the other program.  Then rescan it and try again.  What I have reported should be confirmed, but if it is not, I have to figure out why.  As of now, I will just move along as I have found a method which I believe is reliable to perform this action.

As far as the speed, I am only reporting what I am experiencing.  When I did it in the previous version of I match on an inferior computer, I never once noticed a progress bar, even with folders of hundreds of photos. Now there is a relatively long wait with a progress bar and at times it takes a few minutes.  It is not a big deal, I just want to report what I am experiencing in the hope that it is helpful feedback.

As always, thank you so much for addressing my questions and concerns. It is sincerely appreciated!

Mario

If you find an image which creates this problem, secure it and link it here or send it to support email address with a link back to this thread.
The recreate face annotations from XMP is a very rarely used feature and usually never needed, unless you add face annotations in IMatch and other software. If IMatch has existing face annotations it will protect them.

QuoteAs much as I would love to just use iMatch for everything, it has proven to be very poor, in my experience, in face matching. I
Which version of Lr do you use? Classic or the cloud version? Classic runs local face recognition but their cloud version may utilize the Adobe AI in the cloud for better Fr. Not sure. I have seen very equal results for FR in my Lr Classic version and IMatch.

Usually, when users report about sub-optimal results of the IMatch AI FR, the problem was rejects (no more) or too many trained faces.

Like with all AIs today, your mileage will vary.
In general, I'm very happy about the IMatch FR and it rates at about 96% in the typical benchmarks.

Since IMatch has FR, I have never used the FR in Lr anymore ;D
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Damit

I really really wish I could report I have had the same experience with face tagging in iMatch because it is a pain to use both. I love how powerful and stable iMatch is but its face detection is wanting in my experience and it must be something I did or am doing.

I use lightroom classic so no cloud AI working here. It detects faces much better than iMatch which makes very gross mistakes and really is very inaccurate. I have tried cleaning up confirmed and trained faces but I have a lot of people and it will be very laborious to go through all of them and remove what may exist as an incorrect face.  Something is up, but I cannot figure out what it is. I also like the way you can go folder by folder in Lighroom, with the results in a window that you can use to group faces by dragging and dropping. It is very efficient for me.

I am sure I will come across more problematic images and will send them directly to you next time.