Daniil-Osokin / lightweight-human-pose-estimation-3d-demo.pytorch

Real-time 3D multi-person pose estimation demo in PyTorch. OpenVINO backend can be used for fast inference on CPU.
Apache License 2.0
656 stars 138 forks source link

Win 10 installation problem #5

Closed Angel113110 closed 4 years ago

Angel113110 commented 4 years ago

Hi, author. Thanks for supplying so wonderful code. I want to use it on my win 10 operation system. When I installed it, I met an error, like this:

-- Configuring incomplete, errors occurred! See also "D:/paper/human-pose-estimation/pose_extractor/build/tmp/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "setup.py", line 72, in cmdclass={'build_ext': CMakeBuild}) File "D:\Anaconda\lib\site-packages\setuptools__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "D:\Anaconda\lib\distutils\core.py", line 148, in setup dist.run_commands() File "D:\Anaconda\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "D:\Anaconda\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "D:\Anaconda\lib\site-packages\setuptools\command\build_ext.py", line 84, in run _build_ext.run(self) File "D:\Anaconda\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "D:\Anaconda\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "setup.py", line 63, in build_extensions subprocess.check_call(['cmake', ext.cmake_lists_dir] + cmake_args, cwd=tmp_dir) File "D:\Anaconda\lib\subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', 'D:\paper\human-pose-estimation\pose_extractor', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=D:\paper\human-pose-estimation\pose_extractor\build', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=D:\paper\human-pose-estimation\pose_extractor\build\tmp', '-DPYTHON_EXECUTABLE=D:\Anaconda\python.exe', '-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE', '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=D:\paper\human-pose-estimation\pose_extractor\build', '-DCMAKE_GENERATOR_PLATFORM=x64']' returned non-zero exit status 1.

Can you help me to solve it? Thanks!

Angel113110 commented 4 years ago

how to execute step 3 in win10?

Daniil-Osokin commented 4 years ago

Hi! This says, that error happened during cmake invocation, the real error should be above the line -- Configuring incomplete, errors occurred!. Will you post the full log?

Angel113110 commented 4 years ago

Hi, author. The first problem I have solved. I don't know how to do step 3 on win 10? Where to place build folder? Which and where the folder? Thanks !

Daniil-Osokin commented 4 years ago

Can you please post your solution? There is similar issue in #4. For the step 3 you should have build folder inside pose_esimator folder (this done automatically during running setup.py build_ext). After that, just update environmental variable PYTHONPATH, for windows type in command line:

set PYTHONPATH=pose_extractor\build;%PYTHONPATH%
Angel113110 commented 4 years ago

Hi, author I had build folder in pose_estimator. My solution is: edit a new variable in system environmental variable. But it didn't work. I tried your solution, too. Type above line in cmd. But it also didn't work.

Daniil-Osokin commented 4 years ago

Did you still have the same error above? Can't guess without real error.

Angel113110 commented 4 years ago

Sorry for not supplying error before, author. I still have this error. The error like this:

Traceback (most recent call last): File "demo.py", line 10, in from modules.parse_poses import parse_poses File "D:\pycharm\teacher_analyse\human-pose-estimation\modules\parse_poses.py", line 4, in from pose_extractor.src import extract_poses ImportError: DLL load failed: 找不到指定的模块。

I followed your instructions in readme.md. Step 1 and 2 with no error. But when do step 3, I met this error. Can you kindly tell me what I had done is wrong through my error? Thanks!

Angel113110 commented 4 years ago

My problem is in .py file. It seems cannot directly call cpp file and hpp file.

Daniil-Osokin commented 4 years ago

You should have from pose_extractor import extract_poses, instead of pose_extractor.src. Yes, python cannot call c++ code from source. So, first run python setup.py build_ext, it should make a build folder inside pose_estimator and make there pose_estimator.so. Then set PYTHONPATH and you are ready to run the demo.

Angel113110 commented 4 years ago

Hi, author I ran setup.py and I didn't make .so file in my pose_estimator folder. The problem is same.

Daniil-Osokin commented 4 years ago

pose_estimator.so should be in pose_estimator\build folder. And you should have from pose_extractor import extract_poses, instead of pose_extractor.src in modules/parse_poses.py.

Angel113110 commented 4 years ago

Hi, author I know all steps of instructions. But there is not a .so file in build folder. Below is my compile log in cmd. Is that right?

Compile log:

D:\TSBrowserDownloads\human-pose-estimation>python setup.py build_ext running build_ext -- Building for: Visual Studio 16 2019 -- The C compiler identification is MSVC 19.22.27905.0 -- The CXX compiler identification is MSVC 19.22.27905.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: D:/Anaconda/python.exe (found suitable version "3.7.3", minimum required is "3.5") -- Found PythonLibs: D:/Anaconda/libs/python37.lib (found suitable version "3.7.3", minimum required is "3.5") -- Found OpenCV: D:/opencv/opencv/build (found suitable version "4.1.2", minimum required is "4") -- Configuring done -- Generating done -- Build files have been written to: D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/build/tmp 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.2.37902+b5aaefc9f 版权所有(C) Microsoft Corporation。保留所有权利。

Checking Build System CMake does not need to re-run because D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/build/tmp/CMakeFiles /generate.stamp is up-to-date. Building Custom Rule D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/CMakeLists.txt CMake does not need to re-run because D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/build/tmp/CMakeFiles /generate.stamp is up-to-date. wrapper.cpp extract_poses.cpp human_pose.cpp peak.cpp 正在生成代码... Auto build dll exports 正在创建库 D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/build/tmp/pose_extractor.lib 和对象 D:/TSBrowserDownl oads/human-pose-estimation/pose_extractor/build/tmp/pose_extractor.exp pose_extractor.vcxproj -> D:\TSBrowserDownloads\human-pose-estimation\pose_extractor\build\pose_extractor.pyd Building Custom Rule D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/CMakeLists.txt CMake does not need to re-run because D:/TSBrowserDownloads/human-pose-estimation/pose_extractor/build/tmp/CMakeFiles /generate.stamp is up-to-date.

Angel113110 commented 4 years ago

I use python which intergrated in anaconda. Actually, there is no parameter named pythonpath in variable environment. So, in my situation, how to install?

Angel113110 commented 4 years ago

I use msvc in vs 2019.

Daniil-Osokin commented 4 years ago

I mean .pyd library suffix. Set environmental variable PYTHONPATH, type in command line:

set PYTHONPATH=pose_extractor\build;%PYTHONPATH%

Then try in python:

import pose_extractor
dir(pose_extractor)

it should list extract_poses, if not, then something went wrong.

Angel113110 commented 4 years ago

Hi, author I have tried everything I can do to solve this problem. I also followed your instructions above. But, it still had ImportError: DLL load failed: 找不到指定的模块.

Daniil-Osokin commented 4 years ago

Don't know how to help. Updated the code, now it can run without c++ module. Check it out!

Daniil-Osokin commented 4 years ago

Hope, it helped.

Angel113110 commented 4 years ago

Now, it can work! Thanks!

Emnolope commented 4 years ago

I have the exact same error. How can I get it to work without c++ module?

Daniil-Osokin commented 4 years ago

Just run it. It will use pure python implementation automatically.

james-CHIH-WEI commented 3 years ago

Does anyone know this error? ,Thanks My OS:Windows 10 I followed the instructions of Github,and I get file at <pose_extractor\build\pose_extractor.pyd>, but when I executed it, I encountered:

Cannot load fast pose extraction, switched to legacy slow implementation.

Then I print out the wrong paragraph, I get: from pose_extractor import extract_poses ImportError: DLL load failed: 找不到指定的模組。