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

Headpose Speed can be increased - Improvement #14

Closed
naushadck opened this issue Sep 15, 2020 · 3 comments
Closed

Headpose Speed can be increased - Improvement #14

naushadck opened this issue Sep 15, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@naushadck
Copy link

I checked the headpose.py. It uses caffe model. It is very slow on i5 with 16 GB RAM.

It can be faster, if use the dnn from tensorflow provided by opencv(\samples\dnn\face_detector\opencv_face_detector.pbtxt).
Added the following lines in init in class FaceDetector:.

    dnn_proto_text='models/opencv_face_detector.pbtxt'
    dnn_model='models/opencv_face_detector_uint8.pb'
    self.face_net = cv2.dnn.readNetFromTensorflow(dnn_model, dnn_proto_text)

I hope this may helpful for someone....

@vardanagarwal
Copy link
Owner

vardanagarwal commented Sep 15, 2020

So this looks like a quantized version of the one used. An additional boolean argument of quantized can be added in the get_face_model() of face_detector.py so the user whether they want to use the original or this based on their requirements trade-off for speed and accuracy.

If you want to add this feature you can start a pull request, or otherwise, I will add it.

@vardanagarwal vardanagarwal added the enhancement New feature or request label Sep 15, 2020
@naushadck
Copy link
Author

An additional boolean argument of quantized can be added - Good

If you want to add this feature you can start a pull request, or otherwise, I will add it. -- I am not sure about it. Please carry on...

@vardanagarwal
Copy link
Owner

The face_detector.py has been updated with an additional quantized argument.

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

No branches or pull requests

2 participants