DECA
DECA copied to clipboard
DECA DEPENDENCIES
Can someone please tell me how to install dependencies to succesfully run DECA? Following requirements.txt is pointless for me, and I do not know how to make the different package versions work to run the code.
For example, following requirements_fixed.txt:
doing pip install torch==1.6.0 torchvision==0.7.0
returns
ERROR: Could not find a version that satisfies the requirement torch==1.6.0 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0)
ERROR: No matching distribution found for torch==1.6.0
Any help would be much appreciated
I install newest cuda && pytorch. My cuda sdk is 11.8. And install torch/torchvision with newest version: charset-normalizer==3.3.1 chumpy==0.70 face-alignment==1.4.1 future==0.18.3 fvcore==0.1.5.post20221221 idna==3.4 imageio==2.31.2 importlib-metadata==6.7.0 iopath==0.1.10 kornia==0.6.12 llvmlite==0.39.1 networkx==2.6.3 ninja==1.11.1.1 numba==0.56.4 numpy==1.21.6 nvidia-cublas-cu11==11.10.3.66 nvidia-cuda-nvrtc-cu11==11.7.99 nvidia-cuda-runtime-cu11==11.7.99 nvidia-cudnn-cu11==8.5.0.96 opencv-python==4.8.1.78 packaging==23.2 Pillow==9.5.0 portalocker==2.7.0 pytorch3d==0.3.0 PyWavelets==1.3.0 PyYAML==5.1.1 requests==2.31.0 scikit-image==0.19.3 scipy==1.7.3 six==1.16.0 tabulate==0.9.0 termcolor==2.3.0 tifffile==2021.11.2 torch==1.13.1 torchvision==0.14.1 tqdm==4.66.1 typing_extensions==4.7.1 urllib3==2.0.7 yacs==0.1.8 zipp==3.15.0
and modify two line:
detectors.py:
self.model = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False) # _2D --> TWO_D
renderer.py:
standard_rasterize_cuda =
load(name='standard_rasterize_cuda',
sources=[f'{curr_dir}/rasterizer/standard_rasterize_cuda.cpp', f'{curr_dir}/rasterizer/standard_rasterize_cuda_kernel.cu'],
extra_cuda_cflags = ['-std=c++14', '-ccbin=$$(which gcc)']) # cuda10.2 is not compatible with gcc9. Specify gcc 7
from standard_rasterize_cuda import standard_rasterize
'-ccbin=$$(which gcc-7)' --> $$(which gcc)
It works.
@axbing, after following the same steps as u I'm getting the error
I'm using the python3.7 miniconda and have cuda version-12.2
-
command python demos/demo_reconstruct.py -i TestSamples/examples --saveDepth True --saveObj True error - /usr/local/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found
-
command python demos/demo_reconstruct.py -i TestSamples/examples --saveDepth True --saveObj True --rasterizer_type=pytorch3d error - libcudart.so.10.1: cannot open shared object file: No such file or directory
Those dependencies intallations still didn't do the job for me. I leave here the package versions that have finally worked in my case for the community:
Packages that worked with the latest version available, just run:
!pip install -q scipy scikit-image opencv-python PyYAML face-alignment yacs kornia ninja fvcore
In my case I am using cuda version V12.2.140 (12.2), and installed latest version of torch for CUDA 12.1:
!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Here are the details of the versions installed: pytorch3d 0.7.6 torch 2.2.1+cu121 torchaudio 2.2.1+cu121 torchdata 0.7.1 torchsummary 1.5.1 torchtext 0.17.1 torchvision 0.17.1+cu121
Finally, these commands got me the correct package versions:
!pip install chumpy>=0.69 numpy==1.23
The standard_rasterize_cuda setting failed for me. To use pytorch3D instead, I installed the latest version and added the option --rasterizer_type=pytorch3d
. With this setup I was able to run DECA model on inference. Hope this helps.