Haar Cascaded Classifier Data in OpenCV: - opencv

I can't find any information about Data used for training Haar classifiers in OpenCV. I want to know what kind of, how many and how(manually or via program) these classifiers were generated.
You can find these classifier's xml files in ..OpenCV2.3.1\opencv\data\haarcascades.. directory. Thanks

this research paper contains the answer
Empirical Analysis of Detection Cascades of Boosted Classifiers for Rapid Object
Detection by Dr Rainer Lienhart
thanks guys for the help...

Related

Which algorithm i should choose from KNN and CNN for audio binary classifiaction?

I am doing thesis on baby cry detection, I build the model with CNN and KNN, the train accuracy of CNN is 99% and Test accuracy is 98% and for KNN, train accuracy is 98% and Test accuracy is 98%.
Please suggest me which algorithms I should choose and why?
In KNN, output completely relies on nearest neighbours, which may or may not be good choice. Also it is sensitive to distance metrics. More you can find here. And great discussion on its distance metrics can be helpful for you.
On the other hand, CNN extract the features from the input data. Which are very helpful for making analysis. And recent success in the CNN specially wavenet for the audio application, i will prefer to go with CNN.
Edit: Considering your data-size, CNN is not good option here.

OpenCV Haar classifier - is it an SVM

I'm using an OpenCV Haar classifier in my work but I keep reading conflicting reports on whether the OpenCV Haar classifier is an SVM or not, can anyone clarify if it is using an SVM? Also if it is not using an SVM what advantages does the Haar method offer over an SVM approach?
SVM and Boosting (AdaBoost, GentleBoost, etc) are feature classification strategies/algorithms. Support Vector Machines solve a complex optimization problem, often using kernel functions which allows us to separate samples by working in a much higher dimension feature space. On the other hand, boosting is a strategy based on combining lots of "cheap" classifiers in a smart way, which leads to a very fast classification. Those weak classifiers can be even SVM.
Haar-like features are a kind of features based in integral images and very suitable for Computer Vision problems.
This is, you can combine Haar features with any of the two classification schemes.
It isn't SVM. Here is the documentation:
http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html#haar-feature-based-cascade-classifier-for-object-detection
It uses boosting (supporting AdaBoost and a variety of other similar methods -- all based on boosting).
The important difference is related to speed of evaluation is important in cascade classifiers and their stage based boosting algorithms allow very fast evaluation and high accuracy (in particular support training with many negatives), at a better balance point than an SVM for this particular application.

Adaboost feature selection

I am trying to train an adaboost classifier using the openCV library, for visual pedestrian detection.
I've come across the notion that adaboost allows the selection of the most relevant features, meaning, if I harvest 50.000 features from images and then use them to train a classifier, in the end of the training process I would be able to select, for example, the best 2000 out of those 50.000.
Then, this would allow me to harvest only those 2000 during the actual process for the sake of speed.
Is this even true? Or am I falling in a misconception?
If true,, is it possible to be done using the openCV library?
Best regards
Yes, this is true. That's exactly what boosting is all about.
Please, check the OpenCV documentation about training a cascade of boosted classifiers.

Haar Cascade OpenCV: [duplicate]

I can't find any information about Data used for training Haar classifiers in OpenCV. I want to know what kind of, how many and how(manually or via program) these classifiers were generated.
You can find these classifier's xml files in ..OpenCV2.3.1\opencv\data\haarcascades.. directory. Thanks
this research paper contains the answer
Empirical Analysis of Detection Cascades of Boosted Classifiers for Rapid Object
Detection by Dr Rainer Lienhart
thanks guys for the help...

How does HOG feature descriptor training work?

There doesn't seem to be any implementations of HOG training in openCV and little sources about how HOG training works. From what I gathered, HOG training can be done in real time. But what are the requirements of training? How does the training process actually work?
As with most computer vision algorithms, Google Scholar is your friend :) I would suggest reading a few papers on how it works. Here is one of the most referenced papers on HoG for you to start with.
Another tip when researching in computer vision is to note the authors of the papers you find interesting, and try to find their websites. They will tend to have an implementation of their algorithms as well as rules of thumb on how to use them. Also, look up the references that are sited in the paper about your algorithm. This can be very helpful in aquiring the background knowledge to truly understand how the algorithm works and why.
Your terminology is a bit mixed up. HOG is a feature descriptor. You can train a classifier using HOG, which can in turn be used for object detection. OpenCV includes a people detector that uses HOG features and an SVM classifier. It also includes CascadeClassifier, which can use HOG, and which is typically used for face detection.
There is a program in OpenCV called opencv_traincascade, which lets you train a cascade object detector, an which gives you the option to use HOG. There is a function in the Computer Vision System Toolbox for MATLAB called trainCascadeObjectDetector, which does the same thing.

Resources