Face-Recognition-Jetson-Nano icon indicating copy to clipboard operation
Face-Recognition-Jetson-Nano copied to clipboard

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

Open rsingh2083 opened this issue 3 years ago • 2 comments

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 ?

rsingh2083 avatar Feb 02 '22 10:02 rsingh2083

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.

Qengineering avatar Feb 02 '22 10:02 Qengineering

ok sir

rsingh2083 avatar Feb 02 '22 17:02 rsingh2083