traincascade false positives

asked 2015-08-29 06:33:38 -0600

I'm trying to train classifier to recognize cars on a video from static camera pointing at the street. As my negative samples i'm using parts of the frames from a video, that don't contain any car. But after training, always the same same object that are not cars, are recognized by the algorithm as cars. I tried to crop exactly those objects and put them as negative samples - I took about 300 images with only those couple static objects that are part of the background. But it didn't help. Why cascade training is recognizing object that are part of negative samples as positives? Exactly the same objects on the same images that those object were cutted from...

My possitive images are all rectangles, from 30x30 to 130x130. After transformation by opencv_createsamples i get 20x20 samples. My negative images are also rectangles, but bigger. from 30x30 to even 500x500

I'm using those parameters for training: opencv_traincascade -data training -vec samples.vec -bg negatives.txt -numPos 750 -numNeg 1200 -numStages 25 -numThreads 3 -w 20 -h 20 -minHitRate 0.999 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024 I also tried different settings: bigger size of possitive images (25x25), more stages (30), mode BASIC etc.

I have no idea what to do now. Please help. Sorry for my english, I'm not a native speaker.

edit retag flag offensive close merge delete