NeuralNetwork Opencv

asked 2015-03-30 04:07:56 -0600

AuroraBlaze gravatar image

Hi I would like to know if the following is possible using Neural network in opencv, as I found the following link

So far, I had tried the traincascade.exe file to perform the object training. But now, I would like to try customizing my own algorithm in C++ using Visual Studio instead of using the existing traincascade algorithm to train the system to recognize an object/pattern.

I would like to know if this neural network can generate an xml file like the traincascade.exe file to be used for detection? Are there any format, etc that I need to follow, so that I can use the generated xml file for detection, by only replacing the xml file in opencv sample code?

Are there any good tutorial & sample codes where I can learn from?

Thank you.

edit retag flag offensive close merge delete



As you can see in the predict method, it is predicting the probability of the input(s) to be of a certain type(s) that you have trained on. So it is rather a classifier, than detector. First you should detect, then you may classify the found region

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-03-30 06:21:21 -0600 )edit

Thank you for your reply. Could you please explain further on the "First you should detect, then you may classify the found region" <<< what can I do to achieve this? Any good tutorials or sample codes where I can refer to as a beginning for me to custom write an algorithm for the neural network to train it to detect a real time object? I would also like to know if after training the neural network, is it still possible for me to use that trained xml file for detection in android like the sample face detection given in opencv for android?

AuroraBlaze gravatar imageAuroraBlaze ( 2015-03-30 19:14:45 -0600 )edit

If you want to do that you need to implement the Viola Jones algorithm and apply your NN classifier on each region. For better understanding the detector algorithm see this

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-03-31 04:33:37 -0600 )edit

@thdrksdfthmn, actually I am not really in agreement on the detection/classifier part. If you combine it with a sliding window approach like with the traincascade than this is actually a detector, since it also generalises well over sample images. It is simply how you look at it :D

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-31 04:58:40 -0600 )edit

yes, that is what I wanted to say, that the NN is a classifier, and for making it a detector, you need to combine it with the sliding window.

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-03-31 06:07:14 -0600 )edit

Hi, thank you very much for your reply. I will take a look at it =).

AuroraBlaze gravatar imageAuroraBlaze ( 2015-04-02 02:37:08 -0600 )edit