Face Manager: annotation is Rejected and Trained at the same time

Started by abgestumpft, April 13, 2020, 10:04:32 AM

Previous topic - Next topic

abgestumpft

Hi,

I have this several times for different persons:
A face annotation is both listed as Rejected and Trained at the same time. In each case this was the wrong person -> should be rejected. At the moment I cannot explain how this happened, maybe I accidently confirmed the face and then very quickly changed it to the correct person afterwards...

I now tried two different approaches to solve this:

1. Untrain
- "Show Trained Faces" -> "T" for untrain -> save -> shortly disappears, but then its back again
- Going to "Show Rejected Faces" -> "R" for reject -> save -> now dissappears both in Rejected AND Trained faces

and

2. Delete Rejected face only
1. Going to "Show Rejected Faces" -> "R" for reject -> save -> now dissappears both in Rejected AND Trained faces

How can I make sure that (in this special scenario) the trained face is now really deleted from the DB and not used for face recognition anymore?
Since I cannot actively untrain it, and only deleteing the reject on the face will also remove the training it looks like those annotations are somewhat in a strange state (maybe even after my actions above but I don't see them anymore...)

Mario

I don't understand.
You did what and where?

Did you fist train and confirm the face in FM and then reject it?
Or was this a face already in the DB?
If a face is rejected, it won't be used. Trained or not.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

With the new Face Manager I recognized that for several persons I have faces that are rejected and trained at the same time.
It is looking tike that in Face Manager (both visible under rejected and trained faces, I blurred the face for internet sharing):


So the starting situation was, that in the existing iMatch Database (coming forom 2020.3.6) I already had several person assignments in the state above (rejected and trained at the same time).

To solve this I tried first in the Face Manager to untrain the face (because "rejected" is the correct state for all faces I have with rejected&trained at same time):
- "Show Trained Faces" -> "T" for untrain -> save -> shortly disappears, but then its back again
So untraining did not do anything on an image -> still rejected&trained afterwards. So I tried to remove the rejected flag via Face Manager:
- Going to "Show Rejected Faces" -> "R" for reject (to remove the "rejected flag"-> save -> now dissappears both in Rejected AND Trained faces
This means after I then removed the reject, BOTH the reject AND the trained face disappeared.

So I tested what happens to a face that is rejected&trained at same time, when I only remove the reject flag (without doing anything to the trained face upfront):
- Going to "Show Rejected Faces" -> "R" for reject -> save -> now dissappears both in Rejected AND Trained faces
Then also both, the rejected AND the trained face disappeared.

Now I'm not sure what happens if I remove all the double faces with rejected and trained at the same time this way:
Are they really gone now (because I did not actively remove the "trained" face), or is there anything left in the DB (that can cause problems with face recognition)?

Mario

Maybe be a left-over from a previous version.
Just reject two times to toggle. This should remove the confirm and trained. Then save.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

For me this is the behaviour:

Two times reject "R":
1. After First Reject -> Reject disappeared, Trained Face still visible
2. Second Reject -> Trained Face removed and face marked as rejected
"Save Changes"
Image Back with "Trained & Rejected" -> No change


One times reject "R"
1. First Reject -> Reject disappeared, Trained Face still visible
"Save Changes"
Image completely disappeared (NOT trained or rejected anymore)

So before pressing save, the state of the face with "Two time R" looks good, but after save it is back again with Trained&Rejected.
Only pressing once "R" shows the face as "Trained" before pressing save, but after pressing save both the rejected and trained version of the face dissapear.

-> The soltution is to only press the "R" once and then confirm.

Still I'm a little unsure if the state of the person is now a little bit messed up (because the "trained" version of that face magically disappeared without me removing anything actively


Mario

When I reject a trained face in the FM and save, it is removed from the FM. OK.
The face has the states confirmed and trained removed. OK.

Did you run a database diagnosis? Any problems reported?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

What I did now was:
1. Run Database Diagnosis: a lot of warning on faces (fixed)

2. Opened Face Manager, selected a face that was in "Trained & Rejected"
3. Pressed one time "R" -> Reject disappeared, Trained Face still visible
4. Pressed "Save Changes" -> BOTH Rejected AND trained face disappeared

5. Run Database Diagnosis again, resulting in those warnings on faces:
PersonManager Stats:
    Files with faces: 14197
    Persons: 57
    Faces: 14197
    Confirmed: 13109
    Unconfirmed: 887
    Unassigned: 201
    Warning: Face [33135] for file [7846] has no annotation object. Face removed.
    Warning: Face [33134] for file [7846] has no annotation object. Face removed.
    Warning: Face [33133] for file [7846] has no annotation object. Face removed.
    Warning: Face [33132] for file [7846] has no annotation object. Face removed.
    Warning: Face [33135] for file [7846] has no annotation object. Face removed.
    Warning: Face [33134] for file [7846] has no annotation object. Face removed.
    Warning: Face [33133] for file [7846] has no annotation object. Face removed.
    Warning: Face [33132] for file [7846] has no annotation object. Face removed.
    Warning: Face [33135] for file [7846] has no annotation object. Face removed.
    Warning: Face [33134] for file [7846] has no annotation object. Face removed.
    Warning: Face [33133] for file [7846] has no annotation object. Face removed.
    Warning: Face [33132] for file [7846] has no annotation object. Face removed.
    Warning: Face [33135] for file [7846] has no annotation object. Face removed.
    Warning: Face [33134] for file [7846] has no annotation object. Face removed.
    Warning: Face [33133] for file [7846] has no annotation object. Face removed.
    Warning: Face [33132] for file [7846] has no annotation object. Face removed.
    Warning: Removing 4 invalid entries from face index.
    Files: 14197
    Faces: 26071
    Entities: 25606. Confirmed: 23673
    Entity keywords: 23673.
    Vector data size: 14573KB
    Thumbnail data size: 296139KB
    Annotations without face data: 6750KB


Since I did not change any other face annotation and all warning are for file [7846] I guess this was the file that had the face annotation with "Trained & Rejected" I just removed.
On this file [7846] there are 16 warnings, but four times repeaded the same for Face [33132], Face [33133], Face [33134] and Face [33135]. Those were removed from the face index ("Removing 4 invalid entries from face index.") - not sure why there are four face tags on that image though...

I have those "Trained & Rejected" faces mainly for my family members with a lot of faces were I also had bad hitrate on face recognition (there were also some discussion how many trained faces are needed). Still I had bad hitrates after I deleted all trained faces for such a person in iMatch 2020.3.6.
I think / hope that this was because those double entries with "Trained & Rejected" face annotation were not visible in the old Persons "Review Trained Faces", and therefore could not be deleted.



Mario

I don't follow.

Is this now solved?
What does "BOTH Rejected AND trained face disappeared" mean?
It disappeared where? In the FM? This is normal, because the face exists only once. If you reject it and save, it will vanish from the FM.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

abgestumpft

I had several (maybe 20 in total) Face Annotations that appeared in the Face Manager both under "Trained" and "Rejected" faces at the same time.
This can also be seen by the screenshot in this post:
https://www.photools.com/community/index.php?topic=10044.msg71223#msg71223

It has both: Orange Frame for recejted and blue Person for trained face.

When I pressed two times "R" in the Face Manager on such a face after the first "R" it changed in face manager to "Reject disappeared, Trained Face still visible" and after second press of "R" it changed to "Trained Face removed and face marked as rejected" -> what I wanted. BUT after then pressing the "Save changes" button for that person, this face annotation was back to original state, showing both "Trained" and "Rejected" at the same time.

I managed to solve this now by only pressing one time "R" -> Face Manager was showing the face still marked as trained face before saving, but after pressing "Saving changes" the face annotation completely disappeared from the face Manager (both the "Rejected" and the "Trained" version of that face annotation).
Then, when running the Database Diagnostics, I got some warnings like "Face [33134] for file [7846] has no annotation object. Face removed.", so something was fixed...

Now I have deleted all the problem face annotations (pressing one time "R" in face manager and saving) that were showing up under "Trained" and "Rejected" at the same time and run the Database Diagnostics.

I hope that this is solved now and I don't have any hidden/buggy stuff left for those persons in the Database...



abgestumpft

I'm currently playing around with the DB Version where I still had the trained and Rejected face annotations at the same time.

When I check there in the Face Manager for one specific Person:
Trained Faces: 19 (5 of them are marked both as trained and rejected at the same time)
Ignored Faces: 8

Checking the DB directly via SQL:
select COUNT(*) from face_data WHERE entity_oid = 2232 and train = 1;
14

select COUNT(*) from face_data_reject WHERE entity_oid = 2232;
8

The 19 shown in the Face Manager under Trained faces minus the 5 (that are marked as trained and rejected) = 14 (what is returned from direct SQL).
So the Database itself looks OK, but were does the Face Manager get those 5 confirmed faces from?