autonomousvision / occupancy_networks

This repository contains the code for the paper "Occupancy Networks - Learning 3D Reconstruction in Function Space"
https://avg.is.tuebingen.mpg.de/publications/occupancy-networks
MIT License
1.5k stars 292 forks source link

Windows support? #10

Closed noamgat closed 5 years ago

noamgat commented 5 years ago

Hi, I'm trying to get this project to run on windows. I managed to compile the extensions (Without dmc). When I run the sample command

python generate.py configs/demo.yaml

I get the following error:

Traceback (most recent call last): File "generate.py", line 145, in <module> out = generator.generate_mesh(data) File "D:\Programming\Projects\MSc\details\occupancy_networks\im2mesh\onet\generation.py", line 81, in generate_mesh mesh = self.generate_from_latent(z, c, stats_dict=stats_dict, **kwargs) File "D:\Programming\Projects\MSc\details\occupancy_networks\im2mesh\onet\generation.py", line 114, 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'

Any idea how to tackle this? (Windows 10, 64 bit)

LMescheder commented 5 years ago

Hi @noamgat, we haven't tested the repository on Windows and we are not planning to support it in the future. If you want to work under Windows, I recommend that you try the Windows Subsystem for Linux and perhaps a Docker container. If you choose the latter path, please also consider contributing the working Docker definition file to the main repository. Thanks!

noamgat commented 5 years ago

Which systems have you tested on? MacOS? Linux?

On Mon, Jul 8, 2019 at 11:03 AM Lars Mescheder notifications@github.com wrote:

Hi @noamgat https://github.com/noamgat, we haven't tested the repository on Windows and we are not planning to support it in the future. If you want to work under Windows, I recommend that you try the Windows Subsystem for Linux https://docs.microsoft.com/en-us/windows/wsl/install-win10 and perhaps a Docker container. If you choose the latter path, please also consider contributing the working Docker definition file to the main repository. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/autonomousvision/occupancy_networks/issues/10?email_source=notifications&email_token=AAKFA2DCKD2OHVQFOUD62Z3P6LYEHA5CNFSM4H6VSZFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZMJO4Q#issuecomment-509122418, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKFA2HNF5IQAUUKUB5MNFTP6LYEHANCNFSM4H6VSZFA .

LMescheder commented 5 years ago

@noamgat We've tested our code on Ubuntu 16.04 and Ubuntu 18.04.

rozentill commented 4 years ago

I made it work on Windows, just change the type np.int64 to np.long or other types that not be treated as long long and rebuild it. There could also be other ways to solve this.

fashionguy commented 4 years ago

@rozentill I get the error. I don't know how to change the type and which variable should be changed. Do you remember sitll? image

pangyyyyy commented 3 years ago

Hi @fashionguy - not sure if you still need it, I changed np.int64 to np.long in lines 122 and 167 of the mise.pyx script. To rebuild it, delete any existing lib.win-amd64-3.6 files under the build folder and re-compile it python setup.py build_ext --inplace. This worked for me on windows following @rozentill's method

morankim commented 9 months ago

I fixed setup.py like this

image image image

and erased dmc import like image image

then you will build it successfully on Windows.