专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 图形/图像

OpenCV训练分类器有关问题

发布时间:2011-06-27 20:37:41 文章来源:www.iduyao.cn 采编人员:星星草
OpenCV训练分类器问题
我用了正样本30个负样本30,就只训练了几步就停在那里了,等了几个小时还是一样,不知道是什么问题?下面是显示的信息:

D:\5角训练图20>"D:\OpenCV2.2\bin\opencv_haartraining.exe" -data .\test -vec .\正
样本\pos.vec -bg .\负样本\list.dat -npos 30 -nneg 30 -mem 200 -mode ALL -w 20 -h
 20
Data dir name: .\test
Vec file name: .\正样本\pos.vec
BG file name: .\负样本\list.dat, is a vecfile: no
Num pos: 30
Num neg: 30
Num stages: 14
Num splits: 1 (stump as weak classifier)
Mem: 200 MB
Symmetric: TRUE
Min hit rate: 0.995000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: ALL
Width: 20
Height: 20
Applied boosting algorithm: GAB
Error (valid only for Discrete and Real AdaBoost): misclass
Max number of splits in tree cascade: 0
Min number of positive samples per cluster: 500
Required leaf false alarm rate: 6.10352e-005

Tree Classifier
Stage
+---+
| 0|
+---+


Number of features used : 67074

Parent node: NULL

*** 1 cluster ***
POS: 30 30 1.000000
NEG: 30 1
BACKGROUND PROCESSING TIME: 0.01
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.913043| 1.000000| 1.000000| 0.150000|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-0.210199| 1.000000| 0.500000| 0.100000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1.75
Number of used features: 2

Parent node: NULL
Chosen number of splits: 0

Total number of splits: 0

Tree Classifier
Stage
+---+
| 0|
+---+

  0


Parent node: 0

*** 1 cluster ***
POS: 30 30 1.000000
NEG: 30 0.5
BACKGROUND PROCESSING TIME: 0.02
Precalculation time: 0.01
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-|-0.846155| 1.000000| 1.000000| 0.133333|
+----+----+-+---------+---------+---------+---------+
| 2|100%|+|-0.266968| 1.000000| 0.400000| 0.033333|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1.69
Number of used features: 2

Parent node: 0
Chosen number of splits: 0

Total number of splits: 0

Tree Classifier
Stage
+---+---+
| 0| 1|
+---+---+

  0---1


Parent node: 1

*** 1 cluster ***
POS: 30 30 1.000000
NEG: 30 0.211268
BACKGROUND PROCESSING TIME: 0.03
Precalculation time: 0.00
+----+----+-+---------+---------+---------+---------+
| N |%SMP|F| ST.THR | HR | FA | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
| 1|100%|-| 1.000000| 1.000000| 0.000000| 0.000000|
+----+----+-+---------+---------+---------+---------+
Stage training time: 0.75
Number of used features: 1

Parent node: 1
Chosen number of splits: 0

Total number of splits: 0

Tree Classifier
Stage
+---+---+---+
| 0| 1| 2|
+---+---+---+

  0---1---2


Parent node: 2

*** 1 cluster ***
POS: 30 30 1.000000



------解决方案--------------------
我也遇到这个问题,你有没有解决?
------解决方案--------------------
1、正负样本数都太少了,增加正负样本的数量
2、在1的情况下,遇到这种情况,适当增加新的负样本
3、增加新的负样本之后,只需修改负样本参数就可以在原来的基础上继续训练
------解决方案--------------------
总体上来说两类样本的数量都太少!
------解决方案--------------------
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: