简体   繁体   中英

Google Colab error: Could not load the Qt platform plugin "xcb"

I'm trying to run this command on google colab

!python /content/yolov4-custom-functions/detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video /content/yolov4-custom-functions/data/video/video.mp4 --output /content/yolov4-custom-functions/detections/results.avi

And upon running this, I'm getting this error..

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.8/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, minimal, offscreen.

Fatal Python error: Aborted

Current thread 0x00007f3ea147f780 (most recent call first):
  File "/content/yolov4-custom-functions/detect_video.py", line 165 in main
  File "/usr/local/lib/python3.8/site-packages/absl/app.py", line 251 in _run_main
  File "/usr/local/lib/python3.8/site-packages/absl/app.py", line 300 in run
  File "/content/yolov4-custom-functions/detect_video.py", line 178 in <module>

I tried reinstalling and looked for other answers but none of them seems to solve this problem for colab.

Help me out please.

查看 cv2.imshow() 函数,因为 Google Colab 不允许使用 GUI,因此在此处启动图像时可能会出现错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM