Closed bruce987 closed 4 years ago
@bruce987 NuGet package does not contain openpose.dll and its dependencies. You have to build and copy them to app directory.
Quick start show how to build and deploy. https://github.com/takuya-takeuchi/OpenPoseDotNet#quick-start
Hi Takuya,
Ok I will give that a try. Are there any plans to put out a nuget package that has all the dependencies? It would be nice.
Thanks, Bruce
Another suggestion would be to provide different build packages for VS2015 thru VS2019. I don't have VS2015 so I will have to modify the bat file and hopefully don's screw it up then have to bother you again.
Well I found 2 BuildWindowsVS2015.bat files. The first one was at the head of the distribution and the second one was in src\OpenPoseDotNet.Native folder. I created 2 new BuildWindowsVS2019.bat files in each locations. The first at the top folder was looking for openpose folder. I then tried the 2nd one and it wants to work, but I get the following errors...
@bruce987
Ok I will give that a try. Are there any plans to put out a nuget package that has all the dependencies? It would be nice.
No. openpose is not MIT, BSD or LGPL. license does not allow us to use on commercial usage. It means that we should not distribute/publish copy of binaries. I can not take any legal risk.
BTW, master branch is a bit old. You should use develop branch.
And did you do git submodule update --init --recursive
?
cd OpenPoseDotNet
git checkout develop
# just now, I update fix of CMakeLists.txt for OpenPoseDotNet.Native
git pull origin develop
git submodule update --init --recursive
# your modified script
BuildWindowsVS2019.bat
cd src\OpenPoseDotNet.Native
# your modified script
BuildWindowsVS2019.bat
I tried building by VS2019 and it was successful.
I realized that I had been downloading the zip and not cloning. So the first command failed. I then cloned and got everything to work except the following error occurred due to CUDA configuration.
At the time I had CUDA 8.0, 10.0 and 10.1 installed. When I looked at the host_config.h for both 10.0 and 10.1 they were different when checking for Visual Studio versions. 10.1 checks for 2019 while 10.0 stops at 2017. I went ahead and uninstalled all references to 10.0, then removed the OpenPoseDotNet and cloned again. This time it found 10.1 and it seems to be working now.
Your commands provided show that I should cd src\OpenPoseDotNet.Native, then it implies that I execute the BuildWindowsVS2019.bat, but it does not exist in the Native folder. I see for 2015, the build scripts are slightly different.
I modified the BuildWindowsVS2019.bat to the same as VS2015, excerpt of course the cmake command. When I run it, I get the following error:
D:\Projects\OpenPoseDotNet\src\OpenPoseDotNet.Native>BuildWindowsVS2019.bat Debug CMake Error: The source directory "D:/Projects/OpenPoseDotNet/src/OpenPoseDotNet.Native/openpose" does not appear to contain CMakeLists.txt.
I copies the CMakeLists.txt to openpose folder. Ran the BuildWindowsVS2019.bat file. Now I get the following error:
@bruce987 You should not copy CMakeList.txt to openpose dir. Could you show me your BuildWindowsVS2019.bat?
Here's the build script in the top level folder:
I would like to add that I'm working on two different platforms. At work I have a desktop that supports the latest CUDA - 10.1. My other platform is an older DELL XPS that only supports CUDA 9.1. The problems listed above did occur on my work desktop.
Now the problem I'm having on my laptop is the CUDA. It doesn't support VS2019. Maybe you could update your build procedures for VS2017. I really don't want to download/install VS2015. Would is be possible to include a BuildWindowsVS2017.bat also?
@bruce987 Ok, I will upload new powershell core build scripts. It supports to specify vs version. Windows batch is too legacy. Maybe it will get to be complete on this weekend.
I encountered too many problems with my laptop:
Next I tried my home desktop:
I plan to do the same thing with my work desktop.
The only thing I've noticed is if the Build script fails, then I apply a fix, the script continues to fail. I have to removed the folder and clone again, then it will work.
@bruce987 I updated develop and master branch. You can build windows binary by using visual studio and cuda version you prefer.
> cd <OpenPoseDotNet_dir>
> git submodule update --init --recursive
> cd src\OpenPoseDotNet.Native
> pwsh Build.ps1 <Debug/Release> <cpu/cuda> 64 desktop <2015/2017/2019> <92/100/101>
After build, you should see artifacts in src\OpenPoseDotNet.Native\build_windesktop<cpu/cuda>_x64<Debug/Release>.
You need not to reinstall CUDA and visual studio.
P.S. Please close this issue if your issue is resolved. Thank you.
I tried to build it on my laptop. I have Cuda 9.1 and VS2017 installed.
I get the following error:
Once I get it built, what do I do? Copy DLL's? Copy where?
Thanks
I also logged into my work pc and cloned again and them followed your steps, except this time I choose 2019 and 101. I wasn't sure what the 92,100,101 referred to, it wasn't obvious at first. I looked at the BuildUtils.ps1 file and noticed that it refers to the Cuda version. Well on my Work and Home PC's I have 10.2, so I guess you need to update to include 102. I did update the BuildUtils.ps1 and added the necessary values and did build.
I did get it to build on my home PC last Friday, but that was using your original build steps and not the new one that uses powershell. Of course I didn't know what files to move, so I took a guess and moved the DLL's in openpose directory, but I still get the same error, DLL not found.
@takuya-takeuchi
Here's the latest on trying to build on my laptop. I realized that CUDA 9.1 was not supported by cuDNN, so I uninstalled it and installed CUDA 9.0. Cloned OpenPoseDotNet and followed the new instructions you provided. It almost builds, but then gets the following error:
Thanks, Bruce
@takuya-takeuchi
Have you given up on me?
-Bruce
@bruce987 no, i will work on this issue. but i'm very busy now.
thank you for your cooperation.
@takuya-takeuchi
Thanks for helping out. I've pretty much have come to the conclusion that my DELL XPS laptop, which is now going on 7 years, needs to be replaced. I'm in the process of discussing this my company president about getting a new laptop. When I do I will close this issue.
@takuya-takeuchi
FYI,
I got a new laptop... HP Omen. I installed CUDA 10.(0,1,2) and VS2019. I cloned OpenPose and attempted to build it; Note this is not your project. When I tried to build it I noticed an warning that said only VS 2013 through VS2017 was supported. So I installed VS2017 and it built correctly and works. I then did the same with OpenPoseDotNet; it also built.
Hi Takuya,
I installed the OpenPoseDotNet package, version 1.4.0.20190117, I then took some example code and put it in my own application to understand the API. The application is .NET Core3.1 console application, I'm using VS2019 Enterprise.
When I run my application I get "Unable to load OpenPoseDotNetNative". I found the DLL in
C:\Users\bruce.nuget\packages\openposedotnet\1.4.0.20190117\runtimes\win-x64\native
I'm not sure how your library is resolving the location of the native library. After building my application I see the following folder now has the DLL in it...
C:\Projects\ML.Net\SkeletonJoints\bin\x64\Debug\netcoreapp3.1\runtimes\win-x64\native
My build location output is...
C:\Projects\ML.Net\SkeletonJoints\bin\x64\Debug\netcoreapp3.1
By the way, I noticed that you have builds for .NET Core 3.0. Core 3.0 is no longer supported by Microsoft.