0

I do have some troubles with openvino and the Neural Compute Stick 2 on docker:

When I try to run :

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
 

It doesn't workd and it takes 1 minute to give me this message , whicht is strange due to the 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'

Any idea ?? Thanks !!

simsim
  • 25
  • 1
  • 4
  • Are you sur X11 forwarding is enabled ? Follow instructions on https://stackoverflow.com/questions/48235040/run-x-application-in-a-docker-container-reliably-on-a-server-connected-via-ssh-w – RobBlanchard Jul 23 '21 at 14:24
  • Great to here that ! Consider accepting my answer to close your issue ! – RobBlanchard Jul 26 '21 at 11:41

1 Answers1

1

This is an error due to X11 forwarding in docker. GTK backend can't be initialized when X11 forwarding is disabled.
Follow instructions here: Run X application in a Docker container reliably on a server connected via SSH without "--net host"

RobBlanchard
  • 855
  • 3
  • 17