Face Detection Questions

Started by abgestumpft, March 21, 2020, 07:33:39 PM

Previous topic - Next topic

abgestumpft

Hi,

I'm currently checking if I can use iMatch in parrallel to Lightroom 6.1.4 (Last non subscription Version) and maybe then replace Lightroom completely by iMatch (in case everything I need is working).

Right now I'm working with face detection / recognition and some questions came up:

1. When I import images that have a face tag by lightroom, but no name assigned, iMatch will create a new face with a code tag like FFFCDEE8-82F2-48BB-9D83-58DBA63A691C
iMatch will create a new Person with differet code for each person without a name assigned (which in my case is a lot).
Is there an option to ignore faces that have no name assigned during import / meta data refresh?

For example the XMP of one of the files looks like this (mwg-rs:Name tag is missing):
   
<mwg-rs:RegionList>
     <rdf:Bag>
      <rdf:li>
       <rdf:Description
        mwg-rs:Rotation="1.80080"
        mwg-rs:Type="Face">
       <mwg-rs:Area
        stArea:h="0.51932"
        stArea:w="0.34588"
        stArea:x="0.65764"
        stArea:y="0.53449"/>
       </rdf:Description>
      </rdf:li>
     </rdf:Bag>



2. Is there a way to organize Persons in Folders / Subfolders (as with the keywords)?
In Lightroom I have the Person keywords also in folders to keep them grouped (Family, Schoolfriends,...)

3. When I was syncing pictures (actually only the metadata by reloading the xmp file) between Lightroom and iMatch I noticed that the Faces / Persons assigned by iMatch did not show up correctly in Lightroom (but the other way arround it is working). The reason should be that the Persons in iMatch are non-hierarchical and therefore it only stores the name tag (  mwg-rs:Name="PERSONS NAME") but without the hierachie of the person (as it is / was in Lightroom).
I solved this now by specifiying the corresponding Lightroom Person Keyword hierarchie (persons|familiy|PERSONS NAME) in the persons options to auto-assigned it together with the face. This will also add the keyword hierarchie for the person in the xmp file.
Without this Lightroom will read the Person as "PERSONS NAME" (not part of any keyword folders) and therefore be a different tag than persons|familiy|PERSONS NAME.

kind regards
Sebastian



Mario

#1
1. No.
Proper XMP regions with a label are automatically converted and assigned to a person with that label.
If none of your face regions have a label, IMatch creates a synthetic label so the images show up in the Person View.

Why does Lr export "empty" face regions? This does not make much sense.
You can disable the import/export of XMP face regions in IMatch under Edit > Preferences > Metadata 2.

If Lr only stores "face rectangles" in your files, it's better to do it in IMatch and use its built-in face detection and recognition.
Just select the files and run a face detection using Ctrl+M,F.

2. No. There are no folders for Persons.
You can group them and use the search function to quickly find persons by name or tag (including family name, if you use these).

It makes no sense to duplicate features already handled by IMatch categories and other concepts.
You could us e data-driven category to organize your people hierarchically. Or use hierarchical keywords and then the @Keywords Category will automatically manage them hierarchically.

Remember that IMatch has many advanced concept Lr does not have.
Let IMatch associate keywords and/or categories with your persons. This automatically organizes them in @Keywords and/or Categories.

If you want "more" functionality like grouping etc. in the Person View: Add a feature request. Check the other feature request already there for overlap. Many people request new things for People & Faces right now...

3. An XMP region can have only a simple text label. There is no hierarchy or anything.
I think Lr has a proprietary way to manage things, which are not backed by the XMP standard. Maybe keeping some sort of internal hierarchy in the tags, mapped to its proprietary catalog.
Mapping faces back and forth that way will not work. Either manage your faces only in Lr or only in IMatch. Lr has not been designed to be cooperative. Extending simple XMP region labels to do something hierarchical is just another of the proprietary Lr ways...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

Hi Mario,

thanks for you quick reply.

1. In my case I have mixed face rectangles assignments in lightroom: with and without a name assigned.
I would like to keep the ones with a name (which are a lot), but dismiss (or import all without any label assigned) the ones without a name assigned (which are also a lot) .

In the iMatch tab "People" there is the default Person "Unknown Persons" which contains all unassigned Faces in iMatch.
Shouldn't it make more sence to assign all face tags without a name to that one instead of generating a person with a random tag for each unkown face imported?
As said I already have hundrets of persons created in iMatch (one for each unkown face) with the random labels like: FD704071-1860-40AD-870C-8A3CD569AA3B (and currently I'm still testing with limited selection of my pictures in iMatch)

I have attached a screenshot how it looks like at the moment (iMatch will load the Portrait image later and each person will have "1 file"):

Right now I only have the option to import the pictures without faces (but then all of my assignment work in Lighroom is gone) or import all faces creating hundrets of "random people" in iMatch. I can delete them manually, but I need to be very carefull not to delete correct Persons that are listed in between...


2. It would be good to have an option to show only the groups in the people view and expand them on a click.
I will have a lot of persons (and many of them won't be used often) -> they could be hided in a group and I could keep the most important once (family, close friends) visible for quick access.
Otherwise I will have a long mixed list of people sorted alphabetically.

3. Yes, it seems like Lightroom is combining the face name tag with the keyword hierarchie tag:
When I just manually added the line "   <rdf:li>Personen|Familie|PERSONS NAME</rdf:li> " to an XMP File created by iMatch with a person face assigned (mwg-rs:Name="PERSONS NAME") it was shown correctly in Lighroom afterwards.
But for me the option in IMatch to auto-assign the Keyword "Personen|Familie|PERSONS NAME" together with the Persons face is doing the trick. This way mapping the faces back and forth between Lightroom and iMatch is working in my tests. I don't intend to do that in my regular workflow, this is just a test to make sure that the face metadata I create with iMatch is also usable in Lightroom (and most likely many other Programs, since Lightroom is the elephant in the room). For example ACDSee is adding Star Rating, Labels and GPS data according the standard to XMP files (can be read by Lightroom, iMatch,...). But for Keywords and Faces they use their own tags. Very similar to the standard:

<acdsee:keywords>
    <rdf:Bag>
     <rdf:li>Personen|Familie|PERSONS NAME</rdf:li>
    </rdf:Bag>
</acdsee:keywords>

...

       acdsee-rs:Name="PERSONS NAME"
       acdsee-rs:Type="Face"

Once I recognized this I stopped testing ACDSee, since this is a big show-stopper for me: the tags that take by far most of the work (keywords, faces) are stored in a proprietary format -> would be locked in ACDSee forever...

Mario

The general idea for XMP regions is to have a label. I don't know why Lr does not group similar faces under identical labels. Then everything would work as expected.
You can delete the unwanted persons in IMatch easily enough in the People View, which moves them to unknown automatically.
Click the first, Shift+Click the last. <Del>.

Feature request go into the feature request board. Nobody looks for feature requests in the General Discussion board.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Quote from: abgestumpft on March 21, 2020, 07:33:39 PM
1. When I import images that have a face tag by lightroom, but no name assigned, iMatch will create a new face with a code tag like FFFCDEE8-82F2-48BB-9D83-58DBA63A691C...

Quote from: Mario on March 22, 2020, 09:09:45 AM
1. No.
Proper XMP regions with a label are automatically converted and assigned to a person with that label.
If none of your face regions have a label, IMatch creates a synthetic label so the images show up in the Person View.

Mario, this also relates to this Bug Report:

    https://www.photools.com/community/index.php?topic=9909.0

Given that there are other instances of the Region Info lacking the Region Name Tag, this could be affecting a fair number of users.  In particular, those that use Apple Devices.  I would guess that even the professionals might be indexing their personal Mobile Phone Photos with IMatch.

Couldn't IMatch be updated to treat this issue in a similar way to what it will do for the Migration in 2020.3.6?...(as discussed in bug fix #01040)?...

Quote from: Mario on March 22, 2020, 01:01:10 PM
You can delete the unwanted persons in IMatch easily enough in the People View, which moves them to unknown automatically.
Click the first, Shift+Click the last. <Del>.
You should be careful when doing this, that you don't accidentally also delete the "true persons" in your Database.  As discussed in this bug report:

    https://www.photools.com/community/index.php?topic=9913.0

...if you should subset the People View, IMatch will still act upon those People records not shown.  So you'll need to do this in blocks of hex values on the first Byte of the GUID.

The first block is the largest: everything between 00 and 9F should not include any of your Real People, so you can safely delete that block.

But after that, you'll need to select each block based on the high-order digit of the Byte (so all of the A's, then all the B's, etc...separately, up through F).  You may be able to combine some of the blocks if you don't have persons whose names start with one of those letters. 

And as long as you have used mixed case for your People Names, there's no need to worry that "Cathy" will occur in between GUIDs starting CA and CB (i.e. the CAs will sort before "Ca" in Cathy, as will the CBs all the way up to the CFs).  So you can shift-click the range C0 through CF, and delete.

But selecting the entire range of GUIDs will encompass the true people names...(so that's why you must do it in 7 pieces).
--Tony

Mario

#5
Then just wait until I have fixed the selection bug. Should take only a couple of days or weeks, depending how much stuff comes via the community and my email accounts.
Solving the selection issue reported yesterday may take a couple of days alone. Because it affects many things. But it is an important bug and thus I will halt the next release until this is fixed.
There are still 70 emails unread in my inbox. Each may contain other important but reports...

Just be careful when selecting the GUIDs. Like only searching for the - which may not appear in your people names?

As I said in the other related threads: If your device produces useless face annotations in XMP, disable the import in IMatch. Just having a face region without further info is of no use. IMatch can detect faces probably better anyway. Let IMatch detect the faces and assign persons. Then re-enable the XMP region import/export feature. IMatch will then write proper XMP regions with tags/labels on export (if a person is assigned to the face). This also avoids producing GUID persons.

Note that I have already changed the XMP import to deal with these shortcomings. If your device or other software produces XMP face regions without a label, IMatch just throws them all into the "Unknown Person" person.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Thank you so much Mario.

It's the Manage faces in XMP regions setting:

   

...that we should set off until IMatch 2020.3.6 is out, correct?...

Should we also hold off on Writing Back while that setting is off?

It's just incredible that an ordinary end user can get this level of support on a product as rich and deep as IMatch is.  Thank you again, so much, for your support, and your amazing talent!

--Tony

Mario

This feature prevents XMP region import. And also export during write-back.
This was so far always coupled.

To overcome the "bad face annotations exist in images but user wants to write rich face regions produced by IMatch" I have separated reading XMP regions and writing XMP regions for one of the next releases.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

Hi Mario,

regarding this:
Quote"Note that I have already changed the XMP import to deal with these shortcomings. If your device or other software produces XMP face regions without a label, IMatch just throws them all into the "Unknown Person" person."
Thanks! This is what I meant in point 1. when I was writing:
QuoteIn the iMatch tab "People" there is the default Person "Unknown Persons" which contains all unassigned Faces in iMatch.
Shouldn't it make more sence to assign all face tags without a name to that one instead of generating a person with a random tag for each unkown face imported?

For Point 2 (Grouping of Persons), I have opened a feature request now:
https://www.photools.com/community/index.php?topic=9919.0