Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to increase number of simultaneous face detection in one frame #2

Open
rahulsharma11 opened this issue Feb 21, 2019 · 5 comments
Open

Comments

@rahulsharma11
Copy link

Hi,
Thanks for the awesome project.
Here i tested for the max number of simultaneous face recognition/detection (in one frame) is 3 . Can i increase this number?
In older version "FaceRecognition" there is a parameter "maxFaceNum" that can be used to increase simultaneous number of face detection. Is there something same in this project?
Thanks.

@rahulsharma11 rahulsharma11 changed the title How to increase number of face detection. How to increase number of simultaneous face detection in one frame Feb 21, 2019
@xcls1117
Copy link

@rahulsharma11 Yes, see facecaffe/face_demo.cpp: std::string FaceDemo::Recognize(cv::Mat &frame, int face_num)
you can see max number is set when it's called, and called here:
facecaffe/AlgThread.cpp: line 60 (default set to 3)
std::string ss = mFace_demo.Recognize(mRgb, 3);

@rahulsharma11
Copy link
Author

Ok....Thanks.
I did change that to "5".
Then it was throwing segmantation fault. I also changed here-
facecaffe/AlgThread.cpp: line 164 : for(int icount = 3; icount > atoi(sub[1]); icount--) to "icount=5"
Then there was no error but as soon it detects 4 faces, it shuts down giving Aborted error msg.
Do i need to change somewhere else?

@xcls1117
Copy link

@rahulsharma11 sorry, i forget. you should also change the default setting here:
include/AlgThread.h (line 64, Mface m_face[3];)
this should work.

@rahulsharma11
Copy link
Author

Hi @xcls1117 ,
Thanks for that point also.
I did that change but same result.:-(

Can you please just verify that only these changes would be sufficient by yourself? if possible?

@rahulsharma11
Copy link
Author

Hi,
one more querry is that how can i change the resolution to say (640x480)?
There are parameters in demo.conf, VideoWidth and height that are set to 1280x720. I want to change the resolution to 640x480. If i change that then it throws error of assersion failed.
I can see that there is a scale parameter that gives 640x360 image size, but on imshow, the output image appears to be small and face detection baundry goes out of frame.
Any suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants