Ask Your Question

Revision history [back]

Upper body detection and GPU hardware acceleratioin

Hi,

I successfully integrated OpenCV's CPU based upper body detection and it works well in my test case (basically, persons standing in front of a camera in a medium sized room).

When I do the same test using OpenCV's GPU based upper body detector, I only receive false positive detections. I'm using OpenCV 3.4.1 with Cuda version 8.0

What is the current status of teh GPU based upper body detection in OpenCV?

Here is how I initialize and use detectMultiScale. I tried at different image resolution (i.e. 1920x1080, 1280x720).

cv::Ptr<cv::cuda::cascadeclassifier> upper_body_detector;

upper_body_detector = cv::cuda::CascadeClassifier::create("haarcascade_upperbody.cuda.xml");

auto gpu_image = cv::cuda::GpuMat(image); cv::cuda::GpuMat gpu_rects;

gpu_image.upload(image);

upper_body_detector->setScaleFactor(1.1);

upper_body_detector->setMinNeighbors(2);

upper_body_detector->detectMultiScale(gpu_image, gpu_rects);

upper_body_detector->convert(gpu_rects, rects);

Thanks