svip-lab / impersonator

PyTorch implementation of our ICCV 2019 paper: Liquid Warping GAN: A Unified Framework for Human Motion Imitation, Appearance Transfer and Novel View Synthesis
https://svip-lab.github.io/project/impersonator
Other
1.72k stars 317 forks source link

Getting ImportError: No module named cuda.load_textures #20

Open akashdexati opened 4 years ago

akashdexati commented 4 years ago

Hi @StevenLiuWen @piaozhx @ak9250 I followed the exact steps mentioned in README.md On running it runs into "ImportError: No module named cuda.load_textures"

akash@my-open-source-machine:~/impersonator$ python demo_swap.py 
Traceback (most recent call last):
  File "demo_swap.py", line 5, in <module>
    from models.swapper import Swapper
  File "/home/ubuntu/impersonator/models/swapper.py", line 7, in <module>
    from utils.nmr import SMPLRenderer
  File "/home/ubuntu/impersonator/utils/nmr.py", line 6, in <module>
    import neural_renderer as nr
  File "build/bdist.linux-x86_64/egg/neural_renderer/__init__.py", line 3, in <module>
  File "build/bdist.linux-x86_64/egg/neural_renderer/load_obj.py", line 9, in <module>
ImportError: No module named cuda.load_textures

I have referred https://github.com/daniilidis-group/neural_renderer/issues/17 But in my case there is only one neural_renderer.

Can you please guide me on the issue. Thanks

TheCompAce commented 4 years ago

akashdexati,

I have spent all day trying to get this to work. Like you I only have one neural_renderer. I created a new Environment with Python 3.6, and got everything setup (I also needed the Nvidia CUDA toolkit)

But now I am stuck with this error. (I tried the latest github of "neural_renderer" but that didn't compile like this one did.)

Any help with this would be great, I am on Windows 7.

EDIT: I decided to install tensorflow-gpu instead of tensorflow. ran "conda uninstall tensorflow" ran "conda install tensorflow-gpu"

So now I'm getting "File "h5py\h5.pyx", line 1, in init h5py.h5" "ImportError: DLL load failed: The specified procedure could not be found."

so I ran "pip uninstall h5py" (I had to run it twice, for duplicate versions) ran "conda uninstall h5py" (now my env should be clean of h6py) rand "conda install h5py"

This fixed the h5py error.

But when I tried the demo again, so it seems that it wasn't tensorflow causing it. "import neural_renderer.cuda.load_textures as load_textures_cuda"

yeetan commented 4 years ago

goto the directory of neural_renderer\neural_renderer, then run the python

import neural_renderer.cuda.load_textures as load_textures_cuda it works, but when I got to the root directory of neural_renderer, it displays the error again,

DavisDDD commented 4 years ago

I had the same problem, I'm using pycharm. The problem is beacause the import package can't be in the same path with the demo.py. My solution is copy the /neural_renderer to another path, then add it as an external lib.