[英]getting **QObject::moveToThread:** issue while I am running face detection python script using opencv-python
I have made one python script for face detection using opencv-python and I am using Deep Learning-based Face Detector in OpenCV this method for face detection.我已经制作了一个 python 脚本用于使用 opencv-python 进行人脸检测,并且我在 OpenCV 中使用基于深度学习的人脸检测器进行人脸检测。
when I try to run the script it works perfectly.当我尝试运行脚本时,它可以完美运行。 except, one thing I am getting this issue in my terminal for each iteration of the loop.除了,对于循环的每次迭代,我都会在终端中遇到这个问题。
QObject::moveToThread: Current thread (0x557189d700e0) is not the object's thread (0x55718a9b9530).
Cannot move to target thread (0x557189d700e0)
QObject::moveToThread: Current thread (0x557189d700e0) is not the object's thread (0x55718a9b9530).
Cannot move to target thread (0x557189d700e0)
QObject::moveToThread: Current thread (0x557189d700e0) is not the object's thread (0x55718a9b9530).
Cannot move to target thread (0x557189d700e0)
I am not able to find what is happening in reality.我无法找到现实中正在发生的事情。 I have used different solutions from StackOverflow but none of them is actually working in my case.我使用了 StackOverflow 的不同解决方案,但在我的情况下,它们实际上都不起作用。
I am using this version of opencv and python.我正在使用这个版本的 opencv 和 python。
cv2.__version__ --> 4.5.2
Python --> 3.8.3
If anyone knows the solution to this issue please acknowledge me.如果有人知道这个问题的解决方案,请承认我。 it would be really helpful to me.这对我真的很有帮助。
I have used this way and in my case, it worked.我用过这种方式,就我而言,它有效。
Solution:解决方案:
OpenCV downgrade OpenCV 降级
Pip uninstall opencv-python Pip 卸载 opencv-python
Pip install opencv-python==4.1.2.30 Pip 安装 opencv-python==4.1.2.30
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.