本文介绍了为什么要创建自己的Haar分类器级联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了教程,该教程创建了自己的haar-classifier级联.

I found this tutorial on creating your own haar-classifier cascades.

这给我提出了一个问题:运行HaarTraining和创建自己的分类器(与使用OpenCv提供的级联相对)有什么好处(如果有的话)?

This raised the question with me: what are the advantages, if any, of running HaarTraining, and creating your own classifier (as opposed to using the cascades provided by OpenCv)?

推荐答案

Haar或LBP级联分类器是用于检测物体或刚性物体的常用技术.因此,这是训练您自己的级联的两个主要要点:

Haar or LBP cascades classifiers are common technique used for detection or rigid objects. So here are two major points for training your own cascade:

  1. OpenCV附带的级联并未涵盖所有可能的对象类型.因此,如果要创建面​​部检测应用程序,则可以使用OpenCV级联之一,但是如果需要检测例如狗,则没有准备使用级联的功能.

  1. Cascades coming with OpenCV do not cover all possible object types. So you can use one of OpenCV cascades if you are going to create a face-detection application but there no ready to use cascades if you need to detect for example dogs.

来自OpenCV的级联很好,但并不是最好的级联.这是一项艰巨的任务,但有可能训练级联,使其具有更高的检测率,并产生较少的假阳性和假阴性.

And cascades from OpenCV are good but they are not the best possible. It is a challenging task but it is possible to train a cascade that will have higher detection rate and produce less false-positives and false-negatives.

还有一个重要的说明:您的教程中使用的haartraining应用程序现在被OpenCV团队视为已弃用. opencv_traincascade是较新的版本,它具有2个重要功能:它支持LBP功能,并且支持多线程(TBB).典型的区别是这样的

And one major remark: haartraining application used in your tutorial is now considered as deprecated by OpenCV team. opencv_traincascade is a newer version and it has 2 important features: it supports LBP features and it supports multi-threading (TBB). Typical difference looks like this

haartraining + singlecore> 3周为一个分类器.
级联+多核<一个分类器30分钟.

haartraining + singlecore > 3 weeks for one classifier.
traincascades + multicore < 30 minutes for one classifier.

但是最糟糕的是,我不知道任何解释opencv_traincascade用法的优秀教程.有关详细信息,请参见此线程.

But the worst of all I don't know any good tutorials explaining usage of opencv_traincascade. See this thread for details.

这篇关于为什么要创建自己的Haar分类器级联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-24 08:17