Author Topic: Changing Face Boxes does not trigger "unwritten Metadata" flag  (Read 134 times)

abgestumpft

  • New Members
  • *
  • Posts: 48
Hi,

not sure if this is a feature or a bug :-)

Example:
I have an image with one or more faces assigned and metadata is written to file (no pencil symbol)

Now a "file has unwritten metadata" pencil sign is not triggered when:
1. I now move / rotate / change size of an existing face box
2. I add a new face box (but do not assign a name to it)

It seems that this "file has unwritten metadata" is only triggered when adding/changing a persons Name

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 24491
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #1 on: March 25, 2020, 08:21:12 PM »
The only metadata affected by this are XMP regions. And these are only processed during write-back.
If you really want to write-back the file every time you move a face annotation, also change some other metadata.

This is not a bug. This behavior is by design.

abgestumpft

  • New Members
  • *
  • Posts: 48
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #2 on: March 25, 2020, 10:45:19 PM »
OK, so is it also intentional that when moving/resizing a face and afterwards I write metadata via Commands -> Metadata Write-back-> for selected files... the XMP file changes (updated timestamp) but the coordinates of the face box in the XMP is still the old position?

The position is only updated in the XMP when changing some other metadata too...

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 24491
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #3 on: March 25, 2020, 11:00:01 PM »
I need to try that.
Does the PersonInImage tag not change?
The region coordinates are produced during write-back from the regions. They should always be current.
Which IMatch version are you using?

abgestumpft

  • New Members
  • *
  • Posts: 48
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #4 on: March 26, 2020, 09:03:48 AM »
I'm using iMatch 2020.3.4

Currently I don't find a scenario were I can reproduce the issue everytime. It just seems to happen sometimes (not very often, but e.g. the very first time I did the manual force of metadata writeback -> why I updated thread yesterday).

Now I did some more testing and most of the time this happens:
-I move a face box in the viewer (no change of Persons Name) -> afterwards no pensil sign appears for metadata writeback
-I havt to force Metadatawriteback via command menu

Now those tags change (which is OK):
Code: [Select]
       <stArea:x>0.216976</stArea:x>
       <stArea:y>0.726426</stArea:y>

  <xmp:MetadataDate>2020-03-26T08:51:59+01:00</xmp:MetadataDate>
  <xmp:ModifyDate>2020-03-26T08:51:59+01:00</xmp:ModifyDate>

  <xmpMM:InstanceID>xmp.iid:235ce6d9-1b75-4396-9dd8-d7fcab07de23</xmpMM:InstanceID>

But sometimes (I found it now twice) the <stArea:x> and <stArea:y> are not updated (as said, I haven't found out exactly in which situtation that happens).

I still think that when a face is moved (which is changing Metadata listed above) the file should be marked as "file has unwritten metadata"

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 24491
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #5 on: March 26, 2020, 10:51:39 AM »
Try with the current version.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 24491
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #6 on: March 26, 2020, 02:55:18 PM »
Several problems with that:

a) The region data in XMP is only 'created' during write-back, from the then current annotation objects.
b) This means when IMatch would flag the file as pending write-back, the pen tooltip would be empty, showing nothing to write. Because no tag was changed. Users will complain and report a bug.
c) Changing all face regions structs in XMP every time an annotation is moved would be too time-consuming (to have some tags to flag as pending in that case)...
d) This also must depend on whether or not the user has enabled to persist face annotations as XMP regions.

Not sure if this is really a problem that needs fixing.
What do other users think?
« Last Edit: March 26, 2020, 02:58:36 PM by Mario »

Tveloso

  • Full Member
  • **
  • Posts: 113
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #7 on: March 26, 2020, 07:01:20 PM »
Mario, I’m not sure of this, but I’m thinking that under IMatch 2019, resizing/moving face Annotations did trigger a pending Write-back...(and the “tag” that was pending was simply MWG Region Info, no matter how many elements in that structure actually changed).

I know that updating existing Face Annotations did trigger a pending Write-back, but I’m not certain that altering just the position/size of the face rectangle only, also triggered it, or if I just think it did...but I would vote for that behavior in IMatch2020 (to trigger a Pending Write-back for MWG Region Info, no matter what was changed there).

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 24491
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #8 on: March 26, 2020, 07:04:37 PM »
Why?
Do you always write back after changing face regions? Do you feed other applications with the face regions?
Note that reading XMP face regions and writing XMP face regions is now separated and completely optional.

1% of the IMatch 2018/2019 users have used face annotations.
I guess 90% of all IMatch 2020 users will use face features now.

Before 2020, you have created face annotations individually or in small batches.
IMatch 2020 can change 10,000 face regions when it clusters persons. Each change may require to update the complex XMP region struct - just to mark the file as pending. Very time-consuming. This can double or triple the runtime of the background processes.
« Last Edit: March 26, 2020, 07:07:48 PM by Mario »

Tveloso

  • Full Member
  • **
  • Posts: 113
Re: Changing Face Boxes does not trigger "unwritten Metadata" flag
« Reply #9 on: March 26, 2020, 07:59:15 PM »
Mario, I was thinking only for previously Confirmed faces, for which the Annotation is re-sized/re-positioned a bit, that I would like for a Write-back to be triggered, as a result of that update...(and not when IMatch is "batch re-assigning" Unconfirmed faces, in the background due to the AI learning from the user's activity, if I'm understanding you correctly).

But if it's the expected behavior now, for that to not trigger the Writeback, that would be ok too.