What are the recommended parameters for opencv_tra

2019-09-10 00:15发布

I am using OpenCv 2.4.10.

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 : 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 ?

1条回答
SAY GOODBYE
2楼-- · 2019-09-10 00:35

A few points to consider:

  • 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!

查看更多
登录 后发表回答