zoukankan      html  css  js  c++  java
  • traincascade.exe 出错:死循环在某个阶段

    参考:(参数 -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]

  • 相关阅读:
    Asp.net MVC3
    ASP.NET 路由实现页面静态化(附在线Demo和Source)
    ASP.NET MVC中Unobtrusive Ajax的妙用
    ASP.NET MVC Controller激活系统详解:IoC的应用[上篇]
    探讨大数据量处理
    提高ASP.NET性能与可伸缩性的几个个常用方法剖析
    Winform 应用
    C#利用QrCode.Net生成二维码
    MS SQL删除大数据
    由浅入深:自己动手开发模板引擎——置换型模板引擎1
  • 原文地址:https://www.cnblogs.com/bbsno1/p/3268480.html
Copyright © 2011-2022 走看看