VisionWorks sample for face detection (not opencv)

Here we are finding the best performance solution for face detection on TK1.
We’ve tried dlib and opencv, but their detection speed are not met our requirements.
So we want to try hardware dependence library – visionworks – to compare.
If visionworks can support face detection, are there any samples for us to study?

VisionWorks currently doesn’t have detection sample.
Have you tried gpu accelerated opencv face detection?
https://github.com/opencv/opencv/blob/master/samples/gpu/cascadeclassifier_nvidia_api.cpp

If for tx1, it’s recommended to use deep learning based approach through tensorRT.
Example can be found in:

Dear Aasta,
Thanks for your reply.

I know tensorRT sample for face detection but we don’t have TX1 board.
Also I’ve tried cascadeclassifier_nvidia_api.cpp and its output show “Unsupported for ARM CUDA library.”
As code mention at line 28 ~ 30.
#if defined(arm)
std::cout << “Unsupported for ARM CUDA library.” << std::endl;
#endif
Should I mark them to try on TK1?

Hi,
Sorry for missing this issue.
May I know have you tried any gpu-based method before?

Or, how about to integrate a face detector with VisionWork API?
Although there is no directly API for face detection, there is harr feature API and matching sample?
It should be helpful for face detection.

We’ve tried opencv gpu base for face detection on TK1, and its performance about 10FPS for 720P.
Just want to know if there is another way to speed up face detection on TK1.

Hi,

I think 10FPS is already near the best performance on tk1.

Sharing some tuning experience for you:

  1. maximize frequency:
sudo ./jetson_clocks.sh
  1. Downscale input image:
    We usually downscale image to 640x360, but this depends on use-case

  2. Enlarge upscale parameter

cascade_gpu->setScaleFactor(1.2);

Hi, could you please show me the code of your gpu-based opencv detector? Because I am using gpu-based opencv detector now, and it is really slow. The cpu detector is 4 times faster than the gpu detector!

I just maximize performance of CPU and GPU of my TK1 board. It get much more faster now. The detector obtain 6 FPS with 640*480 video.

I just copy opencv GPU cascade classifier sample code to detect face and use two speed up functions before detection: transfer image format from BGR to gray and rescale to smaller size.

Hi,

Tuning this parameter may help. It’s a tradeoff between accuracy and performance.

cascade_gpu->setScaleFactor(1.2);

Thanks