River-Zhang / SIFU

[CVPR 2024 Highlight] Official repository for paper "SIFU: Side-view Conditioned Implicit Function for Real-world Usable Clothed Human Reconstruction"
https://river-zhang.github.io/SIFU-projectpage/
MIT License
201 stars 9 forks source link

Problems with dependencies and environment #20

Closed levnikolaevich closed 5 months ago

levnikolaevich commented 5 months ago

Good afternoon!

I tried to set up the environment on a clean Ubuntu 20.04 (wsl Windows 11), following the instructions:

git clone https://github.com/River-Zhang/SIFU.git sudo apt-get install libeigen3-dev ffmpeg cd SIFU conda env create -f environment.yaml conda activate sifu pip install -r requirements.txt

However, I encountered several missing dependencies, conflicts, and other issues. For example, I needed to first install build essentials with: sudo apt-get install build-essential

And for the mlt package, it is necessary to install version 2024.0.0, otherwise, an error occurs https://github.com/pytorch/pytorch/issues/123097.

Eventually, I forked the repository https://github.com/levnikolaevich/SIFU and tried to fix the packages, but I gave up when I encountered an error trying to execute the command:

python -m apps.infer -cfg ./configs/sifu.yaml -gpu 0 -in_dir ./examples -out_dir ./results -loop_smpl 100 -loop_cloth 200 -hps_type pixie

The error message was:

Traceback (most recent call last):
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/lev/SIFU/apps/infer.py", line 30, in <module>
    from lib.common.render import query_color, image2vid
  File "/home/lev/SIFU/lib/common/render.py", line 17, in <module>
    from pytorch3d.renderer import (
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/site-packages/pytorch3d/renderer/__init__.py", line 3, in <module>
    from .blending import (
  File "/home/lev/miniconda3/envs/sifu/lib/python3.8/site-packages/pytorch3d/renderer/blending.py", line 9, in <module>
    from pytorch3d import _C
ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory

=============

Could you please commit an environment.yml file created with the command in an environment where everything works for you?

conda env export > environment.yml

Then, you can remove the requirements.txt file, which currently lists the package pymeshlab twice.

Thank you in advance, and congratulations on your acceptance to CVPR 2024!

River-Zhang commented 5 months ago

Hi @levnikolaevich , I'm sorry that the environment setting wasted you too much time. I'll examine this as soon as possible. Here is the content in environment.yml when I use conda env export > environment.yml: environment.zip

levnikolaevich commented 5 months ago

@River-Zhang , thank you very much!!

levnikolaevich commented 5 months ago

@River-Zhang, hello! This is what ultimately worked on a clean Ubuntu 20.04. It might be useful if you decide to update the instructions:

sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt-get install unzip libeigen3-dev ffmpeg build-essential nvidia-cuda-toolkit
mkdir -p ~/miniconda3 && \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh && \
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 && \
rm -rf ~/miniconda3/miniconda.sh && \
~/miniconda3/bin/conda init bash && \
~/miniconda3/bin/conda init zsh

========= close and re-open current shell =========

git clone https://github.com/River-Zhang/SIFU.git
cd SIFU

-->add "mkl=2024.0.0" in the "environment.yaml" https://github.com/pytorch/pytorch/issues/123097

conda env create -f environment.yaml 
conda activate sifu

changes in requirements.txt: --> delete "pymeshlab" (because there is "pymeshlab==2022.2.post4") --> change git+https://github.com/YuliangXiu/rembg.git@hf --> git+https://github.com/YuliangXiu/rembg.git (because there is no longer a tag "hf") --> add open3d==0.17.0 mediapipe einops gdown --> set numpy==1.24.4 because of "ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use 'numpy._import_array' to disable if you are certain you don't need it)."

pip install -r requirements.txt
levnikolaevich commented 5 months ago

And to be honest, I would specify more clearly that you need to run the fetch_hps.sh and fetch_data.sh scripts to download the necessary data. As a newcomer, I honestly didn't understand this right away =))

Thank you in advance!

River-Zhang commented 5 months ago

Thanks very much for your valuable suggestions! We'll update that as soon as possible! Thanks very much!

River-Zhang commented 5 months ago

@levnikolaevich The installation has been updated. Thanks sincerely again!

levnikolaevich commented 5 months ago

@River-Zhang , thank you very much! good luck!