Closed rsingh2083 closed 3 years ago
That's easy this time. At line 41 in main.cpp you will find const int MinHeightFace = 90;
preventing small faces to be analyzed.
You can always alter this number. You have to recompile the code afterwards.
I changed it to 500 but still its not working sir.
Strange. Looking at line 432 and 457 if(Faces[i].rect.height < MinHeightFace){
it should work.
If you have altered the code, this is the condition to use in your part.
Strange. Looking at line 432 and 457
if(Faces[i].rect.height < MinHeightFace){
it should work. If you have altered the code, this is the condition to use in your part.
Sir can you please check again, I tried all values but it doesnt seem to work. If MinHeightFace is actual parameter to change or do I need to change something in header files of arcface etc ?
It should work as follows: Faces smaller than MinHeightFace are labelled "too tiny", Faces larger than MinHeightFace are send to the next recognition stage. I though it works well if you have 'too tiny' as label, or, am I missing something here?
I though it works well if you have 'too tiny' as label, or, am I missing something here?
Actually I want only very very close faces to be recognized. Hence I set MinHeightFace = 500, but its no different than MinHeightFace=90. The bahaviour of code/recognition is same
At line 352 main.cpp you see the output of the face detection
for(i=0;i<Faces.size();i++){
float x1 = Faces[i].rect.x;
float y1 = Faces[i].rect.y;
float x2 = Faces[i].rect.width+x1;
float y2 = Faces[i].rect.height+y1;
The variable Faces[i].rect.width or Faces[i].rect.height gives you a direct information about the size of the face.
Please note, the input image has been cropped from the original size (say 640x480) to (320x240) = RetinaWidth x RetinaHeight at Line 324 main.cpp
ScaleX = ((float) frame.cols) / RetinaWidth;
ScaleY = ((float) frame.rows) / RetinaHeight;
Your face will be max 240 pixel of height.
Hi Sir, I want the face recognition to start working only when someone is lets say less than 2 feet near to the camera. I dont want to recognize distant people. Can you tell me which like to tweak , ill change as per my requirement.