Openpose 安装问题解决
1. 环境
系统:Ubuntu 18.04.4 LTS
cuda: 10.0.326
cudnn: 7.6.0
2. 安装
参考:https://zhuanlan.zhihu.com/p/70106653
3. 问题与解决
3.1. 执行cmake ..的时候,caffe下载超时
手动下载caffe:
cd 3rdparty git clone git@github.com:CMU-Perceptual-Computing-Lab/caffe.git
3.2. 模型下载问题
手动下载各个模型:
(模型名字,模型下载链接,需要保存到的地方)
[pose_iter_584000.caffemodel](http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/body_25/pose_iter_584000.caffemodel) -> openpose/models/pose/body_25
[pose_iter_440000.caffemodel](http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/coco/pose_iter_440000.caffemodel) -> openpose/models/pose/coco/
[pose_iter_160000.caffemodel](http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/mpi/pose_iter_160000.caffemodel) -> openpose/models/pose/mpi/
[pose_iter_116000.caffemodel](http://posefs1.perception.cs.cmu.edu/OpenPose/models/face/pose_iter_116000.caffemodel) -> openpose/models/face/
[pose_iter_102000.caffemodel](http://posefs1.perception.cs.cmu.edu/OpenPose/models/hand/pose_iter_102000.caffemodel) -> openpose/models/hand/
4. 报错及解决
4.1. /usr/bin/ld: cannot find –lpthreads
编译的时候报错,查看log:
>...
>Determining if the function pthread_create exists in the pthreads failed with the following output:
>Change Dir: /home/kinth/mfq/openpose/build/caffe/src/openpose_lib-build/CMakeFiles/CMakeTmp
>
>Run Build Command:"/usr/bin/make" "cmTC_56f8f/fast"
>make[3]: Entering directory '/mnt/mfq/openpose/build/caffe/src/openpose_lib-build/CMakeFiles/CMakeTmp'
>/usr/bin/make -f CMakeFiles/cmTC_56f8f.dir/build.make CMakeFiles/cmTC_56f8f.dir/build
>make[4]: Entering directory '/mnt/mfq/openpose/build/caffe/src/openpose_lib-build/CMakeFiles/CMakeTmp'
>Building C object CMakeFiles/cmTC_56f8f.dir/CheckFunctionExists.c.o
>/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_56f8f.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
>Linking C executable cmTC_56f8f
>/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56f8f.dir/link.txt --verbose=1
>/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_56f8f.dir/CheckFunctionExists.c.o -o cmTC_56f8f -lpthreads
>/usr/bin/ld: cannot find -lpthreads
>collect2: error: ld returned 1 exit status
>CMakeFiles/cmTC_56f8f.dir/build.make:97: recipe for target 'cmTC_56f8f' failed
>make[4]: *** [cmTC_56f8f] Error 1
>...
解决:用apt 安装caffe,并使用cmake-gui 进行cmake,参考
http://qustkx.com/2019/08/21/openpose/#%E4%B8%83-%E5%AE%89%E8%A3%85cmake-gui
(完)