Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Preparing Dataset ? #7

Open
piwawa opened this issue Dec 4, 2023 · 5 comments
Open

How to Preparing Dataset ? #7

piwawa opened this issue Dec 4, 2023 · 5 comments

Comments

@piwawa
Copy link

piwawa commented Dec 4, 2023

I just run this ./ReliTalk/preprocess/preprocess_Obama.sh , but got many errors and can not get finished.

Can you provide many more details to complete this step?

@arthur-qiu
Copy link
Owner

Hi, I guess it should be the problem of the machine environment. Please follow the https://github.com/zhengyuf/IMavatar/blob/main/preprocess/README.md to set up your environment.

@piwawa
Copy link
Author

piwawa commented Dec 4, 2023

[out#0/image2 @ 0x55e8bb9e8480] video:20214kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 1501 fps=0.0 q=-0.0 Lsize=N/A time=00:01:00.00 bitrate=N/A speed=89.2x
DECA FLAME parameter estimation
Obama_train.mp4
/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.
13 and may be removed in the future, please use 'weights' instead.  
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 
'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
creating the FLAME Decoder
trained model found. load /root/AIGC/ReliTalk/preprocess/DECA/demos/data/deca_model.tar
Traceback (most recent call last):
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1906, in _run_ninja_build
    env=env)
  File "/root/miniconda3/envs/deca-env/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "demos/demo_reconstruct.py", line 141, in <module>
    main(parser.parse_args())
  File "demos/demo_reconstruct.py", line 45, in main
    deca = DECA(config = deca_cfg, device=device)
  File "/root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/deca.py", line 50, in __init__
    self._setup_renderer(self.cfg.model)
  File "/root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/deca.py", line 53, in _setup_renderer
    set_rasterizer(self.cfg.rasterizer_type)
  File "/root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/renderer.py", line 41, in set_rasterizer
    extra_cuda_cflags = ['-std=c++14', '-ccbin=$$(which gcc-7)']) # cuda10.2 is not compatible with gcc9. Specify gcc 7
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1296, in load
    keep_intermediates=keep_intermediates)
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1518, in _jit_compile
    is_standalone=is_standalone)
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1626, in _write_ninja_file_and_build_library
    error_prefix=f"Error building extension '{name}'")
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1916, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'standard_rasterize_cuda': [1/3] /usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=standard_rasterize_cuda -DTORCH_AP
I_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /root/miniconda3/env
s/deca-env/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/torch/csrc/api/inclu
de -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages
/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/deca-env/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_
OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14 -ccbin=$(which gcc-7) -c /root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/rasterizer/standard_rasterize_cuda_kernel.cu -o standard_rasterize_cuda_kernel.cuda.o
FAILED: standard_rasterize_cuda_kernel.cuda.o
/usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=standard_rasterize_cuda -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/deca-env/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14 -ccbin=$(which gcc-7) -c /root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/rasterizer/standard_rasterize_cuda_kernel.cu -o standard_rasterize_cuda_kernel.cuda.o
-c: No such file or directory
nvcc fatal   : Failed to preprocess host compiler properties.
[2/3] c++ -MMD -MF standard_rasterize_cuda.o.d -DTORCH_EXTENSION_NAME=standard_rasterize_cuda -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/deca-env/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/rasterizer/standard_rasterize_cuda.cpp -o standard_rasterize_cuda.o
ninja: build stopped: subcommand failed.

I don't know why, I have corrected my version of torch, torchvision and CUDA just like this:

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:16:03_PST_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0

torch                    1.13.1+cu116
torchaudio               0.13.1+cu116
torchvision              0.14.1+cu116

@arthur-qiu
Copy link
Owner

[out#0/image2 @ 0x55e8bb9e8480] video:20214kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 1501 fps=0.0 q=-0.0 Lsize=N/A time=00:01:00.00 bitrate=N/A speed=89.2x
DECA FLAME parameter estimation
Obama_train.mp4
/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.
13 and may be removed in the future, please use 'weights' instead.  
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 
'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=None`.
  warnings.warn(msg)
creating the FLAME Decoder
trained model found. load /root/AIGC/ReliTalk/preprocess/DECA/demos/data/deca_model.tar
Traceback (most recent call last):
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1906, in _run_ninja_build
    env=env)
  File "/root/miniconda3/envs/deca-env/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "demos/demo_reconstruct.py", line 141, in <module>
    main(parser.parse_args())
  File "demos/demo_reconstruct.py", line 45, in main
    deca = DECA(config = deca_cfg, device=device)
  File "/root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/deca.py", line 50, in __init__
    self._setup_renderer(self.cfg.model)
  File "/root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/deca.py", line 53, in _setup_renderer
    set_rasterizer(self.cfg.rasterizer_type)
  File "/root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/renderer.py", line 41, in set_rasterizer
    extra_cuda_cflags = ['-std=c++14', '-ccbin=$$(which gcc-7)']) # cuda10.2 is not compatible with gcc9. Specify gcc 7
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1296, in load
    keep_intermediates=keep_intermediates)
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1518, in _jit_compile
    is_standalone=is_standalone)
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1626, in _write_ninja_file_and_build_library
    error_prefix=f"Error building extension '{name}'")
  File "/root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1916, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'standard_rasterize_cuda': [1/3] /usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=standard_rasterize_cuda -DTORCH_AP
I_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /root/miniconda3/env
s/deca-env/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/torch/csrc/api/inclu
de -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages
/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/deca-env/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_
OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14 -ccbin=$(which gcc-7) -c /root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/rasterizer/standard_rasterize_cuda_kernel.cu -o standard_rasterize_cuda_kernel.cuda.o
FAILED: standard_rasterize_cuda_kernel.cuda.o
/usr/local/cuda/bin/nvcc  -DTORCH_EXTENSION_NAME=standard_rasterize_cuda -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/deca-env/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++14 -ccbin=$(which gcc-7) -c /root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/rasterizer/standard_rasterize_cuda_kernel.cu -o standard_rasterize_cuda_kernel.cuda.o
-c: No such file or directory
nvcc fatal   : Failed to preprocess host compiler properties.
[2/3] c++ -MMD -MF standard_rasterize_cuda.o.d -DTORCH_EXTENSION_NAME=standard_rasterize_cuda -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/TH -isystem /root/miniconda3/envs/deca-env/lib/python3.7/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /root/miniconda3/envs/deca-env/include/python3.7m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -c /root/AIGC/ReliTalk/preprocess/DECA/demos/decalib/utils/rasterizer/standard_rasterize_cuda.cpp -o standard_rasterize_cuda.o
ninja: build stopped: subcommand failed.

I don't know why, I have corrected my version of torch, torchvision and CUDA just like this:

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:16:03_PST_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0

torch                    1.13.1+cu116
torchaudio               0.13.1+cu116
torchvision              0.14.1+cu116

Sorry, I never had this problem. I think it may be caused by the mismatched versions of gcc and CUDA. Can you try to refer to mapillary/inplace_abn#106?

@piwawa
Copy link
Author

piwawa commented Dec 5, 2023

Can you share your environment version for Preparing Dataset? Such as gcc, CUDA, torch, python, Graphics card model etc.

@arthur-qiu
Copy link
Owner

Can you share your environment version for Preparing Dataset? Such as gcc, CUDA, torch, python, Graphics card model etc.

gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
NVIDIA-SMI 525.60.11 Driver Version: 525.60.11 CUDA Version: 12.0
Tesla V100
Python 3.7.15
torch 1.6.0 pypi_0 pypi
torchfile 0.1.0 pypi_0 pypi
torchvision 0.7.0 pypi_0 pypi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants