eth-ait / MultiPly

MultiPly: Reconstruction of Multiple People from Monocular Video in the Wild (CVPR2024 Oral)
https://eth-ait.github.io/MultiPly/
197 stars 18 forks source link

Windows installation / Kaolin Issue #2

Open atonalfreerider opened 2 months ago

atonalfreerider commented 2 months ago

Thank you for such a wonderful research contribution in the area of Human Motion Reconstruction.

I am attempting a Windows installation of MultiPly and am documenting my installation progress here. I have encountered an issue with Kaolin. MultiPly requires Kaolin 0.13.0.

I'm following these instructions: https://kaolin.readthedocs.io/en/latest/notes/installation.html

Installing with:

pip install kaolin==0.13.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-1.12.1_cu113.html

results in a "successful" install, but a failed compilation. This error results after running multiply/code python train.py

    from kaolin import _C
ImportError: DLL load failed: The specified module could not be found.

Installing Kaolin from source with

python setup.py develop

fails because CUDA cannot be found. I have CUDA 11.8 per the requirements. The same ImportError: DLL load failed occurs when I run train.py. I tried conda install -c nvidia cuda-python==11.8.0 but this has issues finding Visual Studio build tools, and am not sure if I'm running down a rabbit hole there.

This is an old issue ticket for the import _C dll issue: https://github.com/NVIDIAGameWorks/kaolin/issues/140

Other preparations/modifications I had to implement: -Visual Studio with Python, C++ tools, Windows 10 SDK -MSVC v141 VS 2017 C++ x64/x86 build tools (v14.16) for Kaolin -must install pytorch with cuda support: conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -Cython incompatibility. Had to enforce: cython==0.29.20 -had to install pytorch3d while in multiply env -had to uninstall marshmallow and reinstall -had to install chardet pip install chardet

Running on Windows 10, with CUDA 11.8 SDK, and a NVIDIA GeForce RTX 2080 Ti

Thank you for your help

jzr99 commented 2 months ago

Hi,

What if you try to install a compatible version of pytorch and kaolin with CUDA 11.8 to avoid installing from source.

For example, install

# For CUDA 11.8
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.0.1_cu118.html

Although we do not test our code with CUDA 11.8 and pytorch 2.0.1, but I assume the results should be similar.

atonalfreerider commented 2 months ago

Thank you, there are other incompatibilities with python 3.7 in these cases:

Could not solve for environment specs
The following packages are incompatible
├─ pin-1 is installable and it requires
│  └─ python 3.7.* , which can be installed;
└─ torchvision 0.15.2  is not installable because there are no viable options
   ├─ torchvision 0.15.2 would require
   │  └─ python >=3.10,<3.11.0a0 , which conflicts with any installable versions previously reported;
   ├─ torchvision 0.15.2 would require
   │  └─ python >=3.11,<3.12.0a0 , which conflicts with any installable versions previously reported;
   ├─ torchvision 0.15.2 would require
   │  └─ python >=3.8,<3.9.0a0 , which conflicts with any installable versions previously reported;
   └─ torchvision 0.15.2 would require
      └─ python >=3.9,<3.10.0a0 , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.7.* (labeled as 'pin-1')

EDIT: Installing with Python 3.10 is proceeding. I'm working on getting Pytorch3D reinstalled

multiply/
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
pip install kaolin==0.15.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.0.1_cu118.html

pip install -r requirements.txt

conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -c bottler nvidiacub

pytorch3d/ pip install -e .

I encountered this error, and installed CUB_HOME even though this is deprecated: https://stackoverflow.com/questions/62304087/installing-pytorch3d-fails-with-anaconda-and-pip-on-windows-10

Currently having an issue compiling pytorch3d, even though this wasn't a problem before.

jzr99 commented 2 months ago

Hi,

I'll be on vacation till July 1st. If it is possible, we highly recommend you trying to install those dependencies and run our code on a Linux-like system. We currently do not have a Windows PC to test the compatibility of the dependencies.

atonalfreerider commented 2 months ago

I was able to get everything running on Ubuntu 24. I made upgrades for CUDA 11.8 and Python 3.10. Please see my fork here: https://github.com/atonalfreerider/MultiPly/tree/cuda-11.8

I had to use GCC v 10 (not v 11) to get the Kaolin and Pytorch3d binaries to compile. I might see if I can get this to work for Windows as well.