openvinotoolkit / training_extensions

Train, Evaluate, Optimize, Deploy Computer Vision Models via OpenVINO™
https://openvinotoolkit.github.io/training_extensions/
Apache License 2.0
1.14k stars 443 forks source link

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" . Inference getting aborted for Instance Segmentation. #2376

Closed VishwaBhushanBH closed 1 year ago

VishwaBhushanBH commented 1 year ago

Instance segmentation inference in AWS Sage Maker is getting aborted.

Command - otx demo --input docs/utils/images/wgisd_dataset_sample.jpg --load-weights outputs/weights.pth --output resulted_images

Error: "" [ ] 0/1, elapsed: 0s, ETA:INFO:nncf:NNCF initialized successfully. Supported frameworks detected: torch, onnx, openvino [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 1/1, 0.6 task/s, elapsed: 2s, ETA: 0s2023-07-19 08:58:30,514 | INFO : Inference completed qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/ec2-user/SageMaker/Segmentation_OpenVino/training_extensions/.otx/lib/python3.10/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 ""

It is not saving the inference in the directory. I am good if we can save the inference in a directory and not visually see the results in a seperate window. There is a similar issue here. I am not able to run inferencing after training the model using OTX because of this.

Steps to Reproduce

  1. In AWS Sage Maker install OTX following this
  2. Create dataset and train the model following the above link.
  3. Run inferencing following this link

Environment:

sovrasov commented 1 year ago

To disable visualization, you could pass a negative delay value via command line: --delay -1

VishwaBhushanBH commented 1 year ago

Thanks @sovrasov for the answer, it worked.