traincascade seg fault

asked 2014-10-07 15:31:57 -0500

_chris gravatar image

OpenCV 2.4.9 OS X 16GB RAM. Any ideas why this crash? I've trained successfully with same data using feature size 20/30 and 20/20 with the buffers set to 4096. It seg faulted on 4096 with the new size 30/40 so I increased the buffers a bit.

Output:
PARAMETERS:
cascadeDirName: classifier
vecFileName: samples.vec
bgFileName: negatives.txt
numPos: 1062
numNeg: 5854
numStages: 18
precalcValBufSize[Mb] : 7000
precalcIdxBufSize[Mb] : 7000
stageType: BOOST
featureType: HAAR
sampleWidth: 30
sampleHeight: 40
boostType: GAB
minHitRate: 0.99
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100
mode: ALL
===== TRAINING 0-stage =====
BEGIN
POS count : consumed   1062 : 1062
NEG count : acceptanceRatio    5854 : 1
Precalculation time: 73
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
train.sh: line 31: 25978 Segmentation fault: 11  opencv_traincascade -featureType HAAR -data classifier -vec samples.vec -bg negatives.txt -numStages $5 -minHitRate 0.99 -maxFalseAlarmRate 0.5 -numPos $nsamples -numNeg $nneg -w $3 -h $4 -mode ALL -precalcValBufSize 7000 -precalcIdxBufSize 7000
edit retag flag offensive close merge delete

Comments

I think the fault is because it is unable to fetch images, make sure the path to negatives, positives and samples is correct.

Abhishek Kumar Annamraju gravatar imageAbhishek Kumar Annamraju ( 2014-10-08 03:23:54 -0500 )edit

Is there a reason for the dollar marks before the parameters that are given?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-08 04:22:08 -0500 )edit

the parameters are being taken from a simple bash script, the script works fine. @abhishek i dont think that is the case, both the positives and negatives text files are correctly created from the images directories specified

_chris gravatar image_chris ( 2014-10-08 05:40:14 -0500 )edit

From mode ALL revert back to mode BASIC

Abhishek Kumar Annamraju gravatar imageAbhishek Kumar Annamraju ( 2014-10-08 06:15:42 -0500 )edit