繁体   English   中英

OpenCV错误“无法填充临时阶段的训练数据集。 进入第三阶段培训后,分支培训终止。”

[英]OpenCV error “Train dataset for temp stage can not be filled. Branch training terminated.” after starting training stage-3

在搜索此错误时,我仅发现在开始时就发生了这种情况。 就我而言,它发生在三阶段训练的开始。

我正在使用启用了OpenMP的OpenCV 2.4.10。 波纹管是我使用的命令行和输出。 有谁知道如何解决这个问题?

root@6b0f88eaadb9:/opt/ocr-samples3/train-detector# opencv_traincascade -data ./out// -vec ./positive/vecfile.vec -bg ./negative/negative.txt -w 247 -h 80 -numPos 78 -numNeg 1325 -featureType LBP -numStages 8
libdc1394 error: Failed to initialize libdc1394
Training parameters are loaded from the parameter file in data folder!
Please empty the data folder if you want to use your own set of parameters.
PARAMETERS:
cascadeDirName: ./out//
vecFileName: ./positive/vecfile.vec
bgFileName: ./negative/negative.txt
numPos: 78
numNeg: 1325
numStages: 8
precalcValBufSize[Mb] : 256
precalcIdxBufSize[Mb] : 256
stageType: BOOST
featureType: LBP
sampleWidth: 247
sampleHeight: 80
boostType: GAB
minHitRate: 0.995
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   78 : 78
NEG count : acceptanceRatio    1325 : 1
Precalculation time: 6
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|0.0211321|
+----+---------+---------+
END>
Training until now has taken 0 days 1 hours 22 minutes 40 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   78 : 78
NEG count : acceptanceRatio    1325 : 0.0928456
Precalculation time: 10
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|0.0324528|
+----+---------+---------+
END>
Training until now has taken 0 days 3 hours 19 minutes 57 seconds.

===== TRAINING 2-stage =====
<BEGIN
POS count : consumed   78 : 78
NEG count : acceptanceRatio    1325 : 0.00679104
Precalculation time: 7
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|     0.08|
+----+---------+---------+
END>
Training until now has taken 0 days 4 hours 38 minutes 25 seconds.

===== TRAINING 3-stage =====
<BEGIN
POS count : consumed   78 : 78
Train dataset for temp stage can not be filled. Branch training terminated.

您的负面图片有多大。 我有同样的问题。 该错误表明他没有足够的负面图片。 底片图像不必与底片图像相同。 所以我所做的就是拍摄原始的负片,但是物体上有一个黑色矩形。 并重新开始。

函数负片在图像中搜索新的负​​片图像,当他使用一个负片图像时,他将不再使用它。 它是随机选择的,并且具有与正像相同的大小。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM