数字图像处理成长之路17:linux下训练样本并识别车牌实验

本文主要是介绍数字图像处理成长之路17:linux下训练样本并识别车牌实验,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

在网上找到了一个小样本


首先列显示这些样本文件并重定向道data1.txt:

ls -1 >> data1.txt


然后修改后缀名:

cat data1.txt | sed 's/\.bmp/\.bmp 1 0 0 60 17/'



在文件前面加上路径前缀:

cat data2.txt | sed 's/^/\/home\/test\/桌面\/car_train_samples\/pimages\//' >> data3.txt


opencv_createsamples -vec pos.vec -info pos.dat -num 617 -w 60 -h 17

Info file name: pos.dat
Img file name: (NULL)
Vec file name: pos.vec
BG  file name: (NULL)
Num: 617
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 60
Height: 17
Max Scale: -1
Create training samples from images collection...
Done. Created 617 samples

参考了这篇在windows下训练样本的文章

http://blog.csdn.net/xuejiren/article/details/39473521

https://www.cnblogs.com/chensheng-zhou/p/5542887.html

开始训练,刚开始我用-npos 617 -nneg 1350 训练不成功,换成下面参数成功了,具体原因有待分析。

opencv_haartraining -data trainout -vec pos.vec -bg nag.dat -npos 317 -nneg 300 -mem 8000 -mode ALL -w 60 -h 17 -j8


然后打开我之前的QT程序,调用摄像头来实时检测下车牌。


