opencv 训练分类器从不连续 3 阶段
opencv train classifier never contiueus 3 stage
我正在尝试学习级联分类器来学习车牌。我是 运行 OpenCV 2.4.9,在具有 16 GB RAM 和 3.4 GHz i7 处理器的 Windows 7 服务器上。我想训练分类器,但它永远不会连续第 3 阶段。
这是我在 xxxx 上制作我的 .vec 文件的方式,其中包含个人信息:
D:\xxxx\trainingBinairImages\build\x64\vc12\bin\opencv_createsamples.exe -info D:\xxxx\trainingBinairImages\positiveNew.dat -bg D:\xxxx\trainingBinairImages\NegativeNew.bg -vec D:\xxxx\trainingBinairImages\output_vec.vec -maxxangle 0 -maxyangle 0 -maxzangle 0 -w 140 -h 40 -num 3311
pause
参数:
D:\xxxx\trainingBinairImages\build\x64\vc12\bin\opencv_traincascade.exe -data D:\xxxx\trainingBinairImages\result -vec output_vec.vec -bg negativeNew.bg -numPos 2980 -numNeg 3311 -miniHitRate 0.995 -maxFalseAlarmRate 0.5 -w 140 -h 40 -featureType HAAR -precalcValBufSize 2048 -precalcIdxBufSize 2048
pause
来自命令:
===== TRAINING 3-stage =====
<BEGIN
POS count : consumed 2980 : 2981
Train dataset for temp stage can not be filled. Branch training terminated.
如果需要查看文件,我将编辑额外的文件。我试图改变 numStages 的正负值。更改目录路径等。在线有关于此的问题,我尝试过但没有解决方案。
答案以另一种形式解决the_link
Hmm that is your problem. You need to supply larger images as
negative instead of cropped windows. Imagine that you will need a lot
of windows! Each negative window that is classified correctly by the
previous stages cannot be used again for the new stage. So most people
just supply tons of not object images, the software will do its own
job of cutting out the negatives randomly for you.
我正在尝试学习级联分类器来学习车牌。我是 运行 OpenCV 2.4.9,在具有 16 GB RAM 和 3.4 GHz i7 处理器的 Windows 7 服务器上。我想训练分类器,但它永远不会连续第 3 阶段。
这是我在 xxxx 上制作我的 .vec 文件的方式,其中包含个人信息:
D:\xxxx\trainingBinairImages\build\x64\vc12\bin\opencv_createsamples.exe -info D:\xxxx\trainingBinairImages\positiveNew.dat -bg D:\xxxx\trainingBinairImages\NegativeNew.bg -vec D:\xxxx\trainingBinairImages\output_vec.vec -maxxangle 0 -maxyangle 0 -maxzangle 0 -w 140 -h 40 -num 3311
pause
参数:
D:\xxxx\trainingBinairImages\build\x64\vc12\bin\opencv_traincascade.exe -data D:\xxxx\trainingBinairImages\result -vec output_vec.vec -bg negativeNew.bg -numPos 2980 -numNeg 3311 -miniHitRate 0.995 -maxFalseAlarmRate 0.5 -w 140 -h 40 -featureType HAAR -precalcValBufSize 2048 -precalcIdxBufSize 2048
pause
来自命令:
===== TRAINING 3-stage =====
<BEGIN
POS count : consumed 2980 : 2981
Train dataset for temp stage can not be filled. Branch training terminated.
如果需要查看文件,我将编辑额外的文件。我试图改变 numStages 的正负值。更改目录路径等。在线有关于此的问题,我尝试过但没有解决方案。
答案以另一种形式解决the_link
Hmm that is your problem. You need to supply larger images as negative instead of cropped windows. Imagine that you will need a lot of windows! Each negative window that is classified correctly by the previous stages cannot be used again for the new stage. So most people just supply tons of not object images, the software will do its own job of cutting out the negatives randomly for you.