issue with colab notebook when running demo.py
Hi,
I have an issue when I try to run the demo.py from googlecolab notebook: when I run the block
%%bash
python3 demo.py
--checkpoint=data/model_checkpoint.pt
--img=examples/im1010.jpg
--openpose=examples/im1010_openpose.json
this triggers the following error. Any idea to solve this problem? Thanks,
Traceback (most recent call last):
File "demo.py", line 28, in
I solved this problem by specifiying trochvision version in the requirements.txt file. Now it looks like this (I also added pillow==6.1.0): neural-renderer-pytorch numpy opencv-python pyopengl pyrender scikit-image scipy==1.0.0 tensorboard chumpy smplx spacepy torch==1.1.0 torchgeometry torchvision==0.3.0 tqdm trimesh pillow==6.1.0
This raises a problem with smpl. So I modified the line 5 in SPIN/models/smpl.py from from smplx.body_models import ModelOutput to from smplx.body_models import SMPLXOutput
Now the problem is I guess with opengl, because I have the following error :
Traceback (most recent call last):
File "demo.py", line 36, in
Do you know how to solve this problrem? Regards
Did you resolve this issue? I was not involved in writing the colab notebook, but it seems there seems to be an issue with OpenGL on your machine. Is our demo.py able to run on your machine?
Hi! I had a similar problem, and I finally found the solution!
Install torch and torchvision with the following command to make them compatible with Cuda 10.1 on Google Colab (Python 3.7): !pip install torch==1.4.0 torchvision==0.5.0
And follow the instruction here to make Pyrender work with OSMesa: https://pyrender.readthedocs.io/en/latest/install/index.html#osmesa
Hi thanks so much for your feedback! regards,
De : zonaylc @.> Envoyé : samedi 27 mars 2021 23:09 À : nkolot/SPIN @.> Cc : YoussefAlj @.>; Author @.> Objet : Re: [nkolot/SPIN] issue with colab notebook when running demo.py (#93)
Hi! I had a similar problem, and I finally found the solution!
Install torch and torchvision with the following command to make them compatible with Cuda 10.1 on Google Colab (Python 3.7): !pip install torch==1.4.0 torchvision==0.5.0
And follow the install instruction here to make Pyrender work with OSMesa: https://pyrender.readthedocs.io/en/latest/install/index.html#osmesa
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nkolot/SPIN/issues/93#issuecomment-808809410, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABK3Z7CRWADHNKOBDW3QTXTTFZJTNANCNFSM4SV5Q65A.
Hi, I have the same problem.
My os is Ubuntu16.04 and CUDA=10.0, and I have install pip install torch==1.1.0 torchvision==0.3.0.
Error Trace is :
Traceback (most recent call last):
File "demo.py", line 36, in
which vision of torch should I download?
Hi, I have the same problem. My os is Ubuntu16.04 and CUDA=10.0, and I have install
pip install torch==1.1.0 torchvision==0.3.0.Error Trace is : Traceback (most recent call last): File "demo.py", line 36, in from utils.renderer import Renderer File "/home/ubuntu/mahui/SPIN/utils/renderer.py", line 6, in import pyrender File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/pyrender/init.py", line 3, in from .light import Light, PointLight, DirectionalLight, SpotLight File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/pyrender/light.py", line 10, in from OpenGL.GL import * File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/OpenGL/GL/init.py", line 4, in from OpenGL.GL.VERSION.GL_1_1 import * File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in from OpenGL.raw.GL.VERSION.GL_1_1 import * File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in from OpenGL.raw.GL import _errors File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/OpenGL/raw/GL/_errors.py", line 4, in _error_checker = _ErrorChecker( _p, _p.GL.glGetError ) AttributeError: 'NoneType' object has no attribute 'glGetError'
which vision of torch should I download?
and I test pip install torch==1.2.0 torchvision==0.4.0, but it also had no effect.