GoGoDuck912 / Self-Correction-Human-Parsing

An out-of-box human parsing representation extractor.
MIT License
1.05k stars 236 forks source link

Problems with running simple_extractor.py #58

Open victorhqx opened 3 years ago

victorhqx commented 3 years ago

What is the problem?

python simple_extractor.py --model-restore exp-schp-201908261155-lip.pth  --input-dir input --output-dir output
Traceback (most recent call last):
  File "D:\miniconda3\envs\schp\lib\site-packages\torch\utils\cpp_extension.py", line 1418, in _run_ninja_build
    subprocess.run(
  File "D:\miniconda3\envs\schp\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "simple_extractor.py", line 24, in <module>
    import networks
  File "D:\Self-Correction-Human-Parsing\networks\__init__.py", line 3, in <module>
    from networks.AugmentCE2P import resnet101
  File "D:\Self-Correction-Human-Parsing\networks\AugmentCE2P.py", line 21, in <module>
    from modules import InPlaceABNSync
  File "D:\Self-Correction-Human-Parsing\modules\__init__.py", line 1, in <module>
    from .bn import ABN, InPlaceABN, InPlaceABNSync
  File "D:\Self-Correction-Human-Parsing\modules\bn.py", line 10, in <module>
    from .functions import *
  File "D:\Self-Correction-Human-Parsing\modules\functions.py", line 10, in <module>
    _backend = load(name="inplace_abn",
  File "D:\miniconda3\envs\schp\lib\site-packages\torch\utils\cpp_extension.py", line 911, in load
    return _jit_compile(
  File "D:\miniconda3\envs\schp\lib\site-packages\torch\utils\cpp_extension.py", line 1100, in _jit_compile
    _write_ninja_file_and_build_library(
  File "D:\miniconda3\envs\schp\lib\site-packages\torch\utils\cpp_extension.py", line 1206, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "D:\miniconda3\envs\schp\lib\site-packages\torch\utils\cpp_extension.py", line 1436, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error building extension 'inplace_abn': [1/3] cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\miniconda3\envs\schp\lib\site-packages\torch\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\TH -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -ID:\miniconda3\envs\schp\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /EHsc -O3 -c D:\Self-Correction-Human-Parsing\modules\src\inplace_abn.cpp /Foinplace_abn.o
FAILED: inplace_abn.o
cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\miniconda3\envs\schp\lib\site-packages\torch\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\TH -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -ID:\miniconda3\envs\schp\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /EHsc -O3 -c D:\Self-Correction-Human-Parsing\modules\src\inplace_abn.cpp /Foinplace_abn.o
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.28.29914 版
版权所有(C) Microsoft Corporation。保留所有权利。

cl: 命令行 warning D9002 :忽略未知选项“-O3”
注意: 包含文件:  D:\miniconda3\envs\schp\lib\site-packages\torch\include\torch/extension.h
注意: 包含文件:   D:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include\torch/all.h
注意: 包含文件:    D:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include\torch/cuda.h
注意: 包含文件:     D:\miniconda3\envs\schp\lib\site-packages\torch\include\torch/csrc/WindowsTorchApiMacro.h
注意: 包含文件:      D:\miniconda3\envs\schp\lib\site-packages\torch\include\c10/macros/Export.h
注意: 包含文件:       D:\miniconda3\envs\schp\lib\site-packages\torch\include\c10/macros/cmake_macros.h
D:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include\torch/cuda.h(5): fatal error C1083: 无法打开包括文件: “cstddef”: No such file or directory
[2/3] cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\miniconda3\envs\schp\lib\site-packages\torch\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\TH -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -ID:\miniconda3\envs\schp\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /EHsc -O3 -c D:\Self-Correction-Human-Parsing\modules\src\inplace_abn_cpu.cpp /Foinplace_abn_cpu.o
FAILED: inplace_abn_cpu.o
cl /showIncludes -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -ID:\miniconda3\envs\schp\lib\site-packages\torch\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\torch\csrc\api\include -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\TH -ID:\miniconda3\envs\schp\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include" -ID:\miniconda3\envs\schp\Include -D_GLIBCXX_USE_CXX11_ABI=0 /MD /wd4819 /EHsc -O3 -c D:\Self-Correction-Human-Parsing\modules\src\inplace_abn_cpu.cpp /Foinplace_abn_cpu.o
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.28.29914 版
版权所有(C) Microsoft Corporation。保留所有权利。

cl: 命令行 warning D9002 :忽略未知选项“-O3”
注意: 包含文件:  D:\miniconda3\envs\schp\lib\site-packages\torch\include\ATen/ATen.h
注意: 包含文件:   D:\miniconda3\envs\schp\lib\site-packages\torch\include\c10/core/Allocator.h
D:\miniconda3\envs\schp\lib\site-packages\torch\include\c10/core/Allocator.h(3): fatal error C1083: 无法打开包括文件: “stddef.h”: No such file or directory
ninja: build stopped: subcommand failed.
xinzi2018 commented 3 years ago

i have the same question.

mumuner commented 3 years ago

Hi, have you solve this problem? If fixed, can you help me how to solve this problem?

Mohamedballouch commented 2 years ago

hi any updates on this one ? i have same issue !!

ZiAngGu1 commented 1 year ago

Hi I have the same issue

Velpro-collab commented 1 year ago

Hi I have the same issue

Obozha commented 1 year ago

Hi I have the same issue