How to Get Past the Infamous “Insufficient Count of Samples” Error in OpenCV Cascade Training

Many people who have tried OpenCV’s traincascade tool know about a very disturbing error which (at least at the moment) seems to have no good solution, but nevertheless this issue has a solution (even if not convenient) so we need to stick to what we have at hand. My Cascade Trainer GUI app which also uses OpenCV as the underlying framework is also seen to produce this error with many users so I decided to discuss this and share my solution with you all, but please make sure you put your comment below if you’ve got any questions or better suggestions. So, let’s get down to it.

Continue reading “How to Get Past the Infamous “Insufficient Count of Samples” Error in OpenCV Cascade Training”

Best Way to Train and Test Haar or LBP Classifiers

cascade-trainer-gui

You can use Cascade Trainer GUI to easily train and test your cascade classifiers. It has a very simple user interface which helps with everything  related to training cascade classifier that are usable with OpenCV. Starting from preparing the positive and negative image data set, its cropper tool will help you with quickly preparing your training data set. Just make sure you have enough videos of the object you want to train a classifier for, and detect. It also allows avoiding all the complexities of setting parameters for the training. Of course if you want a very high quality classifier, then you’d have to touch a few parameters here and there but for the most part, it’s select and Go.

You can use the Train tab to train a classifier, and then use the Test tab to test it on a video or image. And switch between them as long as you’re not satisfied with your classifier’s performance.

You can always download the latest version of Cascade Trainer GUI from its official website, or by clicking here.

And make sure to report any bugs and missing features using the Contact Me page.