CvSVM问题
使用opencv CvSVM的一些问题
它使用什么样的svm?是使用svmlight吗? OpenCV2.2有svmlight,但我找不到太多参考资料。
如果我使用 CvSVM,我是否需要手动创建 80% 的训练数据和 20% 的测试数据,并迭代 5 倍重新验证以获得更好的输出?
我正在使用 HOG 做一个检测器,并且我正在密切关注包中的 opencv 示例行人检测器。我需要学习一个分类器来检测行人以外的其他物体。任何建议将不胜感激。
谢谢!
Some questions of using the opencv CvSVM
What kind of svm is it using? Is it using svmlight? OpenCV2.2 has svmlight, but I cannot find much references to it.
If I am using CvSVM, do I need to manually create say 80% training data, and 20% testing data, and iterate on a 5-fold re-validation to get better output?
I am doing a detector using HOG, and I am following closely to the opencv sample pedestrian detector in the package. I need to learn a classifier to detect other objects other than pedestrians. Any suggestions will be appreciated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我非常确定 OpenCV 2.1 和 2.2 使用 libsvm。请参阅 openCV 文档。 libSVM 有很好的文档记录
是的,您需要创建训练和测试数据。但是,CvSVM 会自动对您的训练数据进行交叉验证,无需您自己分割训练集。在函数
train_auto
中,查看默认参数int k_fold = 10,
HOG 对于任何具有刚性结构的物体来说都是一个相当不错的检测器。只需下载任何数据库,然后运行您的 HOG 内容即可。您可以在此处找到大量数据库。或者,为了简单起见,请访问 Caltech 101,这是一个有 101 个课程的不错的学校。如果这还不够,他们还制造了 Caltech 256 =)
编辑:如果你说你想做一些与 HOG 不同的事情,我建议你使用本地补丁,例如 SIFT 或 SURF,它们都在 OpenCV 中(链接到OpenCV 的 features2d
I'm pretty sure OpenCV 2.1 and 2.2 use libsvm. Look at openCV's documentation. And libSVM is very well documented
Yes, you need to create your training and test data. However, CvSVM automatically do the crossvalidation on your training data, no need to do split yourself the training set. In the function
train_auto
, look at the default parameterint k_fold = 10,
HOG is a pretty decent detector for any object that has a rigid structure. Just download any database, and run your HOG stuff. You can find lots of databases here. Or, for simplicity, go to Caltech 101, a nice one with 101 classes. And if it's not enough, they've made Caltech 256 =)
Edit : If you said you wanted to do something different from HOG, I suggest you work on local patches, such as SIFT or SURF, which are both in OpenCV (Link to OpenCV's features2d