Ask Your Question
0

Problems with CascadeClassifier detection. False positives

asked 2014-01-08 09:32:01 -0600

Tomas gravatar image

Hi, I'm making some tests with traincascade(to detect tuna), I create my positive samples with opencv_createsamples tool, then i create my own cascade.xml with opencv_traincascade, i'm doing very very simple tests so I use only 5 positive images and 1 negative. My positive samples have size 530x364 (some of them have only the object to detect in), when i launch the opencv_createsamples i use -w 26 -h 18 because if i use the original size opencv_traincascade needs too much memory for my pc. Here i have one question, if I use that parameters, would this cascade generated work properly?

And here is my main problem: I'm trying to do a detection to one of my positive samples. I use the sample code shown in the haar_cascade facedetection example. Here's the result.

image description

Maybe to make a better classifier I have to delete the background and put only the tuna in the image?

After show the image I get this error but this is another problem

image description

Hope someone can help me! thank you ahead!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-08 13:13:00 -0600

xaffeine gravatar image

I think you need many more training samples. I also don't think you can recognize such a complex class with just a 26x18 image size. You might want to try just recognizing tuna faces.

edit flag offensive delete link more

Comments

well it's a good idea! thank you

Tomas gravatar imageTomas ( 2014-01-08 14:06:23 -0600 )edit

Question Tools

Stats

Asked: 2014-01-08 09:32:01 -0600

Seen: 891 times

Last updated: Jan 08 '14