time opencv_haartraining -data trainout450_900 -vec pos.vec -bg nag.dat -npos 450 -nneg 900 -mem 8000 -mode ALL -w 60 -h 17 -j8 >> p450n900.txtData dir name: trainout450_900
Vec file name: pos.vec
BG  file name: nag.dat, is a vecfile: no
Num pos: 450
Num neg: 900
Num stages: 14
Num splits: 1 (stump as weak classifier)
Mem: 8000 MB
Symmetric: TRUE
Min hit rate: 0.995000
Max false alarm rate: 0.500000
Weight trimming: 0.950000
Equal weights: FALSE
Mode: ALL
Width: 60
Height: 17
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-05Tree Classifier
Stage
+---+
|  0|
+---+Number of features used : 375981Parent node: NULL*** 1 cluster ***
POS: 450 450 1.000000
NEG: 900 1
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 2.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.493908| 1.000000| 1.000000| 0.176296|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.588691| 1.000000| 1.000000| 0.177037|
+----+----+-+---------+---------+---------+---------+
|   3| 94%|-|-0.969799| 1.000000| 1.000000| 0.151111|
+----+----+-+---------+---------+---------+---------+
|   4| 97%|+|-1.200450| 1.000000| 1.000000| 0.147407|
+----+----+-+---------+---------+---------+---------+
|   5| 89%|-|-1.449244| 1.000000| 1.000000| 0.102222|
+----+----+-+---------+---------+---------+---------+
|   6| 95%|+|-1.547615| 1.000000| 1.000000| 0.087407|
+----+----+-+---------+---------+---------+---------+
|   7| 91%|-|-0.841398| 0.997778| 0.341111| 0.084444|
+----+----+-+---------+---------+---------+---------+
Stage training time: 480.00
Number of used features: 7Parent node: NULL
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+
|  0|
+---+0Parent node: 0*** 1 cluster ***
POS: 450 451 0.997783
NEG: 900 0.421546
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.361088| 1.000000| 1.000000| 0.212593|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.569266| 1.000000| 1.000000| 0.178519|
+----+----+-+---------+---------+---------+---------+
|   3| 90%|-|-0.788352| 1.000000| 1.000000| 0.154815|
+----+----+-+---------+---------+---------+---------+
|   4| 99%|+|-0.871740| 1.000000| 1.000000| 0.149630|
+----+----+-+---------+---------+---------+---------+
|   5| 97%|-|-1.163519| 1.000000| 1.000000| 0.105185|
+----+----+-+---------+---------+---------+---------+
|   6| 89%|+|-1.388671| 1.000000| 1.000000| 0.080000|
+----+----+-+---------+---------+---------+---------+
|   7| 95%|-|-0.785888| 1.000000| 0.401111| 0.073333|
+----+----+-+---------+---------+---------+---------+
Stage training time: 461.00
Number of used features: 7Parent node: 0
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+
|  0|  1|
+---+---+0---1Parent node: 1*** 1 cluster ***
POS: 450 451 0.997783
NEG: 900 0.20872
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 2.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.366608| 1.000000| 1.000000| 0.214815|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.574690| 1.000000| 1.000000| 0.205185|
+----+----+-+---------+---------+---------+---------+
|   3| 91%|-|-0.866233| 1.000000| 1.000000| 0.197778|
+----+----+-+---------+---------+---------+---------+
|   4| 97%|+|-1.068779| 1.000000| 1.000000| 0.142963|
+----+----+-+---------+---------+---------+---------+
|   5| 95%|-|-1.324796| 1.000000| 1.000000| 0.114815|
+----+----+-+---------+---------+---------+---------+
|   6| 99%|+|-1.393622| 1.000000| 1.000000| 0.109630|
+----+----+-+---------+---------+---------+---------+
|   7| 96%|-|-1.629125| 1.000000| 1.000000| 0.097778|
+----+----+-+---------+---------+---------+---------+
|   8| 97%|+|-1.008357| 0.997778| 0.400000| 0.097037|
+----+----+-+---------+---------+---------+---------+
Stage training time: 518.00
Number of used features: 8Parent node: 1
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+
|  0|  1|  2|
+---+---+---+0---1---2Parent node: 2*** 1 cluster ***
POS: 450 452 0.995575
NEG: 900 0.13361
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 2.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.488624| 1.000000| 1.000000| 0.245185|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.771243| 1.000000| 1.000000| 0.271111|
+----+----+-+---------+---------+---------+---------+
|   3|100%|-|-0.582786| 0.995556| 0.748889| 0.214815|
+----+----+-+---------+---------+---------+---------+
|   4| 83%|+|-0.729587| 0.995556| 0.750000| 0.223704|
+----+----+-+---------+---------+---------+---------+
|   5| 80%|-|-0.943908| 0.997778| 0.768889| 0.180000|
+----+----+-+---------+---------+---------+---------+
|   6| 82%|+|-1.162628| 0.995556| 0.717778| 0.133333|
+----+----+-+---------+---------+---------+---------+
|   7| 79%|-|-1.443707| 0.997778| 0.742222| 0.141481|
+----+----+-+---------+---------+---------+---------+
|   8| 80%|+|-1.060291| 0.995556| 0.512222| 0.117037|
+----+----+-+---------+---------+---------+---------+
|   9| 79%|-|-1.101675| 0.995556| 0.470000| 0.096296|
+----+----+-+---------+---------+---------+---------+
Stage training time: 516.00
Number of used features: 9Parent node: 2
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+
|  0|  1|  2|  3|
+---+---+---+---+0---1---2---3Parent node: 3*** 1 cluster ***
POS: 450 454 0.991189
NEG: 900 0.0614628
BACKGROUND PROCESSING TIME: 0.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.203923| 1.000000| 1.000000| 0.240741|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.479903| 1.000000| 1.000000| 0.262963|
+----+----+-+---------+---------+---------+---------+
|   3| 93%|-|-0.545721| 0.995556| 0.760000| 0.211852|
+----+----+-+---------+---------+---------+---------+
|   4| 84%|+|-0.744102| 1.000000| 0.803333| 0.219259|
+----+----+-+---------+---------+---------+---------+
|   5| 84%|-|-0.981718| 1.000000| 0.831111| 0.232593|
+----+----+-+---------+---------+---------+---------+
|   6| 81%|+|-0.978937| 0.995556| 0.711111| 0.143704|
+----+----+-+---------+---------+---------+---------+
|   7| 80%|-|-1.187332| 0.997778| 0.722222| 0.127407|
+----+----+-+---------+---------+---------+---------+
|   8| 80%|+|-0.724781| 0.995556| 0.472222| 0.135556|
+----+----+-+---------+---------+---------+---------+
Stage training time: 463.00
Number of used features: 8Parent node: 3
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+
|  0|  1|  2|  3|  4|
+---+---+---+---+---+0---1---2---3---4Parent node: 4*** 1 cluster ***
POS: 450 457 0.984683
NEG: 900 0.0359842
BACKGROUND PROCESSING TIME: 1.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.300581| 1.000000| 1.000000| 0.243704|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.505537| 1.000000| 1.000000| 0.250370|
+----+----+-+---------+---------+---------+---------+
|   3| 91%|-|-0.744117| 1.000000| 1.000000| 0.263704|
+----+----+-+---------+---------+---------+---------+
|   4|100%|+|-0.857982| 1.000000| 1.000000| 0.257778|
+----+----+-+---------+---------+---------+---------+
|   5|100%|-|-1.076755| 1.000000| 1.000000| 0.165185|
+----+----+-+---------+---------+---------+---------+
|   6| 98%|+|-1.213209| 1.000000| 1.000000| 0.168148|
+----+----+-+---------+---------+---------+---------+
|   7| 96%|-|-0.941899| 0.997778| 0.718889| 0.153333|
+----+----+-+---------+---------+---------+---------+
|   8| 98%|+|-1.051461| 0.997778| 0.740000| 0.149630|
+----+----+-+---------+---------+---------+---------+
|   9| 80%|-|-1.260610| 0.995556| 0.684444| 0.139259|
+----+----+-+---------+---------+---------+---------+
|  10| 84%|+|-1.450285| 0.997778| 0.693333| 0.126667|
+----+----+-+---------+---------+---------+---------+
|  11| 78%|-|-1.613495| 0.995556| 0.690000| 0.118519|
+----+----+-+---------+---------+---------+---------+
|  12| 77%|+|-1.772708| 0.995556| 0.707778| 0.111852|
+----+----+-+---------+---------+---------+---------+
|  13| 73%|-|-1.191579| 0.995556| 0.396667| 0.102963|
+----+----+-+---------+---------+---------+---------+
Stage training time: 779.00
Number of used features: 13Parent node: 4
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|
+---+---+---+---+---+---+0---1---2---3---4---5Parent node: 5*** 1 cluster ***
POS: 450 459 0.980392
NEG: 900 0.0207703
BACKGROUND PROCESSING TIME: 1.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.415726| 1.000000| 1.000000| 0.333333|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.711295| 1.000000| 1.000000| 0.405926|
+----+----+-+---------+---------+---------+---------+
|   3|100%|-|-0.915748| 1.000000| 1.000000| 0.205926|
+----+----+-+---------+---------+---------+---------+
|   4|100%|+|-1.020884| 1.000000| 1.000000| 0.205185|
+----+----+-+---------+---------+---------+---------+
|   5| 98%|-|-0.876332| 0.995556| 0.796667| 0.185926|
+----+----+-+---------+---------+---------+---------+
|   6| 84%|+|-0.791319| 0.995556| 0.702222| 0.179259|
+----+----+-+---------+---------+---------+---------+
|   7| 80%|-|-0.942921| 0.995556| 0.711111| 0.185185|
+----+----+-+---------+---------+---------+---------+
|   8| 78%|+|-1.045565| 0.995556| 0.725556| 0.186667|
+----+----+-+---------+---------+---------+---------+
|   9| 77%|-|-1.349022| 1.000000| 0.748889| 0.182963|
+----+----+-+---------+---------+---------+---------+
|  10| 81%|+|-1.102614| 0.997778| 0.625556| 0.180741|
+----+----+-+---------+---------+---------+---------+
|  11| 69%|-|-1.732624| 0.995556| 0.723333| 0.172593|
+----+----+-+---------+---------+---------+---------+
|  12| 62%|+|-2.238386| 0.995556| 0.782222| 0.182222|
+----+----+-+---------+---------+---------+---------+
|  13| 63%|-|-1.857026| 0.995556| 0.756667| 0.183704|
+----+----+-+---------+---------+---------+---------+
|  14| 59%|+|-1.685051| 0.995556| 0.683333| 0.188148|
+----+----+-+---------+---------+---------+---------+
|  15| 52%|-|-1.791075| 0.997778| 0.637778| 0.193333|
+----+----+-+---------+---------+---------+---------+
|  16| 55%|+|-1.797033| 0.995556| 0.655556| 0.200000|
+----+----+-+---------+---------+---------+---------+
|  17| 55%|-|-1.798790| 0.995556| 0.661111| 0.190370|
+----+----+-+---------+---------+---------+---------+
|  18| 55%|+|-1.627204| 0.995556| 0.596667| 0.194074|
+----+----+-+---------+---------+---------+---------+
|  19| 54%|-|-1.978265| 0.995556| 0.681111| 0.203704|
+----+----+-+---------+---------+---------+---------+
|  20| 51%|+|-2.245611| 0.995556| 0.704444| 0.189630|
+----+----+-+---------+---------+---------+---------+
|  21| 46%|-|-2.133149| 0.995556| 0.671111| 0.207407|
+----+----+-+---------+---------+---------+---------+
|  22| 49%|+|-2.170100| 0.995556| 0.645556| 0.184444|
+----+----+-+---------+---------+---------+---------+
|  23| 51%|-|-1.877319| 0.995556| 0.583333| 0.188148|
+----+----+-+---------+---------+---------+---------+
|  24| 52%|+|-1.867247| 0.995556| 0.588889| 0.201481|
+----+----+-+---------+---------+---------+---------+
|  25| 52%|-|-1.778916| 0.995556| 0.550000| 0.186667|
+----+----+-+---------+---------+---------+---------+
|  26| 49%|+|-2.143595| 0.995556| 0.595556| 0.185926|
+----+----+-+---------+---------+---------+---------+
|  27| 46%|-|-2.026647| 0.995556| 0.560000| 0.182222|
+----+----+-+---------+---------+---------+---------+
|  28| 38%|+|-2.266902| 0.995556| 0.548889| 0.184444|
+----+----+-+---------+---------+---------+---------+
|  29| 33%|-|-2.391911| 0.995556| 0.580000| 0.185926|
+----+----+-+---------+---------+---------+---------+
|  30| 38%|+|-2.430512| 0.995556| 0.574444| 0.190370|
+----+----+-+---------+---------+---------+---------+
|  31| 34%|-|-2.647248| 0.995556| 0.597778| 0.188148|
+----+----+-+---------+---------+---------+---------+
|  32| 38%|+|-2.324212| 0.995556| 0.521111| 0.178519|
+----+----+-+---------+---------+---------+---------+
|  33| 32%|-|-2.318813| 0.995556| 0.516667| 0.171111|
+----+----+-+---------+---------+---------+---------+
|  34| 35%|+|-2.535526| 0.995556| 0.542222| 0.169630|
+----+----+-+---------+---------+---------+---------+
|  35| 36%|-|-2.042666| 0.995556| 0.460000| 0.182222|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1297.00
Number of used features: 35Parent node: 5
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|
+---+---+---+---+---+---+---+0---1---2---3---4---5---6Parent node: 6*** 1 cluster ***
POS: 450 461 0.976139
NEG: 900 0.0218192
BACKGROUND PROCESSING TIME: 1.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.718171| 1.000000| 1.000000| 0.573333|
+----+----+-+---------+---------+---------+---------+
|   2| 86%|+|-1.271018| 1.000000| 1.000000| 0.573333|
+----+----+-+---------+---------+---------+---------+
|   3| 86%|-|-2.063729| 1.000000| 1.000000| 0.602963|
+----+----+-+---------+---------+---------+---------+
|   4| 92%|+|-2.502124| 1.000000| 1.000000| 0.194074|
+----+----+-+---------+---------+---------+---------+
|   5| 81%|-|-1.733242| 1.000000| 0.984444| 0.593333|
+----+----+-+---------+---------+---------+---------+
|   6| 87%|+|-1.964061| 0.995556| 0.981111| 0.200000|
+----+----+-+---------+---------+---------+---------+
|   7| 82%|-|-1.914516| 0.997778| 0.980000| 0.585185|
+----+----+-+---------+---------+---------+---------+
|   8| 79%|+|-2.029114| 0.997778| 0.976667| 0.579259|
+----+----+-+---------+---------+---------+---------+
|   9| 75%|-|-1.899666| 0.995556| 0.938889| 0.584444|
+----+----+-+---------+---------+---------+---------+
|  10| 67%|+|-2.292485| 0.995556| 0.960000| 0.562222|
+----+----+-+---------+---------+---------+---------+
|  11| 62%|-|-2.332688| 0.995556| 0.946667| 0.576296|
+----+----+-+---------+---------+---------+---------+
|  12| 69%|+|-2.395460| 0.995556| 0.944444| 0.572593|
+----+----+-+---------+---------+---------+---------+
|  13| 69%|-|-2.537034| 0.995556| 0.967778| 0.558519|
+----+----+-+---------+---------+---------+---------+
|  14| 66%|+|-2.285337| 0.995556| 0.937778| 0.571852|
+----+----+-+---------+---------+---------+---------+
|  15| 61%|-|-2.670989| 0.995556| 0.950000| 0.569630|
+----+----+-+---------+---------+---------+---------+
|  16| 53%|+|-3.513774| 0.995556| 0.968889| 0.585185|
+----+----+-+---------+---------+---------+---------+
|  17| 59%|-|-2.989280| 0.995556| 0.943333| 0.571852|
+----+----+-+---------+---------+---------+---------+
|  18| 64%|+|-2.741658| 0.995556| 0.927778| 0.571111|
+----+----+-+---------+---------+---------+---------+
|  19| 66%|-|-2.420548| 0.995556| 0.907778| 0.189630|
+----+----+-+---------+---------+---------+---------+
|  20| 67%|+|-2.363318| 0.995556| 0.900000| 0.185185|
+----+----+-+---------+---------+---------+---------+
|  21| 68%|-|-2.349633| 0.997778| 0.901111| 0.546667|
+----+----+-+---------+---------+---------+---------+
|  22| 66%|+|-2.528409| 0.995556| 0.897778| 0.559259|
+----+----+-+---------+---------+---------+---------+
|  23| 64%|-|-2.119827| 0.995556| 0.871111| 0.545185|
+----+----+-+---------+---------+---------+---------+
|  24| 67%|+|-2.247921| 0.995556| 0.880000| 0.547407|
+----+----+-+---------+---------+---------+---------+
|  25| 63%|-|-2.146968| 0.995556| 0.867778| 0.162963|
+----+----+-+---------+---------+---------+---------+
|  26| 65%|+|-2.272907| 0.995556| 0.878889| 0.157037|
+----+----+-+---------+---------+---------+---------+
|  27| 65%|-|-2.304265| 0.995556| 0.868889| 0.150370|
+----+----+-+---------+---------+---------+---------+
|  28| 67%|+|-2.149958| 0.995556| 0.860000| 0.143704|
+----+----+-+---------+---------+---------+---------+
|  29| 64%|-|-2.000496| 0.995556| 0.844444| 0.147407|
+----+----+-+---------+---------+---------+---------+
|  30| 70%|+|-1.946395| 0.995556| 0.834444| 0.150370|
+----+----+-+---------+---------+---------+---------+
|  31| 71%|-|-1.971215| 0.995556| 0.841111| 0.142963|
+----+----+-+---------+---------+---------+---------+
|  32| 66%|+|-2.003288| 0.995556| 0.826667| 0.140000|
+----+----+-+---------+---------+---------+---------+
|  33| 68%|-|-1.621673| 0.995556| 0.792222| 0.123704|
+----+----+-+---------+---------+---------+---------+
|  34| 70%|+|-1.711287| 0.995556| 0.791111| 0.116296|
+----+----+-+---------+---------+---------+---------+
|  35| 71%|-|-1.701897| 0.995556| 0.235556| 0.115556|
+----+----+-+---------+---------+---------+---------+
Stage training time: 883.00
Number of used features: 35Parent node: 6
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|
+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7Parent node: 7*** 1 cluster ***
POS: 450 463 0.971922
NEG: 900 0.00550031
BACKGROUND PROCESSING TIME: 2.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.187015| 1.000000| 1.000000| 0.258519|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.300477| 1.000000| 1.000000| 0.282222|
+----+----+-+---------+---------+---------+---------+
|   3| 96%|-|-0.557926| 1.000000| 1.000000| 0.255556|
+----+----+-+---------+---------+---------+---------+
|   4| 98%|+|-0.776465| 1.000000| 1.000000| 0.216296|
+----+----+-+---------+---------+---------+---------+
|   5| 97%|-|-0.657225| 1.000000| 0.800000| 0.228889|
+----+----+-+---------+---------+---------+---------+
|   6| 82%|+|-0.782462| 0.995556| 0.704444| 0.229630|
+----+----+-+---------+---------+---------+---------+
|   7| 79%|-|-0.819948| 0.995556| 0.597778| 0.210370|
+----+----+-+---------+---------+---------+---------+
|   8| 79%|+|-1.262917| 0.995556| 0.674444| 0.188889|
+----+----+-+---------+---------+---------+---------+
|   9| 79%|-|-1.176503| 0.997778| 0.646667| 0.192593|
+----+----+-+---------+---------+---------+---------+
|  10| 77%|+|-1.063362| 0.995556| 0.567778| 0.170370|
+----+----+-+---------+---------+---------+---------+
|  11| 78%|-|-0.968403| 0.995556| 0.500000| 0.157778|
+----+----+-+---------+---------+---------+---------+
Stage training time: 643.00
Number of used features: 11Parent node: 7
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|
+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8Parent node: 8*** 1 cluster ***
POS: 450 466 0.965665
NEG: 900 0.00310321
BACKGROUND PROCESSING TIME: 4.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.255033| 1.000000| 1.000000| 0.277037|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.891419| 1.000000| 1.000000| 0.254074|
+----+----+-+---------+---------+---------+---------+
|   3| 86%|-|-0.788910| 0.997778| 0.943333| 0.336296|
+----+----+-+---------+---------+---------+---------+
|   4| 96%|+|-0.974068| 1.000000| 0.944444| 0.213333|
+----+----+-+---------+---------+---------+---------+
|   5| 96%|-|-1.131390| 1.000000| 0.947778| 0.197778|
+----+----+-+---------+---------+---------+---------+
|   6| 96%|+|-1.049241| 1.000000| 0.814444| 0.188889|
+----+----+-+---------+---------+---------+---------+
|   7| 87%|-|-0.956714| 1.000000| 0.707778| 0.172593|
+----+----+-+---------+---------+---------+---------+
|   8| 80%|+|-0.829509| 0.997778| 0.607778| 0.211111|
+----+----+-+---------+---------+---------+---------+
|   9| 81%|-|-1.035194| 1.000000| 0.638889| 0.151111|
+----+----+-+---------+---------+---------+---------+
|  10| 78%|+|-1.168562| 1.000000| 0.672222| 0.162222|
+----+----+-+---------+---------+---------+---------+
|  11| 76%|-|-1.202044| 0.995556| 0.610000| 0.145185|
+----+----+-+---------+---------+---------+---------+
|  12| 76%|+|-1.105554| 0.995556| 0.548889| 0.142222|
+----+----+-+---------+---------+---------+---------+
|  13| 74%|-|-0.969937| 0.995556| 0.473333| 0.129630|
+----+----+-+---------+---------+---------+---------+
Stage training time: 747.00
Number of used features: 13Parent node: 8
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|  9|
+---+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8---9Parent node: 9*** 1 cluster ***
POS: 450 468 0.961538
NEG: 900 0.00162922
BACKGROUND PROCESSING TIME: 7.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.204385| 1.000000| 1.000000| 0.285185|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.723615| 1.000000| 1.000000| 0.275556|
+----+----+-+---------+---------+---------+---------+
|   3| 94%|-|-0.878448| 1.000000| 0.976667| 0.480741|
+----+----+-+---------+---------+---------+---------+
|   4| 86%|+|-0.848651| 1.000000| 0.921111| 0.387407|
+----+----+-+---------+---------+---------+---------+
|   5| 85%|-|-0.699739| 0.997778| 0.851111| 0.314815|
+----+----+-+---------+---------+---------+---------+
|   6| 90%|+|-0.879463| 0.997778| 0.861111| 0.299259|
+----+----+-+---------+---------+---------+---------+
|   7| 90%|-|-1.011466| 0.995556| 0.762222| 0.188148|
+----+----+-+---------+---------+---------+---------+
|   8| 82%|+|-1.115050| 0.995556| 0.777778| 0.178519|
+----+----+-+---------+---------+---------+---------+
|   9| 81%|-|-1.023660| 0.997778| 0.767778| 0.168148|
+----+----+-+---------+---------+---------+---------+
|  10| 80%|+|-0.993009| 0.995556| 0.600000| 0.162222|
+----+----+-+---------+---------+---------+---------+
|  11| 78%|-|-1.110528| 1.000000| 0.635556| 0.168889|
+----+----+-+---------+---------+---------+---------+
|  12| 79%|+|-1.249211| 1.000000| 0.660000| 0.163704|
+----+----+-+---------+---------+---------+---------+
|  13| 77%|-|-0.876510| 0.997778| 0.505556| 0.152593|
+----+----+-+---------+---------+---------+---------+
|  14| 77%|+|-0.897350| 0.997778| 0.520000| 0.145926|
+----+----+-+---------+---------+---------+---------+
|  15| 77%|-|-0.845018| 0.995556| 0.457778| 0.132593|
+----+----+-+---------+---------+---------+---------+
Stage training time: 838.00
Number of used features: 15Parent node: 9
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|  9| 10|
+---+---+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8---9--10Parent node: 10*** 1 cluster ***
POS: 450 470 0.957447
NEG: 900 0.000855148
BACKGROUND PROCESSING TIME: 12.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.200000| 1.000000| 1.000000| 0.271111|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.274703| 1.000000| 1.000000| 0.263704|
+----+----+-+---------+---------+---------+---------+
|   3| 97%|-|-0.467780| 1.000000| 1.000000| 0.297037|
+----+----+-+---------+---------+---------+---------+
|   4| 99%|+|-0.619255| 1.000000| 1.000000| 0.297037|
+----+----+-+---------+---------+---------+---------+
|   5| 99%|-|-0.776008| 1.000000| 1.000000| 0.236296|
+----+----+-+---------+---------+---------+---------+
|   6| 98%|+|-0.710650| 0.997778| 0.926667| 0.259259|
+----+----+-+---------+---------+---------+---------+
|   7| 93%|-|-0.981652| 1.000000| 0.963333| 0.217778|
+----+----+-+---------+---------+---------+---------+
|   8| 96%|+|-1.067254| 1.000000| 0.965556| 0.225185|
+----+----+-+---------+---------+---------+---------+
|   9| 96%|-|-1.207241| 1.000000| 0.972222| 0.196296|
+----+----+-+---------+---------+---------+---------+
|  10| 95%|+|-1.267179| 1.000000| 0.972222| 0.188889|
+----+----+-+---------+---------+---------+---------+
|  11| 83%|-|-1.084049| 0.995556| 0.866667| 0.175556|
+----+----+-+---------+---------+---------+---------+
|  12| 82%|+|-1.358055| 0.995556| 0.861111| 0.178519|
+----+----+-+---------+---------+---------+---------+
|  13| 81%|-|-1.247416| 0.995556| 0.771111| 0.166667|
+----+----+-+---------+---------+---------+---------+
|  14| 81%|+|-1.051703| 0.995556| 0.695556| 0.160000|
+----+----+-+---------+---------+---------+---------+
|  15| 79%|-|-0.938227| 0.995556| 0.596667| 0.155556|
+----+----+-+---------+---------+---------+---------+
|  16| 78%|+|-1.038177| 0.995556| 0.612222| 0.148889|
+----+----+-+---------+---------+---------+---------+
|  17| 77%|-|-0.956480| 0.995556| 0.571111| 0.138519|
+----+----+-+---------+---------+---------+---------+
|  18| 78%|+|-1.020276| 0.995556| 0.575556| 0.128889|
+----+----+-+---------+---------+---------+---------+
|  19| 77%|-|-1.150614| 0.995556| 0.610000| 0.131111|
+----+----+-+---------+---------+---------+---------+
|  20| 77%|+|-0.977177| 0.995556| 0.510000| 0.118519|
+----+----+-+---------+---------+---------+---------+
|  21| 76%|-|-0.879366| 0.995556| 0.458889| 0.110370|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1208.00
Number of used features: 21Parent node: 10
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11|
+---+---+---+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8---9--10--11Parent node: 11*** 1 cluster ***
POS: 450 474 0.949367
NEG: 900 0.000448503
BACKGROUND PROCESSING TIME: 23.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.399267| 1.000000| 1.000000| 0.333333|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.938347| 1.000000| 1.000000| 0.270370|
+----+----+-+---------+---------+---------+---------+
|   3| 92%|-|-1.117361| 1.000000| 1.000000| 0.305926|
+----+----+-+---------+---------+---------+---------+
|   4| 93%|+|-1.229308| 1.000000| 1.000000| 0.320741|
+----+----+-+---------+---------+---------+---------+
|   5| 90%|-|-0.759493| 0.995556| 0.924444| 0.196296|
+----+----+-+---------+---------+---------+---------+
|   6| 94%|+|-0.792182| 0.995556| 0.837778| 0.288889|
+----+----+-+---------+---------+---------+---------+
|   7| 84%|-|-0.809791| 0.995556| 0.771111| 0.179259|
+----+----+-+---------+---------+---------+---------+
|   8| 83%|+|-1.074367| 0.997778| 0.827778| 0.228148|
+----+----+-+---------+---------+---------+---------+
|   9| 87%|-|-1.224407| 0.997778| 0.840000| 0.174074|
+----+----+-+---------+---------+---------+---------+
|  10| 81%|+|-1.268124| 1.000000| 0.850000| 0.172593|
+----+----+-+---------+---------+---------+---------+
|  11| 81%|-|-1.020804| 0.995556| 0.740000| 0.161481|
+----+----+-+---------+---------+---------+---------+
|  12| 80%|+|-1.018552| 0.995556| 0.740000| 0.156296|
+----+----+-+---------+---------+---------+---------+
|  13| 80%|-|-1.117389| 0.995556| 0.667778| 0.154815|
+----+----+-+---------+---------+---------+---------+
|  14| 80%|+|-1.075194| 0.995556| 0.654444| 0.145185|
+----+----+-+---------+---------+---------+---------+
|  15| 79%|-|-0.997753| 0.995556| 0.638889| 0.135556|
+----+----+-+---------+---------+---------+---------+
|  16| 80%|+|-1.119331| 0.997778| 0.635556| 0.125926|
+----+----+-+---------+---------+---------+---------+
|  17| 78%|-|-0.665877| 0.995556| 0.395556| 0.121481|
+----+----+-+---------+---------+---------+---------+
Stage training time: 921.00
Number of used features: 17Parent node: 11
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12|
+---+---+---+---+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8---9--10--11--12Parent node: 12*** 1 cluster ***
POS: 450 476 0.945378
NEG: 900 0.000197409
BACKGROUND PROCESSING TIME: 52.00
Precalculation time: 1.00
+----+----+-+---------+---------+---------+---------+
|  N |%SMP|F|  ST.THR |    HR   |    FA   | EXP. ERR|
+----+----+-+---------+---------+---------+---------+
|   1|100%|-|-0.205047| 1.000000| 1.000000| 0.287407|
+----+----+-+---------+---------+---------+---------+
|   2|100%|+|-0.275924| 1.000000| 1.000000| 0.296296|
+----+----+-+---------+---------+---------+---------+
|   3|100%|-|-0.395112| 1.000000| 1.000000| 0.294074|
+----+----+-+---------+---------+---------+---------+
|   4| 94%|+|-0.434666| 1.000000| 1.000000| 0.306667|
+----+----+-+---------+---------+---------+---------+
|   5| 98%|-|-0.600460| 1.000000| 1.000000| 0.306667|
+----+----+-+---------+---------+---------+---------+
|   6| 97%|+|-0.674654| 1.000000| 1.000000| 0.272593|
+----+----+-+---------+---------+---------+---------+
|   7| 97%|-|-0.792674| 1.000000| 1.000000| 0.235556|
+----+----+-+---------+---------+---------+---------+
|   8| 98%|+|-0.862523| 1.000000| 1.000000| 0.211852|
+----+----+-+---------+---------+---------+---------+
|   9| 97%|-|-1.095279| 1.000000| 1.000000| 0.231111|
+----+----+-+---------+---------+---------+---------+
|  10| 97%|+|-1.055641| 1.000000| 0.961111| 0.215556|
+----+----+-+---------+---------+---------+---------+
|  11| 94%|-|-1.222002| 1.000000| 0.972222| 0.200741|
+----+----+-+---------+---------+---------+---------+
|  12| 95%|+|-1.294562| 1.000000| 0.972222| 0.183704|
+----+----+-+---------+---------+---------+---------+
|  13| 94%|-|-1.488662| 1.000000| 0.972222| 0.147407|
+----+----+-+---------+---------+---------+---------+
|  14| 96%|+|-1.319879| 0.995556| 0.826667| 0.149630|
+----+----+-+---------+---------+---------+---------+
|  15| 84%|-|-1.174129| 0.995556| 0.685556| 0.143704|
+----+----+-+---------+---------+---------+---------+
|  16| 86%|+|-1.166592| 0.995556| 0.627778| 0.138519|
+----+----+-+---------+---------+---------+---------+
|  17| 79%|-|-0.892183| 0.995556| 0.522222| 0.140741|
+----+----+-+---------+---------+---------+---------+
|  18| 78%|+|-1.040174| 0.995556| 0.533333| 0.134074|
+----+----+-+---------+---------+---------+---------+
|  19| 77%|-|-1.141962| 0.995556| 0.483333| 0.115556|
+----+----+-+---------+---------+---------+---------+
Stage training time: 1014.00
Number of used features: 19Parent node: 12
Chosen number of splits: 0Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8---9--10--11--12--13Parent node: 13*** 1 cluster ***
POS: 450 478 0.941423
NEG: 900 0.000111588
BACKGROUND PROCESSING TIME: 92.00
Required number of stages achieved. Branch training terminated.
Total number of splits: 0Tree Classifier
Stage
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|  0|  1|  2|  3|  4|  5|  6|  7|  8|  9| 10| 11| 12| 13|
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+0---1---2---3---4---5---6---7---8---9--10--11--12--13Cascade performance
POS: 450 478 0.941423
NEG: 900 0.000108563
BACKGROUND PROCESSING TIME: 94.00real	184m34.049s
user	184m48.624s
sys	0m5.476s



