GithubHelp home page GithubHelp logo

takuya-takeuchi / openposedotnet Goto Github PK

View Code? Open in Web Editor NEW
66.0 8.0 24.0 14.63 MB

OpenPose wrapper written in C++ and C# for Windows

License: MIT License

Batchfile 0.02% CMake 0.71% C++ 12.57% C 4.31% C# 78.36% Shell 0.60% PowerShell 3.43%
dotnet windows openpose machine-learning human-pose-estimation

openposedotnet's Introduction

Alt text OpenPose.Net GitHub license

OpenPose wrapper written in C++ and C# for Windows
OpenPoseDotNet is .NET Standard library. It could work on Mac and Linux.

⚠️ Warning

OpenPoseDotNet adopts MIT license but OpenPose doesn't. OpenPose adopts other license and it allows to use for only ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH.
I never guarantee that the license issue will not occur by using OpenPoseDotNet.

Package

Package NuGet
OpenPoseDotNet NuGet version

Quick Start

1. Build

You can sepcify Visual Studio vesion and CUDA version.

> 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_win_desktop_<cpu/cuda>_x64<Debug/Release>.

2. Try Tutorial

> cd examples\TutorialApiCpp\01_BodyFromImageDefault
> SymlinkBinary.bat <Debug/Release> build_win_desktop_<cpu/cuda>_x64
> dotnet run -c Release  -i "examples\media\COCO_val2014_000000000192.jpg"

💡 NOTE

Currently, Windows prebuild binary is not available.

Dependencies Libraries and Products

License: The 3-clause BSD License

Author: Google

Principal Use: The commandline flags processing for OpenPose and OpenPoseDotNet.

License: ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY

Author: Carnegie Mellon University Perceptual Computing Lab

Principal Use: A toolkit for Real-time multi-person keypoint detection library for body, face, hands, and foot estimation. Main goal of OpenPoseDotNet is what wraps OpenPose by C#.

License: MS-.NET-Library-JS License

Author: Microsoft

Principal Use: Command-line parsing for example application

License: The 3-clause BSD License

Author: Intel Corporation, Willow Garage, Itseez

Principal Use: OpenPose and OpenPoseDotNet uses to read and show image data.

openposedotnet's People

Contributors

takuya-takeuchi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openposedotnet's Issues

Hi How to use the Nuget?

Hello,I want to ask for instructions for how to use the openpose API,are there some suggestions or instrutions?

Unable to load DLL 'OpenPoseDotNetNative'

Hi takuya-takeuchi,

I have been able to build and run the original OpenPose C++ on my new laptop. I have since been trying to get the OpenPoseDotNet to work. I have taken some code from one of the examples, built it, but when I run it I get the dreaded "Unable to load DLL" or one if its dependencies. I located a "Dependencies" tool and loaded the DLL into it. Here's the link for the tool https://lucasg.github.io/Dependencies/ The old depends.exe does not work. So I'm seeing some DLL's that I don't have on my system... 'api-ms-win-core-wow64-11-1-1.dll'...and others. Since I've been communicating with you, I've been seeing this problem, but thought I was not building correctly.

My research indicates that these DLL's have been eliminated in Windows 10, but I don't understand why it builds! I'm still researching.

I assume you are using Windows 10 1909 release? All my systems are on this release.

image

The dependencies view...
image

Thanks,
Bruce

c# windows formで運用

Hello
お邪魔しました!
少し日本語ができますので、
日本語で質問させていただきます!
私はプログラム開発はまだ上手くないです。
何回もOpenPoseDotNetを試していましたが、
使い方は全然が分かりません!
c# windows formでOpenPoseDotNetを使いたいですので、手順書が有りますでしょうか?
詳細な使い方を教えて頂ければ幸いです!
お手数おかけします

Usage in macOS for Xamarin

Hi takuya-takeuchi,

I'm new to .net platform, and I'm currently using Xamarin (from visual studio for Mac) to develop apps for iOS and Android. Since it is a .net package, I just assumed that it will also work in Xamarin. So here are my questions:

  1. Can we build the project with CPU only? Is <cpu/cuda> choosing either cpu or cuda?
  2. Can you please explain the parameters used in the build command
    Build.ps1 <Debug/Release> <cpu/cuda> 64 desktop <2015/2017/2019> <92/100/101>
    What does desktop <2015/2017/2019> <92/100/101> mean?

Thank you very much!

CUDA 11 Support

Hi, thanks for this great lib! Are you planning to upgrade to CUDA 11 support?

Can not compile library on 32 bit windows

I get this from cmake before it freezes, giving no errors.
My command line is
".\Build.ps1 Debug cpu 32 desktop 2019 100"

