Open harishkashyap opened 3 years ago
Are you using ssh or somehow running remotely?
@mucozcan hi, I use ssh remote connecting, I also met this error. Could you help me ? Looking forward to your reply! Thanks a lot!
@mucozcan hi, I use ssh remote connecting, I also met this error. Could you help me ? Looking forward to your reply! Thanks a lot!
Hi, sorry for late reply. By using ssh, you can't access the host machine's display engine directly. You can write inference results in remote file system and transfer to your workspace. Display functions like cv2.imshow()
wouldn't work through ssh.
"You can resolve this issue by modifying the code located at line 135 from 'cv2.imshow( "output", im_target_rgb )' to 'cv2.imwrite('/path/to/your/dic/result.jpg', im_target_rgb)'."
python demo.py --input ./BSD500/101027.jpg /home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/_reduction.py:43: UserWarning: size_average and reduce args will be deprecated, please use reduction='mean' instead. warnings.warn(warning.format(ret)) qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/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, minimal, minimalegl, offscreen, vnc, webgl.
Aborted (core dumped)