"Missing keywords..." Warnings persist across Diagnostics runs

Started by Tveloso, August 15, 2020, 03:50:59 AM

Previous topic - Next topic

Tveloso

For quite some time, every Database Diagnostics I have run has given more than a dozen "Missing keywords..." warnings.  I mostly disregarded them until the count held at 22 such warnings for a few days, and I then noticed that they were actually the very same warnings every time. 

More recently, that count has grown to these 24 warnings:


    Warning: Missing keywords for entity [260] for file [27220]. Fixed.
    Warning: Missing keywords for entity [260] for file [28440]. Fixed.
    Warning: Missing keywords for entity [204] for file [29994]. Fixed.
    Warning: Missing keywords for entity [204] for file [29995]. Fixed.
    Warning: Missing keywords for entity [204] for file [30227]. Fixed.
    Warning: Missing keywords for entity [204] for file [30232]. Fixed.
    Warning: Missing keywords for entity [204] for file [44527]. Fixed.
    Warning: Missing keywords for entity [204] for file [44528]. Fixed.
    Warning: Missing keywords for entity [260] for file [51657]. Fixed.
    Warning: Missing keywords for entity [260] for file [51864]. Fixed.
    Warning: Missing keywords for entity [204] for file [54168]. Fixed.
    Warning: Missing keywords for entity [204] for file [54213]. Fixed.
    Warning: Missing keywords for entity [204] for file [54219]. Fixed.
    Warning: Missing keywords for entity [204] for file [54308]. Fixed.
    Warning: Missing keywords for entity [204] for file [54387]. Fixed.
    Warning: Missing keywords for entity [204] for file [54422]. Fixed.
    Warning: Missing keywords for entity [204] for file [54445]. Fixed.
    Warning: Missing keywords for entity [204] for file [54488]. Fixed.
    Warning: Missing keywords for entity [204] for file [54605]. Fixed.
    Warning: Missing keywords for entity [204] for file [54637]. Fixed.
    Warning: Missing keywords for entity [204] for file [54731]. Fixed.
    Warning: Missing keywords for entity [204] for file [54783]. Fixed.
    Warning: Missing keywords for entity [204] for file [54789]. Fixed.
    Warning: Missing keywords for entity [204] for file [54863]. Fixed.


...and despite the warning messages indicating that the condition was fixed, it in fact is not being fixed, as those same warnings keep re-appearing with each Diagnostics run (even on two consecutive runs - using the Start Again button in the Database Diagnostics dialog).

So I set out to see if I could get these warnings corrected...but nothing I have tried so far has removed the warning for the specific file I was testing with.

I thought I should report this here, just in case this might help identify a possibly more significant underlying issue.  Prior to trying to correct the warnings, I turned on Debug Logging, and ran two consecutive Database Diagnostics, where the Warnings remained constant and I'll send all three logs (2 diagnostic logs, and the Debug Log) to the support email address, in case this might help identify something.

So using the first warning message:

    "...for entity [260] for file [27220]"

I identified the file that ID 27220 represented...thanks to other topics here in the community, where Mario explained that this URL:

    http://127.0.0.1:50519/v1/files?auth_token=&fields=filename&prettyprint=true&id=27220

...would provide that information.

Then looking at that file (which thankfully contained only two faces), I guessed that the order in which the OIDs were listed by this varialbe in the VarToy App:

    {File.Persons.OID}

...might also correspond to the Annotation Order (i.e. pressing "O" in the viewer to show the order numbers), allowing me to identify the person.

I spot-checked a few of the other Files from the Warnings List (with the other Person OID), and while that theory held true for several more of the files I looked at, unfortunately I also encountered Files where it did not (i.e. where the Person OID from the warning message did not appear in the position - in the list returned by {File.Persons.OID} - that corresponded to the Annotation order).  I suspect that this may have been due to the issue discussed in this topic:

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

...and that the order probably should have been the same for those files where varied.

