Ask Your Question

jncor's profile - activity

2016-12-14 00:16:32 -0600 received badge  Popular Question (source)
2013-07-28 16:07:13 -0600 commented question Opencv APPs instalation

@StevenPuttemans

Thx for the reply and suggestion.

I want to reduce because I have to build opencv in diferent pcs with different specs (some are old) and I want to reduce the build time. It seems that some packages are linked because for instance the combination that you mentioned does not build the apps

2013-07-28 14:52:32 -0600 asked a question Opencv APPs instalation

Hey all,

I want to get a lightweight version of opencv just for training and detecting objects.

What are the minimum dependencies that the installation has to meet for the opencv apps (opencv_traincascade.exe createsamples.exe .. etc.. ) to be built? Regarding the opencv cmake configuration.

selected packages

Shouldnt these be enough?

Thx

2013-04-19 11:20:06 -0600 received badge  Nice Question (source)
2013-01-15 05:51:12 -0600 received badge  Student (source)
2013-01-13 11:10:13 -0600 received badge  Editor (source)
2013-01-13 11:08:36 -0600 asked a question Traincascade implementation doubts

Hey all,

I have worked with cascade classifiers with opencv for some time. In order to train a classifier, I have been using opencv_haartraining because of the tutorials that I have found along the way (tutorial , faq). I know that it is a code that has little maintenance and has been declared obsolete, but it has been serving its purpose until now. I have also read the algorithm (Viola and Jones) to get more insight about the algorithm and understand its behaviour.

I am tempted to change into the new version (opencv_traincascade) because of the TBB implementation that it has. I get a speedup of 4-6 times doing the same training on both algorithms, i.e. a classifier trained under the same conditions using haartraining takes 5-7 hours and with traincascade (with tbb) 50 minutes. Since i am interested on training multiple classifiers it is obvious that the traincascade is most appealing solution.

But, i have been looking into the parameters, the code and the algorithm and I have found differences and left me with some doubts:

  • maxdepth ? what does this mean exactly during training? is it equivalent to the old parameter -split or -maxtreesplits?
  • in traincascade\cascadeclassifier.cpp ( CvCascadeClassifier::train ) : the value of tempLeafFARate is equal to acceptanceRatio (from CvCascadeClassifier::updateTrainingSet) , which is calculated with #False Alarms(FA) divided by #negatives consumed, is used to compare with the minimum FA rate required (wich normally is computed by FA_rate^#stages). Is this the way it should be? I mean, I understand that if we check sequentially the negative dataset and if it consumes a lot negatives examples (not finding faces in the negative set), it means that our detector is decreasing its FA rate but I always thought that it was calculated with the FA rate attained in training per stage. For instance, with a simple example with 2 stages, when training, the stage 1 finishes with:

| N | HR | FA |

.......

| 18| 0.999473| 0.48153|

and stage 2

....

| 16| 0.999472| 0.442773|

the final FA rate would be 0.48153 * 0.442773 = 0.21320848269 (based on the formula FA_rate^#stages

  • Why haartraining\cvhaartraning uses random to select the next image

    data->last = rand() % data->count;

    data->last %= data->count;

    and the traincascade does not? last is simply incremented (cvCascadeImageReader::NegReader::nextImg())

  • in traincascade\boost.cpp (setData) the random number generator is assigned rng = &cv::theRNG(); but where is it used? and if it is used, shouldn't the user have access to a parameter like -seed ?

Thanks in advance