Mass / Batch Change Person in Image

Started by mnwk, June 24, 2021, 06:58:48 PM

Previous topic - Next topic

mnwk

Version: Imatch 2020.14.2 x64

Hello Community,

a (hopefully) quick question for you. Recently i finally got to digitize a large amount of photos and naturally imported them into imatch. These are photosets with only a single model in them.

The Face Regognition works "resonably" well, but often confuses them with other persons already existing in my database (a few hundred persons already there) - everything as expected. I know there is the possibility to order the files in "Media & Folders" View by person, go to the viewer and change the Person in the Image to the correct one (F2 for Person Editor and Ctrl+A for the Person). Another way would be via the "People" View and look up / correct the person(s) there. This is making my fingers bleed if i have to do that for thousands and thousands of files.
I also know the AI will get better if i train it properly - and i did, even (after confirming some pictures) trained it manually by going through the confirmed/trained faces in Face Manager and de-selecting the not-ideal ones (something in front of face, model looking to high up or down, low-resolution, blurry, etc...). Even with this there are still thousands of misidentified photos. I completely understand why, the models are very look-alike.

So - the question: Is there a faster way to batch-change a few thousands of (wrongly) identified (and not yet confirmed and written back to file) faces in these photos?

I know which person is in the photo (the files are already organized by modelname in foldername, so what i am trying to do is select all files in "Media & Folders" (multiple folders), then order by Person, then select all the files with the "wrong" person in them and change the suggested person to the correct one (how?).
Ideally confirming the face and immediately write back the changes to the file in the process too (this part would be luxury, because via Ctrl+ M -> C and Ctrl + ALT + S this is done very quickly for all of the selected files :)

I searched the forums, read the FAQ and toyed around with attribute-, metadata-editor and so on, but sure there is something i have overlooked?

Thanks in advance!

mnwk

Mario

Quotebut often confuses them with other persons already existing

Check the trained faces for this person in the Face Manager.
Often non-optimal chosen trained faces can impact the recognition rate negatively. Also check how many faces you have ignored for the affected persons. It is easy to overdo it.

There is no "replace person 1 with person 2 for all faces assigned to person 1" feature.

I would just re-run the face recognition on these files after improving the trained faces for the persons which are often mixed up.

Make sure you enter a birth date for persons, if the age of the persons vary a lot. IMatch considers the age of the person and in relation to the image date. This can make a big difference.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mnwk

#2
Hello Mario,

wow - you are quick! Thank you so much for the reaction.

But, as is stated before i have done what you suggested above:

Quote from: Mario on June 24, 2021, 08:03:23 PM
Check the trained faces for this person in the Face Manager.

For the models, there is not one Face rejected or ignored. I also took the time to train the best possible faces from dozens (hundreds in some cases) i confirmed. Birthday is set too. Still, many, many "wrong" identifications.

Again - i don't blame the AI or imatch, i understand that its perfectly normal. Thus i said: the models do look very alike. And i don't want to start talking about (individual) photosets for (a) twin(s) ... as you can imagine: born on the same day, so birthday won't help ;)
I accept these identifications - all i am looking for is a "quicker" way as correcting them all manually in the viewer, via F2 -> Ctrl+A, etc...

Edit: As you specifically mentionend re-running the face-regognition - did that too, same "wrong" results. This is the reason for this thread.

Quote
There is no "replace person 1 with person 2 for all faces assigned to person 1" feature.

Allright, thanks for confirming. Follow-up question: if there is no built-in Method, is there a custom-app, a script-snippet or something i could do via the API to "automate" the process? I am no developer, but wrote several powershell-scripts (and vb- in the old days).

E.g.: give the script the folder(s), it goes through these, asks imatch for "person 1 in image?" if yes -> tell imatch to "set it to person 2", rinse and repeat for each photo in given folder?

This would realy, realy make my life easier.

Thanks again for your quick reply, looking forward to hearing from you again!

Edit 2:

Just to make it clear:
Quote
There is no "replace person 1 with person 2 for all faces assigned to person 1" feature.

To be more specific: "replace person 1 with person 2 for all faces in selected pictures" is what i am searching for.

Mario

Sorry, the API is not accessible via IMWS yet.

That the AI assigns the wrong face to hundreds of faces and also confirms it (so the AI was really sure that the person is correct) is rather unusual.
And even does that again after training the correct person better. Strange. This may happen with identical twins or very similar looking siblings, but is pretty uncommon for other persons.
Maybe train less? 3 to 5 trained faces is usually all it takes.

I could implement a replace face person feature. One or two days of work.
But this was not requested or even discussed once since the IMatch AI was introduced in February 2020. So I don't think that such a feature is needed.
Feel free to add a feature request in the feature request board. This allows other users to comment and support your request.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mnwk

Hello Mario, again thanks for the response.

Quote from: Mario on June 25, 2021, 08:39:21 AM
Sorry, the API is not accessible via IMWS yet.
Dang it ... but thank you anyways.

Quote
Maybe train less? 3 to 5 trained faces is usually all it takes.
I will try that, thanks for the advice.

Quote
I could implement a replace face person feature. One or two days of work.
But this was not requested or even discussed once since the IMatch AI was introduced in February 2020. So I don't think that such a feature is needed.
Feel free to add a feature request in the feature request board. This allows other users to comment and support your request.

Well ... if i am the only one with this "wrong person" problem, nevermind. But i highly doubt it, because always depending on the angle, makeup, lighting, parts of face covered by hair/hand/objects, shots of a model which has a twin, etc... there should be more with this kind of behavior out there. Additionally i think more have their sets folder-wise organized by person, so this "should" be a more common scenario: Grep folder, tell imatch: "everyone in this set is 'person 1'", done -> next set.
But again - I see how far / fast i get with manually assingning the correct person to the face. Maybe i'll create the request in the future :) Until the implementation will happen - i suppose i will be done with the imported photos and already have assigned the correct persons ;)

Thanks again - this topic could be closed from my point of view, question(s) answered.

Kind Regards ... mnwk

Mario

Assuming B is wrongly assigned to faces for A:

- Untrain all faces for B in the Face Manager.
- Select all wrongly assigned images and re-run the face recognition (don't use the "ignore images with face annotations).
- If B is now untrained, A should be the preferred person for this face - I guess.
- Then re-train some faces for B

As always: Make a backup copy of your database before (just copy the database file to another file / folder when IMatch is not running).
This way you can go back and undo any changes quickly.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Stevef48

Quote from: mnwk on June 25, 2021, 02:14:25 PM


Well ... if i am the only one with this "wrong person" problem, nevermind. But i highly doubt it, because always depending on the angle, makeup, lighting, parts of face covered by hair/hand/objects, shots of a model which has a twin, etc... there should be more with this kind of behavior out there. Additionally i think more have their sets folder-wise organized by person, so this "should" be a more common scenario: Grep folder, tell imatch: "everyone in this set is 'person 1'", done -> next set.
But again - I see how far / fast i get with manually assingning the correct person to the face. Maybe i'll create the request in the future :) Until the implementation will happen - i suppose i will be done with the imported photos and already have assigned the correct persons ;)
Kind Regards ... mnwk
[/quote]

You are not alone I too have been searching for a way to bulk change the person selected by face recognition. There are two sets of identical twins in my family, so plenty for the AI to misread.
Thanks in advance,
Steve

Mario

It makes no sense to post feature requests in the general discussion boards. Nobody reads them and they will be forgotten.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook