Ask Your Question

akasa's profile - activity

2018-03-14 07:36:17 -0600 received badge  Popular Question (source)
2016-10-01 06:04:10 -0600 commented question Cascade Training Error OpenCV 3.0.0 - Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

Thank you!

I already read them, to search "train dataset" and I understood cause which is nglist.txt isn't read. So, I tried it, for examle, I wrote absolute path in nglist.txt, but it isn't improved.

2016-09-30 11:34:52 -0600 commented answer I want to install opencv3.0.0 in ubuntu14.04

I was able to it. It's thanks to you. Also, could I use GPU function, if I add -D WITH_CUDA=ON in cmake?

2016-09-30 11:27:26 -0600 received badge  Scholar (source)
2016-09-30 11:26:23 -0600 asked a question Cascade Training Error OpenCV 3.0.0 - Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

"Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters."

I checked same problem under it.

http://answers.opencv.org/question/91...

However, error still occurred in this system. Also, I use OpenCV 3.0.0 with Python 2.7.12 on Ubuntu16.04.

#!/bin/sh

ls pos | xargs -I {} echo -e pos/{} > pslist.txt

paste pslist.txt plus.txt > pslist2.txt

mv pslist2.txt pslist.txt

ls neg | xargs -I {} echo -e neg/{} > nglist.txt

paste nglist.txt neg.txt > nglist2.txt

mv nglist2.txt nglist.txt

opencv_createsamples -info pslist.txt -num 99 -vec image.vec -w 24 -h 24

opencv_traincascade -data cascade -vec image.vec -bg nglist.txt -numPos 90 -numNeg 501 -numStages 20 -w 24 -h 24 -featureType LBP

pslist.txt

   pos/Flower100001.jpg 1 0 0 24 24
   pos/Flower100002.jpg 1 0 0 24 24
   pos/Flower100003.jpg 1 0 0 24 24
   pos/Flower100004.jpg 1 0 0 24 24
   pos/Flower100005.jpg 1 0 0 24 24
                :

nglist.txt

   neg/Car100001.jpg    1 0 0 24 24
   neg/Car100002.jpg    1 0 0 24 24
   neg/Car100003.jpg    1 0 0 24 24
   neg/Car100004.jpg    1 0 0 24 24
   neg/Car100005.jpg    1 0 0 24 24
            :

result

Info file name: pslist.txt
Img file name: (NULL)
Vec file name: image.vec
BG  file name: (NULL)
Num: 99
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 24
Height: 24
Create training samples from images collection...
Done. Created 99 samples
PARAMETERS:
cascadeDirName: cascade
vecFileName: image.vec
bgFileName: nglist.txt
numPos: 90
numNeg: 501
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: LBP
sampleWidth: 24
sampleHeight: 24
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS current samples: 1
POS current samples: 2
            :
POS count : consumed   90 : 90
Train dataset for temp stage can not be filled. Branch training terminated.
Cascade classifier can't be trained. Check the used training parameters.

So, anyone teach me how to solve it?

2016-09-19 07:21:29 -0600 received badge  Enthusiast
2016-09-15 11:05:04 -0600 received badge  Editor (source)
2016-09-15 11:04:02 -0600 asked a question "Train dataset for temp stage can not be filled. Branch training terminated.Cascade classifier can't be trained. Check the used training parameters."

Hi anyone help me?

"Train dataset for temp stage can not be filled. Branch training terminated.Cascade classifier can't be trained. Check the used training parameters."

This error occurred.

I used this command to create image.vec file:

opencv_createsamples -info pslist.txt -num 100 -vec ./vec/image.vec -w 1 -h 1 -bgcolor 255

I used this command for cascade training:

opencv_traincascade -data ./cascade/trained_data -vec ./vec/image.vec -bg nglist.txt -numPos 90 -numNeg 6629 -w 1 -h 1 -maxFalseAlarmRate 0.5 -featureType BOOST -precalcValBufSize 1024 -precalcIdxBufSize 1024 -mode BASIC

But error occurred in this system:

Info file name: pslist.txt

Img file name: (NULL)

Vec file name: ./vec/image.vec

BG file name: (NULL)

Num: 100

BG color: 255

BG threshold: 80

Invert: FALSE

Max intensity deviation: 40

Max x angle: 1.1

Max y angle: 1.1

Max z angle: 0.5

Show samples: FALSE

Width: 1

Height: 1

Create training samples from images collection...

Done. Created 100 samples

PARAMETERS:

cascadeDirName: ./cascade/trained_data

vecFileName: ./vec/image.vec

bgFileName: nglist.txt

numPos: 90

numNeg: 6629

numStages: 20

precalcValBufSize[Mb] : 1024

precalcIdxBufSize[Mb] : 1024

acceptanceRatioBreakValue : -1

stageType: BOOST

featureType: HAAR

sampleWidth: 1

sampleHeight: 1

boostType: GAB

minHitRate: 0.995

maxFalseAlarmRate: 0.5

weightTrimRate: 0.95

maxDepth: 1

maxWeakCount: 100

mode: BASIC

===== TRAINING 0-stage =====

BEGIN

POS current samples: 1

           :

POS current samples: 90

POS count : consumed 90 : 90

Train dataset for temp stage can not be filled. Branch training terminated. Cascade classifier can't be trained. Check the used training parameters.

So, anyone teach me how to solve it?

2016-09-13 21:02:16 -0600 commented answer I want to install opencv3.0.0 in ubuntu14.04

Thank you! I try it.

2016-09-13 02:23:43 -0600 asked a question I want to install opencv3.0.0 in ubuntu14.04

Before, I was able to opencv2.4.8 on ubuntu14.04. Recently, I tried to install opencv3.0.0 on ubuntu14.04, following manual, but I confirmed version using python and version was 2.4.8. The cause of that is pass of installed openv3.0.0 disconnected, maybe. So, anyone teach me how to install new version such as opencv3.0.0?

2016-09-11 10:34:03 -0600 asked a question How to upgrade version

Hi anyone can help me ? I was able to install openCV-3.1.0 on Ubuntu 14.04, but I confirmed version using python and version was 2.4.8. How did this happen?