Closed BiaBibii closed 2 years ago
Hi,
The error you're getting is not related to how we load images, i.e., it is not about cv2.imread
. Rather, it is about how we visualize the depth predictions while running run-testing-online.py
. visualize_predictions
here, calls cv2.imshow
function here, which uses Qt backend to open a GUI window to show the depth predictions. This requires some kind of physical display connection and/or X server which Google Colab machines naturally do not have. There are many threads on the same problem you're facing such as this one or this one.
Now that we've established the reason, let's discuss the solution. You can set Config.test_visualize=False
here, which disables the visualization.
If you have to use Google Colab and if you want to look at the depth predictions, I can suggest two things:
cv2.imwrite
to save the predictions as PNG images somewhere on Google Drive, so that you can visually inspect them later.
Hello, I'm trying to run this code in google colab, and I get this error. I tried to use imageio, skimage instead of cv2.imread, but it doesn't work. Thanks
!python run-testing-online.py