autonomousvision / differentiable_volumetric_rendering

This repository contains the code for the CVPR 2020 paper "Differentiable Volumetric Rendering: Learning Implicit 3D Representations without 3D Supervision"
http://www.cvlibs.net/publications/Niemeyer2020CVPR.pdf
MIT License
798 stars 90 forks source link

ValueError: Buffer dtype mismatch, expected 'long' but got 'long long' #15

Closed jay-thakur closed 4 years ago

jay-thakur commented 4 years ago

Hi,

I am trying to run this on Windows CPU Machine.

Executed python generate.py configs/demo/demo_combined.yaml but getting below error -

=> Loading checkpoint from url...
  0%|                                                                                                                                                | 0/7 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "generate.py", line 207, in <module>
    main()  # execute this only when run directly, not when imported!
  File "generate.py", line 128, in main
    out = generator.generate_mesh(data)
  File "C:\Users\jay\differentiable_volumetric_rendering\im2mesh\dvr\generation.py", line 70, in generate_mesh
    mesh = self.generate_from_latent(c, stats_dict=stats_dict,
  File "C:\Users\jay\differentiable_volumetric_rendering\im2mesh\dvr\generation.py", line 145, in generate_from_latent
    points = mesh_extractor.query()
  File "im2mesh\utils\libmise\mise.pyx", line 122, in im2mesh.utils.libmise.mise.MISE.query
    cdef long[:, :] points_view = points_np
ValueError: Buffer dtype mismatch, expected 'long' but got 'long long'

I tried changing

points_np = np.zeros((points.size(), 3), dtype=np.int64)

to

points_np = np.zeros((points.size(), 3), dtype=np.int32)

and

points_np = np.zeros((points.size(), 3), dtype=np.int32_t)

But no luck.

Could you please help me.

m-niemeyer commented 4 years ago

Hi @jay-thakur , thanks a lot for your interest in our project!

I am sorry but we only tested the code on Linux GPU machines. I do not have access to Windows machines, so I sadly I cannot help you here. Good luck!