But with subsequent testing I was sure that entity 260 from the first warning, was in fact the person I thought (as initially found by the Annotation Order).  Also, that File did have the required Keywords for both Persons...(so the condition the Warning described did not actually appear to exist).

I proceeded to try to get that warning corrected via "manual user activity"...I did the following:

    Re-select the person
    In the Viewer, click the Annotation
    Press F2
    Select the person again via Ctrl-1
    wait for "Updating Person" message to disappear
    Close Viewer
    Run Diagnostic
    No change - still had the 24 "Missing Keywords" warnings

    Delete and re-create the Annotation
    In the Viewer, click the Annotation and press the Delete key
    Exit the Viewer and wait for "Matching Faces" procedure to complete (Info & Activity Panel)
    Press Enter to send the file to the viewer again
    F6-->Add a new Face Annotation
    Position and Size the Annotation, and click the Blue CheckMark
    IMatch assigns the correct person (already confirmed)
    Exit the Viewer and wait for "Matching Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostic
    No change - 24 "Missing Keywords" warnings


    Delete and re-create the Annotation (with "embedded" Diagnostics run)
    In the Viewer, click the Annotation and press the Delete key
    Exit the Viewer and wait for "Matching Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostics
    Now there are 23 Warnings (the file in question is no longer called out)
    Press Enter to send the file to the viewer again
    F6-->Add a new Face Annotation
    Position and Size the Annotation, and click the Blue CheckMark
    IMatch assigns the correct person (already confirmed)
    Exit the Viewer and wait for "Matching Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostic
    The 24 Warnings are back (the file in question is back on the list)

(I was surprised by this one...I fully expected the Warnings list to hold at 23, after the second Diagnostic)

    Re-create Face Annotations via F6 in the Viewer
    In the Viewer, press F6 and select "Remove existing...and run face detection again"
    IMatch assigns the correct persons to both faces (already confirmed)
    Exit the Viewer and wait for "Mathing Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostics
    No change - 24 "Missing Keywords" warnings

    Delete and re-create all Annotations (with "embedded" Diagnostics run)
    In the Viewer, press Ctrl-A, and Delete
    Exit the Viewer and wait for "Mathing Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostics
    Now there are 23 Warnings (the file in question is no longer called out)
    Press Enter to send the file to the viewer again
    F6
    IMatch assigns the correct persons to both faces (already confirmed)
    Exit the Viewer and wait for "Mathing Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostic
    The 24 Warnings are back (the file in question is back on the list)

    Remove the File from the Database and re-scan the folder
    In the File Window, right-click and select Additional Functions-->Remove File(s) from Database
    Wait for "Mathing Faces" procedure to complete (Info & Activity Panel)
    Re-Scan the folder
    Run Diagnostics
    Now there are 23 Warnings (the file in question is no longer called out)
    Press Enter to send the file to the viewer again
    F6
    IMatch assigns the correct persons to both faces (already confirmed)
    Exit the Viewer and wait for "Mathing Faces" procedure to complete (Info & Activity Panel)
    Run Diagnostic
    The 24 Warnings are back

