Ask Your Question
0

Is there a way to use a trained CascadeClassifier for just classification in OpenCV 3.x?

asked 2020-02-10 00:12:12 -0600

yogeshmurthy_ gravatar image

I have trained a cascade classifier on my own dataset using opencv_traincascade application as explained here. I now want to use this trained model only for classification, not detection.

However I can't seem to find the setImage and runAt methods, which were present in OpenCV 2.x but seemingly not in OpenCV 3.x.

Are they deliberately removed from this version? Is there any other way to perform classification using my trained cascade?

edit retag flag offensive close merge delete

Comments

1

I now want to use this trained model only for classification, not detection.

can you explain, why ? what is the "context" ?

what would the input for this be ? a cropped image ?

berak gravatar imageberak ( 2020-02-10 05:48:16 -0600 )edit
1

imho, the closest thing you can do is : set minSize() == maxSize() == cropped_image.size(), this way at least it won't try to build an image pyramid

berak gravatar imageberak ( 2020-02-10 06:00:09 -0600 )edit

Yes, I've got crops already, just need to know if the object is present or not. I need something that runs fast because I've got to process about 300-500 small crops (24x32) in 1-2 seconds. Is setting the min and max sizes efficient in that context?

yogeshmurthy_ gravatar imageyogeshmurthy_ ( 2020-02-10 06:16:56 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
-1

answered 2020-03-29 05:17:01 -0600

ComputerVisionary gravatar image

Yes it is possible with some limitation. We still suggest to use a very small scale progression around the object to be classified and to use a custom cascade trained by your yourself.

For a better understanding of the cascade in real world scenario take a look here (a lot of tricks about hyper speed haar, hog, lbp cascades): http://www.vision-ary.net/2015/03/lar...

Regards!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-02-10 00:12:12 -0600

Seen: 247 times

Last updated: Mar 29 '20