Qengineering / Face-Recognition-Jetson-Nano

Recognize 2000+ faces on your Jetson Nano with database auto-fill and anti-spoofing
https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html
BSD 3-Clause "New" or "Revised" License
110 stars 31 forks source link

How to stop recognition once a person has already been recognized once #14

Open rsingh2083 opened 2 years ago

rsingh2083 commented 2 years ago

Hi Sir,

Whats happening now : A person is getting recognized continously when infront of the camera. The problem its causing : While saving the time record to csv sheet, the time record of person is being saved multiple times. What is required : Once a person has been recognized the program should stop recognizing him again and again.

Could you please help me with this problem ?

Qengineering commented 2 years ago

It is very hard to give the right solution to your issue, because this behavior isn't happening in the original code. Check these points:

1) At line 317 in the original main.cpp the found face get the index number of the face in the database best matches his. 2) At line 321 the check is made if the face matches the face in the database. If so, the code continues at line 322. 3) If not matches, the code jumps to 351 with NameIndex==-1 4) Here, after some checks, the face is added to the database at line 372.

I think the last step is missing in your code, or isn't reached somehow. Best to debug the code by placing the good old fashion cout << "I am here at line xx" << endl; at several places and follow the flow of the algorithm.

rsingh2083 commented 2 years ago

ok sir