这篇关于数字图像处理成长之路17:linux下训练样本并识别车牌实验的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1026011

相关文章

linux-基础知识3

打包和压缩 zip 安装zip软件包 yum -y install zip unzip 压缩打包命令: zip -q -r -d -u 压缩包文件名 目录和文件名列表 -q:不显示命令执行过程-r:递归处理,打包各级子目录和文件-u:把文件增加/替换到压缩包中-d:从压缩包中删除指定的文件 解压:unzip 压缩包名 打包文件 把压缩包从服务器下载到本地 把压缩包上传到服务器(zip

阿里开源语音识别SenseVoiceWindows环境部署

SenseVoice介绍 SenseVoice 专注于高精度多语言语音识别、情感辨识和音频事件检测多语言识别: 采用超过 40 万小时数据训练,支持超过 50 种语言,识别效果上优于 Whisper 模型。富文本识别:具备优秀的情感识别,能够在测试数据上达到和超过目前最佳情感识别模型的效果。支持声音事件检测能力,支持音乐、掌声、笑声、哭声、咳嗽、喷嚏等多种常见人机交互事件进行检测。高效推

Linux 网络编程 --- 应用层

一、自定义协议和序列化反序列化 代码: 序列化反序列化实现网络版本计算器 二、HTTP协议 1、谈两个简单的预备知识 https://www.baidu.com/ --- 域名 --- 域名解析 --- IP地址 http的端口号为80端口,https的端口号为443 url为统一资源定位符。CSDNhttps://mp.csdn.net/mp_blog/creation/editor

【Python编程】Linux创建虚拟环境并配置与notebook相连接

1.创建 使用 venv 创建虚拟环境。例如,在当前目录下创建一个名为 myenv 的虚拟环境: python3 -m venv myenv 2.激活 激活虚拟环境使其成为当前终端会话的活动环境。运行: source myenv/bin/activate 3.与notebook连接 在虚拟环境中,使用 pip 安装 Jupyter 和 ipykernel: pip instal

Linux_kernel驱动开发11

一、改回nfs方式挂载根文件系统         在产品将要上线之前,需要制作不同类型格式的根文件系统         在产品研发阶段,我们还是需要使用nfs的方式挂载根文件系统         优点:可以直接在上位机中修改文件系统内容,延长EMMC的寿命         【1】重启上位机nfs服务         sudo service nfs-kernel-server resta

【Linux 从基础到进阶】Ansible自动化运维工具使用

Ansible自动化运维工具使用 Ansible 是一款开源的自动化运维工具,采用无代理架构(agentless),基于 SSH 连接进行管理,具有简单易用、灵活强大、可扩展性高等特点。它广泛用于服务器管理、应用部署、配置管理等任务。本文将介绍 Ansible 的安装、基本使用方法及一些实际运维场景中的应用,旨在帮助运维人员快速上手并熟练运用 Ansible。 1. Ansible的核心概念

Linux服务器Java启动脚本

Linux服务器Java启动脚本 1、初版2、优化版本3、常用脚本仓库 本文章介绍了如何在Linux服务器上执行Java并启动jar包, 通常我们会使用nohup直接启动,但是还是需要手动停止然后再次启动, 那如何更优雅的在服务器上启动jar包呢,让我们一起探讨一下吧。 1、初版 第一个版本是常用的做法,直接使用nohup后台启动jar包, 并将日志输出到当前文件夹n

[Linux]:进程(下)

✨✨ 欢迎大家来到贝蒂大讲堂✨✨ 🎈🎈养成好习惯,先赞后看哦~🎈🎈 所属专栏:Linux学习 贝蒂的主页:Betty’s blog 1. 进程终止 1.1 进程退出的场景 进程退出只有以下三种情况: 代码运行完毕,结果正确。代码运行完毕,结果不正确。代码异常终止(进程崩溃)。 1.2 进程退出码 在编程中,我们通常认为main函数是代码的入口,但实际上它只是用户级

【Linux】应用层http协议

一、HTTP协议 1.1 简要介绍一下HTTP        我们在网络的应用层中可以自己定义协议,但是,已经有大佬定义了一些现成的,非常好用的应用层协议,供我们直接使用,HTTP(超文本传输协议)就是其中之一。        在互联网世界中,HTTP(超文本传输协议)是一个至关重要的协议,他定义了客户端(如浏览器)与服务器之间如何进行通信,以交换或者传输超文本(比如HTML文档)。