Problem creating a haar classifier "unable to obtain positive samples"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem creating a haar classifier "unable to obtain positive samples"

michaelgrande1324
Hi,
I am currently trying to create my first haar classifier. The input is 921 positive images, 620 negative images. I have already created the input/source vector of the positive images and used the createsamples function to make sure all of the images loaded. I have checked the links for the negative images within the background.dat as well with -identify ***.jpg and the information came back.

I tried to find a similar topic on this message board but didn't find any that were answered.

****************************************************************
C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\firstMotion\OCVTest>haartraining -data C:\Documents and Settings\Administrator\
My Documents\Visual Studio 2008\Projects\firstMotion\OCVTest -vec firstHaar.vec
-bg background.dat -nstages 20 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -
npos 1 -nneg 1 -w 20 -h 20 -nonsym -mem 512 -mode ALL
Data dir name: C:\Documents
Vec file name: singlePic.vec
BG  file name: background.dat
Num pos: 1
Num neg: 1
Num stages: 20
Num splits: 2 (tree as weak classifier)
Mem: 512 MB
Symmetric: FALSE
Min hit rate: 0.999000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: ALL
Width: 20
Height: 20
Applied boosting algorithm: GAB
Error (valid only for Discrete and Real AdaBoost): misclass
Max number of splits in tree cascade: 0
Min number of positive samples per cluster: 500
Required leaf false alarm rate: 9.53674e-007

Tree Classifier
Stage
+---+
|  0|
+---+


Number of features used : 125199

Parent node: NULL

*** 1 cluster ***
POS: 0 0 -1.#IND00

*******************************************************************
Error message that pops up is:

Unspecified error (Unable to obtain positive samples) in function cvCreateTreeCascadeClassifier,..\src\cvhaartraining.cpp(2260)

Thank you in advance for any help and if any additional information is needed I'll try to include it as soon as possible.

Reply | Threaded
Open this post in threaded view
|

Re: Problem creating a haar classifier "unable to obtain positive samples"

john_ali890
Hi,

I had previously read your post as I had experienced the SAME problem.
I just couldnt do anything to get rid of the  "unable to obtain positive samples"

So when I couldnt find any solution, I simply ran everything on a separate computer
and hey...it works beautifully!

But it still beats me as to why I was getting the error message on my first computer.
I kept everything the same: same no. of pos and neg images, similar locations and
everything else.

Just thought this might interest you.


Reply | Threaded
Open this post in threaded view
|

Re: Problem creating a haar classifier "unable to obtain positive samples"

angel.oliver
This post has NOT been accepted by the mailing list yet.
You need delete folder "haarcascade"... to process a new pics list
Reply | Threaded
Open this post in threaded view
|

Re: Problem creating a haar classifier "unable to obtain positive samples"

angel.oliver
This post has NOT been accepted by the mailing list yet.
:)