使用haar时,Python OpenCV报错cascade.detectMultiScale error

简介: 使用haar时,Python OpenCV报错cascade.detectMultiScale error

  最近看haar训练自己的模型时,当我已经得到了对应的.html文件,正要兴奋的去测试一下效果时,突然报错,具体报错如下:

acf720c97d394d54899620cbbe1aff3a.png

网上大多数所说都是说在我们使用CascadeClassifier方法时,后面要采用绝对路径,不要采用相对路径。如这篇文章所述。但是呢,看看这篇文章的评论区,有很多人通过修改成绝对路径成功了,但是也有些人在评论区苦苦哀求,因为这样的操作无效。

我也深受其害,那到底是怎么修改呢,其实很简单,就是不要出现中文路径!!!不要出现中文路径!!!不要出现中文路径!!!【当然同时需要的路径是绝对路径】

快去试试吧,祝各位好运!!!

相关文章
|
5天前
|
机器学习/深度学习 数据采集 算法
Python基于OpenCV和卷积神经网络CNN进行车牌号码识别项目实战
Python基于OpenCV和卷积神经网络CNN进行车牌号码识别项目实战
41 19
|
6天前
|
开发者 Python
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
13 0
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
|
6天前
|
iOS开发 MacOS Python
【Python】已解决:(Pycharm切换Python版本后报错)No Python at “C:\Program Files\Python39\python.exe”
【Python】已解决:(Pycharm切换Python版本后报错)No Python at “C:\Program Files\Python39\python.exe”
11 0
【Python】已解决:(Pycharm切换Python版本后报错)No Python at “C:\Program Files\Python39\python.exe”
|
6天前
|
Python
【Python】已解决:(cmd进入Python环境报错)No Python at ‘C:\Users…\Python\Python39\python.exe’
【Python】已解决:(cmd进入Python环境报错)No Python at ‘C:\Users…\Python\Python39\python.exe’
9 0
|
6天前
|
数据采集 前端开发 测试技术
【Python】已解决:(最新版selenium框架元素定位报错)NameError: name ‘By’ is not defined
【Python】已解决:(最新版selenium框架元素定位报错)NameError: name ‘By’ is not defined
11 0
|
6天前
|
安全 网络安全 Python
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
【Python】已解决:(pip安装库报错)ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访
13 0
|
6天前
|
Python
【Python】已解决:(Python最新xlrd库读取xlsx报错)SyntaxError: invalid syntax
【Python】已解决:(Python最新xlrd库读取xlsx报错)SyntaxError: invalid syntax
11 0
|
6天前
|
Python
【Python】已解决:(pandas读取DataFrame列报错)raise KeyError(key) from err KeyError: (‘name‘, ‘age‘)
【Python】已解决:(pandas读取DataFrame列报错)raise KeyError(key) from err KeyError: (‘name‘, ‘age‘)
13 0
|
6天前
|
SQL 关系型数据库 MySQL
【Python】已解决:ERROR 1064 (42000): You have an error in your SQL syntax. check the manual that correspo
【Python】已解决:ERROR 1064 (42000): You have an error in your SQL syntax. check the manual that correspo
21 0
|
6天前
|
安全 Python
告别低效编程!Python线程与进程并发技术详解,让你的代码飞起来!
【7月更文挑战第9天】Python并发编程提升效率:**理解并发与并行,线程借助`threading`模块处理IO密集型任务,受限于GIL;进程用`multiprocessing`实现并行,绕过GIL限制。示例展示线程和进程创建及同步。选择合适模型,注意线程安全,利用多核,优化性能,实现高效并发编程。
20 3