CMU-Perceptual-Computing-Lab / openpose

OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
https://cmu-perceptual-computing-lab.github.io/openpose
Other
31.26k stars 7.87k forks source link

Caffe2 support (running on cross platform such as iOS) #27

Closed KleinYuan closed 7 years ago

KleinYuan commented 7 years ago

Issue summary

Firstly, congratulations on your great job! I managed to run it on my GeForce 980 ti card and it's quite smooth (like 7fps).

I am working on a Caffe2-iOS project and thinking it will be super awesome if we can come up with a wrapper or Cocoa Pod wrapping Caffe2 models to run it on iOS.

However, it seems that you guys have a dependencies on multiple caffe models, which got it not that straightforward.

Do you guys have any plan to get a Caffe2 support (I would like to have a try but it seems lots of work) ?

And also btw is this project running on CUDA a requirement or just because it's slow on CPU ?

Type of issue

Your system configuration

Operating system (lsb_release -a on Ubuntu): iOS CUDA version (cat /usr/local/cuda/version.txt in most cases): X cuDNN version: X GPU model (nvidia-smi): X Compiler (gcc --version on Ubuntu): X

gineshidalgo99 commented 7 years ago

CUDA is a requirement, it was really slow on CPU so we ended up not finishing the CPU code so far. What do you mean by dependencies on multiple caffe models?

KleinYuan commented 7 years ago

@gineshidalgo99 ahhh I see that now. dependencies on multiple caffe models means that it seems both COCO model and MPI model are required to compile it, like this downloaded models

in the code: Here and Here

gineshidalgo99 commented 7 years ago

OK sorry, I got confused when you said multiple because right now only 2 are available (COCO/MPI). Forget hands and face so far, they are not available yet (we are working on them).

We are interested in supporting also Caffe2, but I am not familiar with it yet. But I thought it would have by default some kind of tool to convert models from Caffe, is there any? If so, then it should be easy to convert the COCO-MPI models and relatively easy to create a basic wrapper for Caffe2 and run OpenPose on top of it as we are doing with Caffe.

KleinYuan commented 7 years ago

@gineshidalgo99 Thanks for the clarification and that's quite helpful since I didn't dig too deep into the src code.

Yeah, Caffe2 offers a translator to automate translating Caffe model to Caffe2 pb files. I did a bunch of tests and it works pretty good. I would like to give it a try to see whether it works with Caffe2.

Alright. Good chat. I think we can close this issue and looking forwards to you guys coming work. Good job!

gineshidalgo99 commented 7 years ago

Please @KleinYuan, let us know if you are able to compile it with Caffe2, or make a pull request as a new branch, so we can add it! Best