This was really unexpected...I was almost sure that this would resolve the issue, but the file was now back on the list of warnings (now as the last entry, instead of the first, and with a different FileID as expected):

    Warning: Missing keywords for entity [260] for file [62378]. Fixed.


    Warning: Missing keywords for entity [260] for file [28440]. Fixed.
    Warning: Missing keywords for entity [204] for file [29994]. Fixed.
    Warning: Missing keywords for entity [204] for file [29995]. Fixed.
    Warning: Missing keywords for entity [204] for file [30227]. Fixed.
    Warning: Missing keywords for entity [204] for file [30232]. Fixed.
    Warning: Missing keywords for entity [204] for file [44527]. Fixed.
    Warning: Missing keywords for entity [204] for file [44528]. Fixed.
    Warning: Missing keywords for entity [260] for file [51657]. Fixed.
    Warning: Missing keywords for entity [260] for file [51864]. Fixed.
    Warning: Missing keywords for entity [204] for file [54168]. Fixed.
    Warning: Missing keywords for entity [204] for file [54213]. Fixed.
    Warning: Missing keywords for entity [204] for file [54219]. Fixed.
    Warning: Missing keywords for entity [204] for file [54308]. Fixed.
    Warning: Missing keywords for entity [204] for file [54387]. Fixed.
    Warning: Missing keywords for entity [204] for file [54422]. Fixed.
    Warning: Missing keywords for entity [204] for file [54445]. Fixed.
    Warning: Missing keywords for entity [204] for file [54488]. Fixed.
    Warning: Missing keywords for entity [204] for file [54605]. Fixed.
    Warning: Missing keywords for entity [204] for file [54637]. Fixed.
    Warning: Missing keywords for entity [204] for file [54731]. Fixed.
    Warning: Missing keywords for entity [204] for file [54783]. Fixed.
    Warning: Missing keywords for entity [204] for file [54789]. Fixed.
    Warning: Missing keywords for entity [204] for file [54863]. Fixed.
    Warning: Missing keywords for entity [260] for file [62378]. Fixed.


I also tried deleting the Keyword for person 260 in that file (thereby making the warning message true).  When I ran the next diagnostic, the same 24 Warnings were listed (as expected), and now the Keyword had in fact been added back by the Diagnostics (so the condition had been Fixed).  But another Diagnostics run still reported that Warning (I still had the same 24 warnings).

So everything I've tried so far, has not removed the Warning for the file I've been testing with...
--Tony

Mario

To find a file from the OID (unique id) just type in the OID into the File Data sample app.
It is usually hidden (if no developer mode is active) so you can use this URL:

http://127.0.0.1:50519/imatch/apps/filedata/index.html

Check the keywords you have assigned to the persons affected by this, your thesaurus and which keywords under which conditions cause this.
If you assign a person to a face, the file should show the keywords in the Keyword Panel. If something is wrong or missing, we need to know exactly what. Which keywords of the person were not assigned etc.

Or maybe the test is wrong in the diagnosis. I need to know which keywords are associated with the person, which keywords are assigned to the file etc. to produce a repro case. Since this was not reported before, it might be something that happens only for your specific database/workflow/keyword setup.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Mario, so far I have only added the "WHO Keywords" in the Person records...(WHO|People|LastName|FirstName).  And for the file I was testing with, that Keyword does get successfully assigned to the file, whenever the Annotation is added (when the Annotation is added, either manually by me, or automatically by IMatch - and in both cases, it's a "true Face" that gets the correct person assigned, already in a Confirmed state).

The person in question (with OID 260), has a little more than 30 confirmed faces, and only 4 of those are appearing on the warnings list.  The other person also has relatively few files I think...I'll have to take a closer look at that one.

What strikes me as really strange is that even completely removing the file from the database, still puts it back on that warning list, once it's added back, and Face Recognition is run for it.

I'll check the Thesaurus a little later today, and will report back (there was a small period of time, while I was initially creating the person records in IMatch 2020, that I had the option to add the Keywords to the Thesaurus unchecked...I'm not sure how many person records I created with that option turned off - just a few I think)
--Tony

Tveloso

It turns out that neither of the Persons that are mentioned in the "Missing Keywords..." Warnings had an entry in the Thesaurus.

I added them both (being very careful to exactly match the Keywords that were already in the files), but another Database Diagnostic turned up the same 24 Warnings.

I also tried deleting and adding back the Face Annotations in the test file.  Interestingly, IMatch did not assign the correct persons this time (it had, every time before), but instead assigned an incorrect person (Unconfirmed) to Person-1 (not one of the two Persons listed in the warnings), and did not assign a person to the Person in question (OID 260)...that face remained an unknown person (with the red question below the Annotation).

But after pressing F2 on each annotation, and assigning the correct persons, another Database Diagnostics still called out the Missing Keywords Warning for OID 260.

I'll keep an eye on this, and will report back, if that warning list grows, (and hopefully will also find something that perhaps I'm doing to cause this).
--Tony

