How to create our own Haarcascade.xml.
How to create an haar classifier, by using some set of images/trainig set.
How to create an haar classifier, by using some set of images/trainig set.
@steven will consider your comment and will update my tutorial on haar-cascades :)
Asked: 2014-07-26 01:07:14 -0600
Seen: 3,420 times
Last updated: Jul 26 '14
Parameters for OpenCV alt2 haar cascade [closed]
Haar Training got stuck [closed]
Train Cascade parameters calculations issue
Are there any ways to generate a HAAR cascade faster?
Simple logo haar file I created causes tons of false positives.
how to recognize different postures of hand
C++ error in haartraining attempts
Cascade Classifier Training
Haar training: - http://abhishek4273.wordpress.com/2014/02/10/opencv-haar-training
Traincascade: - http://abhishek4273.wordpress.com/2014/03/16/traincascade-and-car-detection-using-opencv/
I do appreciate people helping out BUT PLEASE put in some effort and use the search functionality... this been asked a million times before. Therefore my -1...
That is a truly apt statement Steven. Even a simple google search will pop out all solutions from our forum.
Thank you guys for your answers. After searching all possibilities for creating haar classifier in Ubuntu 14.04 and in windows, there were no proper solution given, i have seen so many people posting their comment saying there are lot of errors. I want at least bug free tutorials to create my Haarcascade.
Hi, @abhishek Kumar, I refered your opencv-haar-training from your answer, I found the following error while merging it,
./mergevec samples.txt samples.vec OpenCV Error: Assertion failed (elements_read == 1) in icvGetHaarTraininDataFromVecCallback, file cvhaartraining.cpp, line 1859 terminate called after throwing an instance of 'cv::Exception' what(): cvhaartraining.cpp:1859: error: (-215) elements_read == 1 in function icvGetHaarTraininDataFromVecCallback
Aborted (core dumped)
I do not know where people get the idea that you need the mergetool. It is not standard openCV functionality but something built by a third person. The official train cascade tutorial has every single information you need! And it works perfectly here on Ubuntu 14.04 AND Windows 7 / 8.1. I am making a step by step tutorial for my project finals, will create a link to it once it is ready!
@steven ..... The merge is being used so that greater number of samples can be prepared. The opencv_createsamples function when applied on a set of images provides only the same number of samples as the number of images in the training. But when applied on single image multiple samples can be generated. So I have created a perl file that takes images one by one and then applies the create samples function. And the merging code to pass on every vec file to a single one.
Which is actually the WORST way for creating a cascade model. Everyone with actual applications will tell you that a model cannot be build by using the artificial example generation of the createsamples utility. It will create a terrible set of unnatural training samples which results in a model trying to capture stuff that can never happen in real life situations. I always suggest people to move on from that documented approach and just put effort in gathering training sets with actual data. State-of-the-art detection algorithms avoid these artificial translations rotations and so on at all costs!
I think that is indeed a good idea. The merging functionality comes from the time that haartraining utility was used. I am sure that if you know exactly what you doing, it can still be usefull in some cases BUT people are using it for the wrong reasons.