I use Opencv 2.4.10 (current stable version). And I use gpu::CascadeClassifier_GPU::detectMultiScale
to detection faces. I want to use it async with my CUDA-kernel-code which I launch in separate cudaStream_t
. But by default CascadeClassifier_GPU
launch in the default zero-stream that make impossible to launch anything async to this on GPU.
As I see here no way to use gpu::Stream
for CascadeClassifier_GPU
: OpenCV DOC link
gpu::Stream
for CascadeClassifier_GPU
and how? UPDATE : So far the only way I've found - use a separate CPU thread to perform the function of the gpu::CascadeClassifier_GPU::detectMultiScale
and perform it on a separate GPU. But for this at least I need 2 GPUs.
CascadeClassifier_GPU
uses mixed GPU/CPU implementation and performs extra synchronizations internally, that's why it doesn't support asynchronous mode with gpu::Stream
parameter. In order to launch it asynchronously with your code, you need to use separate CPU thread for it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.