Tveloso

I believe I have found a procedure to "fix" the recurring "Missing keywords..." warnings.

Just to recap my issue:

  • There were two Persons (OIDs 204 and 260) that were continually listed with "Missing keywords..." warnings in each Database Diagnostics I ran (4 warnings for OID 260, and 20 for OID 204).  In each case, only one Keyword had been assigned to the Person, in Person Editor, and that Keyword did appear in the files that were being called out in the warnings.  In addition, these two persons also appeared in other files that did not have the warnings (and there did not appear to be any difference in the "person Keyword" assignment for the files that did and did not have the warning).
  • For Person 260, I tried re-assigning the Person to the Face in one of the files (F2 in the Viewer), deleting and re-adding the Face Annotation, and removing the File itself from the database, and then re-scanning the folder to bring it back.  In each case the "Missing keywords..." warning for that File/Person returned to the list of warnings (and it was seen to not be on the list, while the file or face was removed).
Yesterday I decided to give removing and re-adding the Keyword in the Person record a try, for the Person with OID 260, and that appears to have addressed the issue (doing that removed all 4 warnings for that person from the Diagnostics log).

I repeated the process for OID 204, with Debug Logging turned on.  I'll send the logs to the support email address in case they might help identify some underlying issue behind this.

The steps I took while Debug logging was on were as follows:

Initial State
In People View, the Person with OID 204 appeared with 55 files, 7 uncomfirmed (for a total of 48 files confirmed for the person).  The @Keywords Category for this person contained 48 Files (so both Views were in agreement). 

A Database diagnostics contained 20 instances of the "Missing keywords..." warning (all for this person)...so 20 of the files for this person were being called out as having an issue, and the other 28 were not.

Run two consecutive Diagnostics
I ran a Database Diagnostics, and upon completion, ran another using the Start Again button in the Database Diagnostics dialog.  Both logs listed the same "Missing keywords..." warnings.

Remove the Keyword from the Person Record
I double-clicked the person in People View to open the Person Editor, Clicked the "x" on the Button for the Keyword (for the only keyword assigned to that person), and saved the record.

This removed the Keyword from only 28 of the 48 Files this person was tagged in (i.e. it left the keyword in the 20 files that were being called out in the diagnostics). 

(This also happened when I did this for the person with OID 260 previously - there, the person originally had over 30 Files, and after removing the Keyword in the Person Record, it was removed fropm all but 4 files - i.e. 4 files remained in the @Keywords Category - the same 4 files called out in the diagnostics)

Manually remove the Keyword from the remaining 20 Files
In the Category View, I selected the @keywords Category for the person, pressed Ctrl-A in the File Window, Ctrl-clicked the Keyword in the Keyword Panel, and clicked the green check to delete the Keyword from all selected files.  The file window now showed no files.

Remove the Keyword from the Thesaurus
When this Person Record was originally created, and this keyword was originally added there, the Add new keywords to the thesasurus option was not checked, so the keyword was not originally added to the Thesaurus.  I had added it manually during previous testing, so I deleted it once again, just to "reset" everything.

Add the Keyword back to the Person Record
I double-clicked the person in People View to open the Person Editor, entered the same hierarcical Keyword in the Keywords field, pressed enter to create the "Keyword button", and saved the record.

This added the keyword to all 48 files that this person was confirmed in (i.e. the @Keywords Category for this person once again contained 48 files).

Run another Database Diagnostics
Another Database Diagnostics completed successfully with no errors or warnings.

Perhaps this was some left-over issue created in early versions of IMatch 2020 (although it's still surprising that completely removing one of the affected files from the database, and then adding it back, also brought back the warning for that file). 

But it looks like all is well here, and I'm back to having a clean Diagnostics.
--Tony

Mario

This sounds like some pretty weird left-over from an early 2020 version, maybe caused by a bug or an unwanted side-effect or something else.
Since this seems to be a unique case and you have figured out how to fix it in your database, I'd say we close this. Virtually impossible to tell how this was caused.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook