Ask Your Question

ashgard's profile - activity

2017-02-28 13:46:00 -0500 received badge  Enthusiast
2017-02-22 07:10:29 -0500 asked a question How to train a GPU/CUDA CascadeClassifier or HogDescriptor?

I'm working with a couple of self trained CascadeClassifiers. They are trained using HOG and LBP. But I can use HAAR if needed. In v3 the CascadeClassifier doesn't support HOG anymore, but using the HogDescriptor would be ok. As I am using the detection in a realtime application I would like to speed up the detection process. I would like to do that using the GPU or CUDA version of the CascadeClassifier and/or HogDescriptor (I can use v2 or v3 depending on which version is working). Now I am unable to train any GPU or CUDA classifier/descriptor. I would like to know what the requirements are for this?

What have I tried?

  1. Installed the CUDA drivers from Nvidia
  2. Trained with opencv_traincasade with all 3 feature types (hog, lbp, haar) and using it on both GpuCascadeClassifier and CudaCascadeClassifier (not working)
  3. Trained with opencv_traincascade with HAAR feature type and -baseFormatSave to save in the old format and used it on both GpuCascadeClassifier and CudaCascadeClassifier (I heard that this should work for GpuCascadeClassifiers, but it's not working for me)

Also, if you have any other suggestions for speeding up the detection process, please let me know.

2017-02-07 15:14:59 -0500 commented answer Using GpuCascadeClassifier with self trained cascade file

Thanks for you reply! That raises a couple of new questions:

I've quickly looked at the GpuCascadeClassifier alternative in opencv 3. I believe that's CudaCascadeClassifier, correct?

  • I suppose the Gpu varient of opencv 2 is more general(?) and the Cuda version of opencv 3 is only supported by some graphic cards of Nvida?
  • Does this function accept self trained cascade files?

Too bad the HOG cascade is not supported anymore. I was using HOG because of it's ability to detect objects based on shape.

  • Isn't there still a HOGDescriptor::detectMultiScale function?
  • What's the supposed alternative?
2017-02-07 04:16:01 -0500 asked a question Using GpuCascadeClassifier with self trained cascade file

I have trained a couple of cascade.xml files using opencv_traincascade. The feature type I'm using is HOG and LBP (not HAAR). The MultiScaleDetection works pretty good. But I would like to speed up the function a bit. I've seen that using GpuCascadeClassifier could improve the speed of the MultiScaleDetection quite a bit. However, If I replace my CascadeClassifier with the GpuCascadeClassifier I get the following error "OpenCV: The node does not represent a user object (unknown type?)".

I've seen people suggesting to use the old xml format (-baseFormatSave flag in opencv_traincascade). However, that only works for HAAR feature types, as I am using HOG and LBP that doesn't work me.

The version (emgucv) I'm using is: emgucv-windows-universal-cuda 2.4.10.1940

Should I modify something in the opencv_traincascade process? Would it perhaps work with the latest 3.0 version? Does anyone have suggestions for me?

Thanks