junyanz / VON

[NeurIPS 2018] Visual Object Networks: Image Generation with Disentangled 3D Representation.
http://von.csail.mit.edu
Other
530 stars 90 forks source link

No module named 'vtn.vtn._ext' #2

Closed zhibo-liu closed 5 years ago

zhibo-liu commented 5 years ago

I'm trying to reproduce Generate 3d shape 2d sketch images part by

bash ./scripts/figures.sh 0 car df

below is the error

dataset [ImageAndDFDataset] was created
enable cudnn benchmark
initialization method [kaiming]
loading model from ./VON/scripts/../final_models/models_3D/car_df_G_3D.pth
initialization method [kaiming]
loading model from ./VON/scripts/../final_models/models_2D/car_df/latest_net_G_AB.pth
Traceback (most recent call last):
  File "./VON/render_module/render_sketch.py", line 2, in <module>
    from .vtn.vtn.functions import grid_sample3d, affine_grid3d
  File "./VON/render_module/vtn/vtn/functions/__init__.py", line 2, in <module>
    from .grid_sample3d import grid_sample3d
  File "./VON/render_module/vtn/vtn/functions/grid_sample3d.py", line 3, in <module>
    from .._ext import vtn_lib
ModuleNotFoundError: No module named 'render_module.vtn.vtn._ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test.py", line 19, in <module>
    model = create_model(opt)
  File "./VON/models/__init__.py", line 37, in create_model
    instance.initialize(opt)
  File "./VON/models/test_model.py", line 36, in initialize
    self.setup_DR(opt)
  File "./VON/models/base_model.py", line 161, in setup_DR
    from render_module.render_sketch import VoxelRenderLayer, CroppingLayer, GetRotationMatrix, FineSizeCroppingLayer
  File "./VON/render_module/render_sketch.py", line 4, in <module>
    from vtn.vtn.functions import grid_sample3d, affine_grid3d
ModuleNotFoundError: No module named 'vtn'

https://github.com/junyanz/VON/blob/ab5760b4756acd486254638412c7365962336079/render_module/vtn/vtn/functions/grid_sample3d.py#L3

it seems that there is no such file ./render_module/vtn/vtn/_ext.py

ztzhang commented 5 years ago

Hi, thanks for bringing this up!

We use some custom CUDA kernel for differentiable rendering, so you might need to run install.sh before running the test code. We will update the README to be more clear about this.

zhibo-liu commented 5 years ago

@ztzhang Thanks for fixing it. will runing install.sh affect others using CUDA?? Or it there any ways to recover the CUDA configuration?

ztzhang commented 5 years ago

It is only for compilation, so it does not change any setups.