opencv_traincascade的推荐参数是什么? [英] What are the recommended parameters for opencv_traincascade?

查看:347
本文介绍了opencv_traincascade的推荐参数是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenCv 2.4.10.

我最近尝试创建自己的级联分类器来检测robotino;我有240个阴性样品和650个阳性样品.但是我对应该赋予opencv_traincascade的值感到困惑.

I have recently tried to create my own cascade classifier to detect robotino; I have 240 negative samples and 650 positive samples. But I am getting confused in the values I should give to the opencv_traincascade.

  • numNeg:说明每个阶段使用的阴性样本数. 我应该如何计算此参数?
  • numStage:我应该如何确定所需的阶段数?
  • numNeg : states the number of negative samples used in each stage. How should I calculate this parameter?
  • numStage : How should I tell the number of stages wanted ?

推荐答案

需要考虑的几点:

  • numNeg可以是您拥有的所有负样本,但是numPos一定要略少于您拥有的所有正样本(也许可以快速了解分类器的训练方式).确切的数量取决于您拥有的样本数量和训练的阶段,但是您可以从0.9 * numPos开始并逐步减少.如果样本不足,它将失败.

  • numNeg can be all the negative samples you have, however numPos will have to be slightly less than all the positives you have (maybe have a quick read about how the classifier is being trained). The exact number will depend on how many samples you have and the stages you train however you can start with maybe 0.9 * numPos and work down. It will fail if it runs out of samples.

您必须评估受过训练的各个阶段的表现.请记住,由于过度拟合,更多的阶段并不一定总能带来更好的性能.

You'll have to evaluate the performance of various stages trained. Keep in mind more stages doesn't always lead to better performance due to overfitting.

您可能还希望有更多的正负样本.可以在网上稍作查找即可找到通用否定集.可以很好地工作但要坚持下去,这有点奇怪!

You might also want more samples both positive and negative; generic negative sets can be found online with a bit of looking. It is a bit fiddly to get working well but stick with it!

这篇关于opencv_traincascade的推荐参数是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