织梦CMS - 轻松建站从此开始!

罗索

traincascade.exe 出错:死循环在某个阶段

落鹤生 发布于 2015-04-12 13:34 点击:次 
参考:(参数 -numPos设置错误) Theproblemisthatyourvec-filehasexactlythesamesamplescountthatyoupassedincommandline-numPos979.Trainingapplicationusedallsamplesfromthevec-filetotrain0-stageanditcannotgetnewpositivesamplesforthenextstagetrainingbecause
TAG: AdaBoost  分类器  分类器训练  

参考:(参数 -numPos设置错误)

The problem is that your vec-file has exactly the same samples count that you passed in command line -numPos 979. Training application used all samples from the vec-file to train 0-stage and it can not get new positive samples for the next stage training because vec-file is over. The bug of traincascade is that it had assert() in such cases, but it has to throw an exception with error message for a user. It was fixed in r8913. -numPose is a samples count that is used to train each stage. Some already used samples can be filtered by each previous stage (ie recognized as background), but no more than (1 - minHitRate) * numPose on each stage. So vec-file has to contain >= (numPose + (numStages-1) * (1 - minHitRate) * numPose) + S, where S is a count of samples from vec-file that can be recognized as background right away. I hope it can help you to create vec-file of correct size and chose right numPos value.

It worked for me. I also had same problem, I was following the famous tutorial on HAAR training but wanted to try the newer training utility with -npos 7000 -nneg 2973

so i did following calcs:

vec-file has to contain >= (numPos + (numStages-1) * (1 - minHitRate) * numPos) + S     说明:(S 即为 numNeg)

7000 >= (numPos + (20-1) * (1 - 0.999) * numPos) + 2973

(7000 - 2973)/(1 + 19*0.001) >= numPos

numPos <= 4027/1.019

numPos <= 3951 ~~ 3950

and used:

-npos 3950 -nneg 2973

It works.

即:num <= (numVec - numNeg)/[(numStages - 1) * (1 - minHitRate)+1]

(think_embed)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201504/17275.html]
本文出处:CSDN博客 作者:think_embed 原文
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容