FORTH-ModelBasedTracker / PyOpenPose

Python bindings for the Openpose library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regarding Windows usage.

srp-31 opened this issue · comments

Hi

Firstly thanks for this really useful wrapper. I am unfortunately not able to use it. Could you please let me know which version of boost you used. Building boost on my pc does not lead to 'boost_python' but leads to 'boost_python36-vc140-mt-gd-x64-1_67'. Updating the cmake file(changin the name to boost_python36-vc140-mt-gd-x64-1_67 from boost_python) leads to proper building. But when I try to run the solution form visual studio I get a linker error that the library cannot be opened. So I was wondering if this could be easily elimnated by mirrioring the exact setting used by you. I am using windows 10. I do think that source of linker error is not due to mismatched boost versions but I want the quickest solution to get the demo running.

Thanks in advance.

If the binaries are built and linked properly you only need to make sure that all the relative libraries are in your PATH or in the directory of the PyOpenPose.dll. That said I have not tested with boost 3.6 so there could be other issues.

Hi Padeler
Thank you for the reply.I will retry again keepingthe suggestion in mind(though I already checked that the libraries are available). I will post the exact error which could maybe ring a bell in your memory if you had sometime faced the same issue. Else I will try find a solution for my issue and post the update here.

Hi,

I got this issue fixed and made the following notes. Like you suggested it was relating the linking of libraries. Since it could help others using the wrapper and facing similar issues I wanted to document it here(even though some of them might be pretty obvioius for some users :) ) :

  1. Firstly I am using the wrapper in Windows so the dll generated could be directly used. The .so file is not applicable in this case.

  2. The recent boost builds lead to boost_system-vc140-mt-gd-x64-1_67 and boost_python36-vc140-mt-x64-1_67. The cmake was able to find them after I edited the cmake file. CMakeLists.txt
    Hence the Visual studio solution was builts. However the visual studio solution did not build with an error: LNK1104 cannot open file 'boost_pythonPY_MAJOR_VERSIONPY_MINOR_VERSION-vc140-mt-gd-x64-1_67.lib'. The fix to this is defining the preprocessor BOOST_ALL_NO_LIB. Boost has an autolink feautre but somehow it was not working in my case.

  3. After this I was able to build the PyOpenPose. But when I iimported it in my python it wasnt working. I am using Pycharm and I added the dll paths of openpose and its dependent dlls to the python search paths and it still wasnt working.

  4. Hence I added the paths of openpose dll and all its dependent dlls(openpose\3rdparty\windows\caffe\bin,openpose\3rdparty\opencv\x64\vc14\bin,openpose\build_windows\x64\Release) to system path in environment variables. This got the wrapper working for me.

Thanks again for the wrapper.

Hi,

I got this issue fixed and made the following notes. Like you suggested it was relating the linking of libraries. Since it could help others using the wrapper and facing similar issues I wanted to document it here(even though some of them might be pretty obvioius for some users :) ) :

  1. Firstly I am using the wrapper in Windows so the dll generated could be directly used. The .so file is not applicable in this case.
  2. The recent boost builds lead to boost_system-vc140-mt-gd-x64-1_67 and boost_python36-vc140-mt-x64-1_67. The cmake was able to find them after I edited the cmake file. CMakeLists.txt
    Hence the Visual studio solution was builts. However the visual studio solution did not build with an error: LNK1104 cannot open file 'boost_pythonPY_MAJOR_VERSIONPY_MINOR_VERSION-vc140-mt-gd-x64-1_67.lib'. The fix to this is defining the preprocessor BOOST_ALL_NO_LIB. Boost has an autolink feautre but somehow it was not working in my case.
  3. After this I was able to build the PyOpenPose. But when I iimported it in my python it wasnt working. I am using Pycharm and I added the dll paths of openpose and its dependent dlls to the python search paths and it still wasnt working.
  4. Hence I added the paths of openpose dll and all its dependent dlls(openpose\3rdparty\windows\caffe\bin,openpose\3rdparty\opencv\x64\vc14\bin,openpose\build_windows\x64\Release) to system path in environment variables. This got the wrapper working for me.

Thanks again for the wrapper.

Hello, thanks for your sharing. Following your steps I have built PyOpenPose successfully. However, when I use "import PyOpenPose" in Python, I got an error, which is "ImportError: DLL load failed: can't find module". I have added the environment variables you said surely.
Do you have some ideas about this? Thanks for your contribution again!

Edit: After this I searched the files compiled and I found that there is PyOpenPose.lib in install folder instead of PyOpenPose.dll. Then I checked the VS compiling options, and actually I have selected compiled to dll.