Ask Your Question

Training cuda::CascadeClassifier

asked 2018-04-26 14:59:52 -0600

logidelic gravatar image

I have been using haarcascades_cuda/haarcascade_frontalface* with cv::cuda::CascadeClassifier (for a while now) using OpenCV 3.4.1 and it works very well!

However, I would really like to train using my own data. I have seen a lot of threads suggesting that this isn't really supported for the cuda class anymore. Is that so? Or is there a way to do it?

Also, is the training data for the existing haarcascade_frontalface* classifiers available?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-04-27 02:07:27 -0600

berak gravatar image

there are 2 formats for cascade files, an older, and a newer one (which also supports LBP or HOG features).

unfortunately the cuda::CascadeClassifier only understands the old format, so you can use HAAR features only, and have to use the -baseformat true param when calling the opencv_traincascade tool.

edit flag offensive delete link more


berak gravatar imageberak ( 2018-04-27 02:11:30 -0600 )edit
berak gravatar imageberak ( 2018-04-27 02:19:20 -0600 )edit

too bad though it is only the vec that is available, and no-one has the original data --> because the vec only provides positives :D

StevenPuttemans gravatar imageStevenPuttemans ( 2018-04-27 04:28:31 -0600 )edit

Thank you for the answer. A first attempt at this did indeed work as advertised! I was expecting not, mostly because of other things I have read (and because most of the classifiers in data/haarcascades_cuda are broken).

logidelic gravatar imagelogidelic ( 2018-04-27 14:05:29 -0600 )edit

lol, indeed, somewhat "unexpected"

berak gravatar imageberak ( 2018-04-27 14:06:50 -0600 )edit

Question Tools

1 follower


Asked: 2018-04-26 14:59:52 -0600

Seen: 553 times

Last updated: Apr 27 '18