GoGoDuck912 / Self-Correction-Human-Parsing

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

Which torch and torchvision version are appropriate? #90

Open ninellekam opened 5 months ago

ninellekam commented 5 months ago

I can't do nothing, awlays some kind of problems about inplace_abn compiling. Which torch and torchvision versions are needed here, please, could you help?

springbayy commented 5 months ago

The versions are in the .yaml - file.

I suspect you get the error because you use a newer version of pytorch. However, there is a problem I can't get around:

I use a nivida A100- Running the environment as is in the yaml as provided does not work on the sm80-architecture. Versions of pytorch / CUDA are too old to run on the A100 and need to be upgraded. But installing the newest versions of everything gives me the following error:

RuntimeError: Error building extension 'inplace_abn': [1/3] /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output inplace_abn_cuda_half.cuda.o.d -DTORCH_EXTENSION_NAME=inplace_abn -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /outfit_anyone/.conda/lib/python3.8/site-packages/torch/include -isystem /outfit_anyone/.conda/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /outfit_anyone/.conda/lib/python3.8/site-packages/torch/include/TH -isystem /outfit_anyone/.conda/lib/python3.8/site-packages/torch/include/THC -isystem /outfit_anyone/.conda/include/python3.8 -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' --expt-extended-lambda -std=c++17 -c /outfit_anyone/segmentation/Self-Correction-Human-Parsing/modules/src/inplace_abn_cuda_half.cu -o inplace_abn_cuda_half.cuda.o FAILED: inplace_abn_cuda_half.cuda.o

...etc... ninja: build stopped: subcommand failed.

I have tried to find intermediate versions of pytorch that may support the GPU as well as the rest of the environment but without success.

To my knowledge this is the best and most accessible pre-trained model on clothing that gives nice labels on the different parts. One could train a newer model on the same dataset I suppose, but I'd rather not.

Would be very appreciated if the github could be updated to support the newer versions of GPUs, otherwise the model is obsolete :)