xun-xh / yolov5-onnx-pyqt-exe

yolo模型使用cv2推理并使用qt5添加GUI后打包部署。pt模型转onnx模型;opencv.dnn完成推理;pyqt实现可视界面;打包为exe方便移植
100 stars 17 forks source link

ubuntu20.04上运行出错 #13

Open ShiweiCheng0303 opened 1 year ago

ShiweiCheng0303 commented 1 year ago

ubuntu20.04上按照坐着配置环境后运行Yolo2onnxDetectProjectDemo.py 出现下面错误: QObject::moveToThread: Current thread (0x55914073a280) is not the object's thread (0x559140949c30). Cannot move to target thread (0x55914073a280)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/ubuntu/anaconda3/envs/yolov5-pyqt/lib/python3.9/site-packages/cv2/qt/plugins" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl. 什么原因呢,谢谢了

xun-xh commented 1 year ago

这个我好像遇到过,印象中是opencv的版本在linux和win平台不一致。 而且好像linux平台还需要额外安装其他库才能使用opencv

xun-xh commented 1 year ago

具体你可以google一下