zhengye1995 / Zero-shot-Instance-Segmentation

code for CVPR paper Zero-shot Instance Segmentation
Apache License 2.0
90 stars 14 forks source link

google colab #31

Closed ZahraHeydari95 closed 2 years ago

ZahraHeydari95 commented 2 years ago

Please help me how to change inference.py to see images in colab?

I get the following 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.7/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._

zhengye1995 commented 2 years ago

Please try to re-install the opencv-python package.

ZahraHeydari95 commented 2 years ago

I did a lot of searching and a lot of people said that qt could not be used in google colab.

(( "From the error message, it's because LabelImg use QT. QT is a GUI library that can run only on your local machine. You cannot run it in the cloud and then let it open a QT window on your machine. You may need to find another labeling library that use web-interface instead." ))

Now what do you think I should do to get an answer and be able to execute the following command?

ZahraHeydari95 commented 2 years ago

thanks for answer.

ZahraHeydari95 commented 2 years ago

command : !python tools/test.py configs/zsi/48_17/test/zsi/zero-shot-mask-rcnn-BARPN-bbox_mask_sync_bg_decoder.py ./checkpoints/ZSI_48_17.pth --show

zhengye1995 commented 2 years ago

Since the visualization is based on mmcv (opencv), which uses qt for show the image. If qt is not supported in google colab, you should modify the visualization code in here and use other tools that do not rely on Qt.