Ask Your Question

aishpant's profile - activity

2014-03-18 14:04:55 -0600 asked a question Can vision.cascadeObjectDetector calculate HOG, LBP features given a cascade.xml?

I have asked the same question on stackoverflow. I have created a cascade.xml for detecting face images using the opencv_traincascade utility. I am using LBP or HOG feature based cascades since they are much faster. And I do all my testing on Matlab using vision.cascadeObjectDetector. But I am unsure if Matlab is capable of understanding and calculating LBP/ HOG features for a given cascade.xml file.

Is this the correct approach for testing a cascade detector? If not, what platform should I be using for testing?

2014-03-18 13:26:17 -0600 commented question How to choose the best bounding box out of a set of bounding boxes returned by cascade classifiers for face detection?

@berak Any way of doing this in Matlab? :) Or will there be compatibility issues in using vision.CascadeObjectDetector of Matlab for LBP features?

2014-03-18 12:11:36 -0600 received badge  Editor (source)
2014-03-18 11:48:31 -0600 asked a question How to choose the best bounding box out of a set of bounding boxes returned by cascade classifiers for face detection?

I trained a classifier for face detection using opencv_traincascade based on LBP features. When I run cascade.xml on a face, I get many bounding boxes (it is not the best classifier in the world). For generalisability, I make no assumptions on the data and assume the bounding box of maximum size will give me the face region. Sadly, this is not always the case.

Is there any way to solve this problem or do I need a better classifier?

EDIT

  1. I am training using OpenCV on windows and testing the cascade.xml on Matlab. Are the results affected by doing this? Any compatibility issues?
  2. How do people usually test their cascades-on C#, Matlab, C, C++, Python or using OpenCV itself?
2014-03-18 11:20:30 -0600 asked a question OpenCV LBP traincascade stuck with a False Alarm of 0

I have asked the same question on stackoverflow. I have been using OpenCV's traincascades to detect faces. Many time when the number of positive and negative sample are low, the training gets stuck after a stage where Hit Rate=1 and False Alarm=0 has been reached. So the command window output looks like this-

===== TRAINING 13-stage =====
<BEGIN
POS count : consumed   90 : 90
NEG count : acceptanceRatio    300 : 3.46407e-006
Precalculation time: 0.029
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        0|
+----+---------+---------+
END>
Training until now has taken 0 days 0 hours 17 minutes 26 seconds.

===== TRAINING 14-stage =====
<BEGIN
POS count : consumed   90 : 90

I am guessing subsequent negatives are rejected and training is stuck in infinite loop- for( ; ; ) of the traincascade. If I create a cascade of the intermediate stages I get an average classifier (accuracy-60-70%). There has been another similar question for the same problem but I felt that the answer wasn't good enough.

Is there any solution to this problem?

2014-03-18 11:16:17 -0600 asked a question Infinite loop in Haar, LBP, HOG in opencv traincascades

I have asked the same question on stackoverflow. I am trying to build a classifier to detect faces in Thermal images. So I tried training using Haar, LBP and HOG classifiers. I am working with OpenCV 2.4.8 on windows.

opencv_traincascade.exe -data haarcascades -vec pos.vec -bg neg.txt -numPos 250 -numStages 24 -numNeg 900 -w 24 -h 24

I have 307 positive samples in total. The negative samples are of size 75x75. For each of the three cases the training gets stuck at a particular stage-earlier for Haar (stage-12) and later for LBP (stage-14/15). I reduced the number of negatives (upto 200) but that means the training gets stuck at a later stage. The training hasn't progressed since 2 days. No negatives are being consumed and the command window looks like this-

===== TRAINING 14-stage =====
<BEGIN
POS count : consumed   255 : 262

Also-What do POS count consumed and NEG count consumed signify? When I reduce the minHitRate to say 0.7 why do the number of POS consumed increase?

Please let me know what I am doing wrong. Thanks.