Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Verify vector file and background file

hi

I was trying to train cascade using opencv_traincascade binary, I am using linux 3.7 I threw the below command opencv_traincascade -data imgs/cascade/ -numPos 200 -numNeg 8 -numStages 10 -featureType LBP -maxFalseAlarmRate 0.9 -w 640 -h 480 -vec imgs/vector.vec -bg negatve.dat

but it is giving me error "Image reader can not be created from -vec imgs/vector.vec and -bg negatve.dat."

I wanted to verify my vector file and background file, I dont know how to do it.

Thanks Anshul

Verify vector file and background file

hi

I was trying to train cascade using opencv_traincascade binary, I am using linux 3.7 3.7, I threw the below command command,

opencv_traincascade -data imgs/cascade/ -numPos 200 -numNeg 8 -numStages 10 -featureType LBP
    -maxFalseAlarmRate 0.9 -w 640 -h 480 -vec imgs/vector.vec -bg negatve.dat

negatve.dat

but it is giving me error "Image reader can not be created from -vec imgs/vector.vec and -bg negatve.dat."

I wanted to verify my vector file and background file, I dont know how to do it.

Thanks Anshul

Verify vector file and background file

hi

I was trying to train cascade using opencv_traincascade binary, I am using linux 3.7, I threw the below command,Below is result of my command

PARAMETERS:
cascadeDirName: imgs/cascade/
vecFileName: imgs/vector.vec
bgFileName: negative.dat
numPos: 200
numNeg: 8
numStages: 10
precalcValBufSize[Mb] : 256
precalcIdxBufSize[Mb] : 256
stageType: BOOST
featureType: LBP
sampleWidth: 24
sampleHeight: 24
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.9
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
) in get, file /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/apps/traincascade/imagestorage.cpp, line 159
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/apps/traincascade/imagestorage.cpp:159: error: (-5) Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.
 in function get

./cascade_taining.sh: line 38: 11514 Aborted                 opencv_traincascade -data imgs/cascade/ -numPos 200 -numNeg 8 -numStages 10 -featureType LBP
    LBP -maxFalseAlarmRate 0.9 -w 640 24 -h 480 24 -vec imgs/vector.vec -bg negatve.dat
negative.dat

but it is giving me error "Image reader can not be created from -vec imgs/vector.vec and -bg negatve.dat."

I wanted to verify my vector file and background file, I dont know how to do it.

Thanks Anshul