i am trying to train a HAAR-cascade to detect people. For this i generated positive samples from an recorded video by foreground-background-subtraction. I used pictures of the empty room with different arrangements and different lighting as negative samples. The trained cascade seems to detect a person with an acceptable rate. But the cascade also has a lot of false positives in regions that were not rearranged in the different negative samples. For example there is a table that could not be moved. The cascade is constantly marking the corner of the table although that table is in the negative samples and even is in EVERY negative sample. I tried different approaches to lower the false-alarm-rate but i was not very successfull. I tried to increase the number of stages to 35-40. At first that seemed to help but when i increased the number of samples using different people to get more variance the false positives reappeared. My guess is that the surrounding background in the positive samples is the cause for the false positives since the samples are from that room as well and for example parts of that table are in some samples. In another attempt i tried to decrease the size of the region i cut from the frame to get less background in my positive samples. But if i am right and the background in the samples is the reason then that lesser background might still be too much. Since from the foreground-background-subtraction i have the backgroundpixels i thought about replacing them with white noise in the positive samples. Could that help or would it be harmful? Does anybody have an alternativ solution how i can lower the false-positive-rate? I would be thankful for any assistance.
answered 2012-07-25 02:24:28 -0500Kirill Kornyakov
It is known that Haar is not good for human body detection. You're right, you may have problems with number of both positive and negative samples (do you have thousands of unique images?), you may also have problems with how you cut positives, but the root cause should be that Haar features are not good for such task. And I suppose that LBP is not good as well.
You should better look into HOG direction, check this paper: Navneet Dalal and Bill Triggs, Histogram of oriented gradients for human detection. 2005. You can try to use the existing cascade: http://code.opencv.org/projects/opencv/repository/revisions/master/changes/data/hogcascades/hogcascade_pedestrians.xml. You can even try it on GPU with CUDA: http://docs.opencv.org/modules/gpu/doc/object_detection.html?highlight=hog#gpu-hogdescriptor.
Asked: 2012-07-24 04:12:35 -0500
Seen: 2,135 times
Last updated: Jul 25 '12