Closed aakashs closed 7 years ago
Cool!
You can do a cv::resize()
after you get the image from the camera. That should speed up things a bit.
Another thing that helps I think is setting the number of shape coefficients to fit down to 8 or so. It's one of the last parameters of fitting::fit_shape(...)
.
There's lots of possibilities to improve the speed! For example, initialising the shape & expressions fitting loop with the result from the last frame should also provide a good speed up. And/or the texture extraction and rendering could be done with OpenGL for more speedup. I just currently don't have time to implement any of this properly.
Awesome, thanks so much. Will probably try to improve frame rate in some ways myself and hopefully submit a PR.
It's also always a good thing to start by running a profiler :-)
Happy to say I've also gotten 4dface running on a mac using Homebrew.
Is there an easy way to adjust the frame size the tracking runs on? Would performance improve beyond 5fps after reducing the frame size of the webcam video?
Thanks in advance!