带docker的Openvino nsc2:无法在函数“cvInitSystem”中初始化GTK后端

2024-04-20 03:00:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我确实对openvino和docker上的神经计算棒2有一些问题:

当我尝试跑步时:

python3 object_de
tection_demo.py -d MYRIAD -i /home/openvino/video.mp4 -m /home/openvino/person-vehicle-bike-detection-2004.xml -at ssd --labels /home/openvino/data/dataset_classes/coco_91cl_bkgr.txt -o /home/openvino/output_video.mp4
 

它不工作,需要1分钟才能给我这个消息,这是奇怪的,因为ncs2

[ INFO ] Initializing Inference Engine...
[ INFO ] Loading network...
[ INFO ] Reading network from IR...
[ INFO ] Use BoxesLabelsParser
[ INFO ] Loading network to MYRIAD plugin...
[ INFO ] Starting inference...
To close the application, press 'CTRL+C' here or switch to the output window and press ESC key
OpenCV: FFMPEG: tag 0x47504a4d/'MJPG' is not supported with codec id 8 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
Unable to init server: Could not connect: Connection refused
Traceback (most recent call last):
  File "object_detection_demo.py", line 350, in <module>
    sys.exit(main() or 0)
  File "object_detection_demo.py", line 278, in main
    cv2.imshow('Detection Results', frame)
cv2.error: OpenCV(4.5.3-openvino) ../opencv/modules/highgui/src/window_gtk.cpp:635: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

有什么想法吗??谢谢


Tags: toinpyinfohomeobjectdemovideo