How to turn "automatically assign this person to faces" off for several Persons

Started by axel.hennig, February 09, 2025, 04:29:48 PM

Previous topic - Next topic

axel.hennig

Problem
I have more than 500 Persons in the People-view. Most of them - I'm pretty sure - I will never see again in my life (sports club during my university time). Although, the IMatch Face-AI is really very good, I would like to turn off "automatically assign this person to faces" in the Person Editor for most of the Persons.

But, I don't want to go through all of these Persons via Person Editor and klick the corresponding button. This functionality is not available via IMWS (I've asked here:  https://www.photools.com/community/index.php/topic,14739.msg103587.html#msg103587), therefore it's not possible to write an app to do that.

My solution is (or will be, I've currently just tested it with a IMatch-test-DB):

  • In People-view, use the three dots to "Export People..." (in *.json-format).
  • Use jq (https://jqlang.org/) to manipulate the "IMatch_People.json" file. jq is a lightweight and flexible command-line JSON processor and it's free.
  • Import the manipulated / changed "IMatch_People.json" file back into IMatch (People view -> three dots -> "Import People...").

What exactly needs to be done in step 2: I've used a "*.bat" file with the following code (be careful with the quotation marks '"'):

jq-win64.exe ".data.people.[].values += {"dontAssign": [""true""]}" IMatch_People.json>IMatch_People_reimport.json

This adds

"dontAssign": [
            "true"
          ]

to each Person.

Now one can use the file "IMatch_People_reimport.json" to (re-)import it to IMatch.

All Persons now should have "automatically assign this person to faces" off and one can turn on the - hopefully much less - ones needed.

If you want to test it, use a test-IMatch-database. Afterwards make a backup of your "real" IMatch-database and try it there.

Hint: More advanced turn on / turn off possible via jq-filtering...