Hi!
I've been trying to create an LBP detector/one class classifier and I am running into some issues. I currently have 500 positive and 1500 negative images with a resolution of 1929x1341. The positives are .bmp images of a "dummy fish" in different postures taken in a watertank with a plain white background. The negatives are all random grayscale .jpg images.
To supply the positive samples i have used the tool objectmarker to mark out the region of interest in each of the positive images and save this in a positive.txt file. The .txt file is formated like this:
data/pos_n 1 x y width height
The negatives are sent to the trainlbpcascade.exe utility from OpenCV by means of a .bg file. The file is formated like this:
path/neg_n.jpg
The createsamples.exe tool is then used to create the positive samples needed by the trainlbpcascade.exe tool. The call for this is:
createsamples.exe -info positive/info.txt -vec vector/dummy_fish_vector.vec -num 495 -w 60 -h 24
The reason why the -w and -h is not equal is because my "dummy fish" has a rectangular bounding region. The vector dummy_fish_vector.vec retrieved from createsamples.exe is then used to train the classifier using the trainlbpcascade.exe tool. The call to train the classifier is:
trainlbpcascade.exe -data objectDetector -vec vector/dummy_fish_vector.vec -bg negative/bg.txt -numPos 450 -numNeg 1350 -numStages 8 -stageType LBP -minFalseAlarmRate 0.95 -featureType LBP -acceptanceRatioBreakValue 10e-4 -w 60 -h 24 -bt DAB -maxDepth 2 -mode ALL
The cascade I receive from this call is then used in the objectdetect sample program and supplied a stream of images. My problem is that I receive alot of false negatives using these calls, along with the real positive (if the fish is in the image). Can you see any obvious reasons as to why this should happen? I hope I have supplied sufficient information on the problem. I have also noticed that when I try to train the classifier it stops at a very early stage, and does not complete all of the stages. I have tried a variety of calls to train the classifier with 4-12 stages, but they all seem to stop early. Any help?