Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

my classifier using haar cascade can not detect anything

I create my own classifier using 99 positives samples and 299 negatives. When the clasifier train I get the xml file an use it in my program. I notice that it can not detect anything...

Do anyone know what I am doing wrong?:/

my classifier using haar cascade can not detect anything

I create my own classifier using 99 90 positives samples and 299 negatives. negatives to detect doctor's tool.

I run this command createsamples.exe -info positive/info.txt -vec data/vector.vec -num 90 -w 25 -h 15 to create my samples and that haartraining.exe -data data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 90 -nneg 299 -nstages 25 -mem 1000 -mode ALL -w 25 -h 15 -nonsym to train my classifier.

When the clasifier train I get the xml file an use it in my program. I notice that it can not detect anything...

Do anyone know what I am doing wrong?:/

my classifier using haar cascade can not detect anything

I create my own classifier using 90 positives samples and 299 negatives to detect doctor's tool.

I run this command createsamples.exe -info positive/info.txt -vec data/vector.vec -num 90 -w 25 -h 15 to create my samples and that haartraining.exe -data data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 90 -nneg 299 -nstages 25 -mem 1000 -mode ALL -w 25 -h 15 -nonsym to train my classifier.

When the clasifier train trained I get the xml file an and use it in my program. I notice that it can not detect anything...

Do anyone know what I am doing wrong?:/

my classifier using haar cascade can not detect anything

I create my own classifier using 90 positives samples and 299 negatives to detect doctor's tool.

I run this command createsamples.exe -info positive/info.txt -vec data/vector.vec -num 90 -w 25 -h 15 to create my samples and that haartraining.exe -data data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 90 -nneg 299 -nstages 25 -mem 1000 -mode ALL -w 25 -h 15 -nonsym to train my classifier.

When the clasifier trained I get the xml file and use it in my program. I notice that it can not detect anything...

Do anyone know what I am doing wrong?:/

Second problem When I run my command opencv_traincascade -data data/cascade -vec data/vector.vec -bg neg.txt -numPos 2200 -numNeg 1000 -numStages 25 –featureType LBP -mem 2000 -mode ALL -w 25 -h 15 after the first stage it returned the follow

<BEGIN
OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
) in get, file /home/mcn/opencv-2.4.5/apps/traincascade/imagestorage.cpp, line 159
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/mcn/opencv-2.4.5/apps/traincascade/imagestorage.cpp:159: error: (-5) Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
 in function get

Aborted

As I read from http://answers.opencv.org/question/776/error-in-parameter-of-traincascade/ I redude the numPos but the problem is still exist in later stages...

my classifier using haar cascade can not detect anything

I create my own classifier using 90 positives samples and 299 negatives to detect doctor's tool.

I run this command createsamples.exe -info positive/info.txt -vec data/vector.vec -num 90 -w 25 -h 15 to create my samples and that haartraining.exe -data data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 90 -nneg 299 -nstages 25 -mem 1000 -mode ALL -w 25 -h 15 -nonsym to train my classifier.

When the clasifier trained I get the xml file and use it in my program. I notice that it can not detect anything...

Do anyone know what I am doing wrong?:/

Second problem

When I run my command opencv_traincascade -data data/cascade -vec data/vector.vec -bg neg.txt -numPos 2200 -numNeg 1000 -numStages 25 –featureType LBP -mem 2000 -mode ALL -w 25 -h 15 after the first stage it returned the follow

<BEGIN
OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
) in get, file /home/mcn/opencv-2.4.5/apps/traincascade/imagestorage.cpp, line 159
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/mcn/opencv-2.4.5/apps/traincascade/imagestorage.cpp:159: error: (-5) Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
 in function get

Aborted

As I read from http://answers.opencv.org/question/776/error-in-parameter-of-traincascade/ I redude the numPos but the problem is still exist in later stages...