kanezaki / pytorch-unsupervised-segmentation-tip

MIT License
259 stars 58 forks source link

Unable to produce output image (segmented image) after running code in google colab #16

Open cyberkarim opened 2 years ago

cyberkarim commented 2 years ago

Hello,

I'm having an issue with the code. I'm using colab, having all the necessary requirements installed. I forked the project into my colab session then run the python command : "!python3 demo.py --input ./BSD500/101027.jpg" to generate ouput. It instead prints the following in the std : /usr/local/lib/python3.7/dist-packages/torch/nn/_reduction.py:42: UserWarning: size_average and reduce args will be deprecated, please use reduction='mean' instead. warnings.warn(warning.format(ret)) : cannot connect to X server The output images isn't generated

milaomrani commented 2 years ago

This issue happens because the X server is a program in the X Window System that runs only on local machines while Google Colab runs as a terminal.