The command line from you build powershell code says
" cmake -G Visual Studio 16 2019 -A Win32 -D CMAKE_BUILD_TYPE=Debug
-D USE_CUDA:BOOL=OFF"

Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28806 for x86

Copyright (C) Microsoft Corporation. All rights reserved.

CMakeCXXCompilerABI.cpp

cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_d4f12.dir\Debug\" /Fd"cmTC_d4f12.dir\Debug\vc142.pdb" /Gd /TP /analyze- /errorReport:queue "C:\Program Files\CMake\share\cmake-3.18\Modules\CMakeCXXCompilerABI.cpp"

cmTC_d4f12.vcxproj -> C:\Users\mikes\source\repos\corepose\OpenPoseDotNet\src\OpenPoseDotNet.Native\build_win_desktop_cpu_x86_d\openpose\CMakeFiles\CMakeTmp\Debug\cmTC_d4f12.exe

System.AccessViolationException throw if captures hand

Report from @bruce987

@takuya-takeuchi

I was revisiting your site to see if there was any new issues and came across this. I've been working with OpenPoseDotNet for awhile now. I'm capturing live video feed of the hand and trying to determine direction. Anyway, if I move my hand into the webcam to adjust it I get an access violation every time. I have a secondary camera on a tripod. I'm just reporting this issue to let you know it does happen on a regular basis.

image

Originally posted by @bruce987 in #5 (comment)

Can't Compile OpenPoseDotNet.Native

Dears,
I just got the latest version of the code and couldn't build OpenPoseDotNet.Native. I was able to build OpenPose.dll successfully.
OS: Windows 10 64-bit
VS: 2017
GPU: nVidea GTX 1050 Ti
image

Could anyone support please?

I also tried to use the OpenPoseDotNet.Native dll in a test project using the Nuget package (and i copy all the required dependency dlls in the Bin folder) but i always get following error:

System.DllNotFoundException: 'Unable to load DLL 'OpenPoseDotNetNative': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)'

How to Play Video?

I am trying to work with a video (video.avi that is included in the OpenPose project source) in the sample project 1_CustomPostProcessing but i get the following error:

at OpenPoseDotNet.NativeMethods.op_wrapper_exec(DataType dataType, IntPtr wrapper)
at OpenPoseDotNet.Wrapper`1.Exec() in E:\Work\OpenPoseDotNet\src\OpenPoseDotNet\Wrapper\Wrapper.cs:line 139
at CustomPostProcessing.Program.TutorialAddModule1() in E:\Work\OpenPoseDotNet\examples\TutorialAddModule\1_CustomPostProcessing\Program.cs:line 192

FYI: Web Camera & Image file are working fine. and I just changed added the following line of code:
Flags.Video = @"E:\Work\Videos\video.avi";
I have copied all required DLLs & the OpenPoseDemo.exe (that is included in the OpenPose) is working with the same video without issues.

OS: Windows 10 64 bit
CUDA: 9.2

Not work with RTX 2080ti GPU

HI,

I thank you for your effort on this. This wrapper is very useful.

By the way, I've recently upgraded my GPU to Geforce RTX 2080Ti, but I couldn't run the library, which worked fine on the previous graphic card. I found that this issue was resolved in the lastest OpenPose version.

Do you have any plan to update the library to use the latest OpenPose? Thank you in advance.

Nuget Package Issue

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.

Question about 1_ThreadUserProcessingFunction

Hi,
Am I supposed to implement image processing (draw keypoints skeleton) in WUserClass? The program just shows plain video stream from camera. I also cant find any code that implements and uses opwrapper in this tutorial.
I hope to hear back from you soon.
Thank you,
Dung Tran

Build Error Occurs when use cuda option

First, thank you for your great work.
I got an ERROR when I used this command to build:
pwsh Build.ps1 Debug cuda 64 desktop 2019 101

Error Msg:
Build OpenPoseDotNet.Native
Start Build openpose
Error: '' does not found
End Build openpose

please tell me how can I do, thank you very much,
Windows 10 x64
VS2019
CUDA version : 11.1.96

Issues with Examples

Hi takuya-takeuchi,

I've been messing with this for a few weeks now. Today I started fresh and used your original steps to build it. One of the problems I see is in the steps "Try Tutorial". The first one "01_BodyFromImageDefault" shows these steps...

cd <OpenPoseDotNet_dir>\examples\TutorialApiCpp\01_BodyFromImageDefault
SymlinkBinary.bat <Debug/Release> build_win_desktop_<cpu/cuda>_x64
dotnet run -c Release -i "examples\media\COCO_val2014_000000000192.jpg"

All of the others show the following steps...

cd <OpenPoseDotNet_dir>\examples\TutorialApiCpp\08_HeatmapsFromImage
SymlinkBinary.bat <Debug/Release>
dotnet run -c Release -i "examples\media\COCO_val2014_000000000294.jpg"

Noticed that the SymlinkBinary.bat file leaves out the second argument. After fixing the error in execution, I tried running some of the examples. The first one works! "01_BodyFromImageDefault"
All of the other examples generate this error...
image

Can't compile library

Hi i'm trying to include openpose in my project in C# and i found your helpful OpenPoseDotNet wrapper project.
I dowloaded the repository and tried to follow compile instructions but i receive an error that says: "Error: This plaform is not support".
I don't understand why i receive this error and how i can resolve the problem in order to use your library.
My software working set is: Windows 10 OS and i use VS2017 with Cuda version 10.0. My hardware is NVIDIA GTX950M and CPU is i7 6700HQ.

Following your instruction i wrote the command < Build.ps1 Debug cuda 64 desktop 2017 100 > but i get the error.
error
I also tried different version of Cuda such as 90 101.
Do you have any suggestion?

Thanks in advance!

Issues compiling and running

I've tried following the instructions to build and run the example.

The build powershell fails.
.\Build.ps1 Release cuda 64 desktop 2019 101
Unable to find type [Config].
_At C:\Users\geoff\source\repos\OpenPoseDotNet\src\OpenPoseDotNet.Native\Build.ps1:60 char:11

  • $Config = [Config]::new($OpenPoseDotNetRoot, $Configuration, $Target, ...
  •       ~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Config:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Build : The term 'Build' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\geoff\source\repos\OpenPoseDotNet\src\OpenPoseDotNet.Native\Build.ps1:61 char:1

  • Build -Config $Config
  •   + CategoryInfo          : ObjectNotFound: (Build:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException_
    
    

But, the 2019 IDE builds the solution without issue Then, I try running the example instruction and get some warnings:
(01_BodyFromImageDefault)
dotnet run -c Release -i "C:\Users\geoff\source\repos\openpose-master\examples\media\COCO_val2014_000000000192.jpg"

C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\Users\geoff\source\repos\OpenPoseDotNet\examples\TutorialApiCpp\01_BodyFromImageDefault\01_BodyFromImageDefault.csproj]
C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\Users\geoff\source\repos\OpenPoseDotNet\examples\TutorialApiCpp\01_BodyFromImageDefault\01_BodyFromImageDefault.csproj]
C:\Program Files\dotnet\sdk\5.0.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp2.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\Users\geoff\source\repos\OpenPoseDotNet\examples\TutorialApiCpp\01_BodyFromImageDefault\01_BodyFromImageDefault.csproj]

Then, nothing happens after the warnings. The program exits with error code 0 and no warnings if I debug it from the IDE. No picture is shown.

Problems compiling the project.

First of all, thanks a lot for trying to bring OpenPose to .NET!

I've been trying to use it without success....

I cloned the repository and tried to follow compile instructions: but I noticed that OpenPose directory is empty (it seems it's not pulling the external dependency)

So I did it manually... but then, it gives a lot of errors because either I didn't pick the right version of OpenPose (I downloaded the latest one)... or because I have VisualStudio 2019 installed, and I think the batch files expect 2015.

OpenPose already provides precomputed binaries, so, instead of requiring to compile the sources, could it be possible to use OpenPoseDotNet with, for example, the precompiled binaries of OpenPose v1.5.1 ??

Thanks in advance!

Lib usage

Hello, one question about lib usage. I would like to use c# Bitmap (or raw image data array) as the way to communicate with your openpose wrapper (right now Mat is used but it is not clear how to convert Bitmat to Mat and vice versa). Do you maybe have an example code in c# showing how to do that?

OpenPoseDotNet not playing well with OpenCvSharp4

Hi Takuya,

I have an application that uses OpenCvSharp4. I use it for its camera video capture. I'm using your OpenPoseDotNet to essential do the same thing as the OpenPose demo does... capture video and outline person(s).

The problem is OpenCvSharp4 generates a OpenCvSharp.Mat object. The OpenPoseDotNet is looking for an OpenPoseDotNet.Mat object. I've attempted to convert the OpenCvSharp.Mat by converting it to a bitmap then back to an OpenPoseDotNet.Mat. The call OpenPoseDotNet. OP_OP2CVCONSTMAT in the Display method (taken from the example), supposedly creates a OpenPoseDotNetMat.Mat. To use the Cv2.ImShow method requires me to convert the OpenPoseDotNetMat.Mat back to a OpenCvSharp.Mat. It fails trying to call the ToBitmap method.

I tried to locate a VideoCapture method in the OpenPoseDotNet library, but couldn't locate it. I would much rather work with a single Mat object. If you could point me to the class that handles VideoCapture with maybe an example that would be most helpful.

Thanks,
Bruce

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.