windows系统下opencv训练自己的xml模型

具体细节操作参考链接:

https://blog.csdn.net/qq_32502511/article/details/79010509

相关资源下载看文章结尾

在opencv中训练cascade分类器,出现Train dataset for temp stage can not be filled

操作:调整neg.txt文件的目录结构

参考连接如下:

https://answers.opencv.org/question/10872/cascade-training-error-opencv-244-train-dataset-for-temp-stage-can-not-filled-branch-training-terminated-cascade-classifier-cant-be-trained-check-the/

opencv_traincascade.exe -data data/ -vec pos.vec -bg c:\Users\amy\Desktop\3399train\neg.dat -numPos 500 -numNeg 1001 -numStages 20 -w 20 -h 20 -mode ALL

1.

修改后                                 修改前

windows系统下opencv训练自己的xml模型_第1张图片windows系统下opencv训练自己的xml模型_第2张图片

2.neg

Parameters can not be written, because file xml/params.xml can not be opened

操作:创建-data相关文件夹

比如 我的是-data data/ 就是在traincascade.exe同等级下有个data文件夹

 

OpenCV Error: Bad argument (Can not get new positive sample. The most possible reason is insufficient count of samples in given vec-file.


操作调整numPos numNeg 的文件比例以及训练阶级

参考链接

http://www.bubuko.com/infodetail-544499.html

下载链接:https://pan.baidu.com/s/1T6pvKjqQpCkQKgJ5b3detw  提取码:iqzn  

你可能感兴趣的:(python日常)