OpenPose的安装
来源:互联网 发布:无法连入emule网络 编辑:程序博客网 时间:2024/06/01 09:13
从网上看到了OpenPose的介绍,感觉是好东西,虽然目前硬件不满足其要求,不能验证。但此次先把安装过程翻译了,以备后用。
OpenPose的安装:
操作系统支持
- Ubuntu 14 and 16.
- Windows 8 and 10.
- Nvidia Jetson TX2,安装指南参见doc/installation_jetson_tx2.md.
- OpenPose也已经被用到Windows 7,Mac, CentOS,及Nvidia Jetson (TK1 and TX1)嵌入式系统上.然而,我们目前不正式支持它们.
硬件要求
- NVIDIA显卡,至少可用1.6 GB (Ubuntu上用命令nvidia-smi检测可用GPU内存).
- 至少2 GB内存.
- 推荐cuDNN及至少一个8核的CPU.
注意:这些需求认为是缺省配置(如--net_resolution "656x368" andscale_number 1).你可能需要更多 (with a greater netresolution and/or number of scales)或更少的资源 (with smaller netresolution and/or using the MPI and MPI_4 models).
下载更新资源库
第一步是下载OpenPose库.它可能被放到windows和Ubuntu终端的GitHub Desktop:
git clonehttps://github.com/CMU-Perceptual-Computing-Lab/openpose
OpenPose能容易被更新,通过点击windows的GitHub Desktop右上角的synchronization按钮,或在Ubuntu里运行git pull origin master.在OpenPose下载后,在你的操作系统上仅运行描述为Reinstallation的部分.
---------------------
Ubuntu
安装 - CMake
推荐的安装方法.比较简单且提供了更多定制化的设置.参见doc/installation_cmake.md.注意这是beta版本,如果失败的话,请进到GitHub里,同时用Installation - Script Compilation .
前提
CUDA,cuDNN, OpenCV及Atlas必须已经安装在你的机器上:
1. [CUDA](https://developer.nvidia.com/cuda-80-ga2-download-archive)必须被安装.在安装CUDA后你应该重启你的机器.
2. [cuDNN](https://developer.nvidia.com/cudnn):一旦你已经下载它了,就解压它,拷贝(merge)这个内容到CUDA文件夹,如`/usr/local/cuda-8.0/`.注:我们发现在cuDNN 5.1上OpenPose运行~10%比在cuDNN 6上更快.否则,检查[Compiling without cuDNN](#compiling-without-cudnn).
3. OpenCV用`apt-get install libopencv-dev`安装.如果你自己已经编译OpenCV 3,参照[Manual Compilation](#manual-compilation). 在Makefile.config文件被生成后,编辑他们并删掉注释行`# OPENCV_VERSION := 3`.或者你可以修改所有`Makefile.config.UbuntuXX`文件并运行step2的脚本.
4.另外, OpenCV 3默认不包含`opencv_contrib`模块.如果你有带contrib模块的OpenCV 3 并你想用它,在`Makefile`文件里的`LIBRARIES += opencv_core opencv_highgui opencv_imgproc`这行之后插入`opencv_contrib`.
5. Atlas用`sudo apt-get install libatlas-base-dev`安装.替代Atlas的话,你能通过修改这行`BLAS := atlas`来用OpenBLAS或Intel MKL.
安装- ScriptCompilation
构建Caffe & OpenPose库,下载Ubuntu 14.04 or 16.04所需要的Caffe模块(脚本自动检测)以及CUDA 8:
bash ./ubuntu/install_caffe_and_openpose_if_cuda8.sh
重要:这个脚本仅在CUDA 8及Ubuntu 14 or 16上运行.否则参见doc/installation_cmake.md或Installation - Manual Compilation.
安装- ManualCompilation
选用脚本安装,如果你想用CUDA 7,避免用sh脚本,修改一些配置标签(如OpenCV版本)等,然后:
- 安装Caffe prerequisites.
- 编译Caffe及OpenPose,运行如下命令行:
3. ### Install Caffe ###
4. cd 3rdparty/caffe/
5. # Select your desired Makefile file(run only one of the next 4 commands)
6. cpMakefile.config.Ubuntu14_cuda7.example Makefile.config # Ubuntu 14, cuda 7
7. cpMakefile.config.Ubuntu14_cuda8.example Makefile.config # Ubuntu 14, cuda 8
8. cpMakefile.config.Ubuntu16_cuda7.example Makefile.config # Ubuntu 16, cuda 7
9. cp Makefile.config.Ubuntu16_cuda8.exampleMakefile.config # Ubuntu 16, cuda 8
10.# Change any custom flag from theresulting Makefile.config (e.g. OpenCV 3, Atlas/OpenBLAS/MKL, etc.)
11.# Compile Caffe
12.make all -j${number_of_cpus}&& make distribute -j${number_of_cpus}
13.
14.### Install OpenPose ###
15.cd ../../models/
16.bash ./getModels.sh # It justdownloads the Caffe trained models
17.cd ..
18.# Same file cp command as the oneused for Caffe
19.cpubuntu/Makefile.config.Ubuntu14_cuda7.example Makefile.config
20.# Change any custom flag from theresulting Makefile.config (e.g. OpenCV 3, Atlas/OpenBLAS/MKL, etc.)
21.make all -j${number_of_cpus}
注意:如果你想用你自己的分布式Caffe,按照如下在Custom Caffe部分的步骤,之后重编译OpenPose库:
bash ./install_openpose_if_cuda8.sh
注意:这些步骤仅需执行一次.如果你感兴趣对OpenPose库去做些改变,你能简单的编译它:
make clean
make all -j$(NUM_CORES)
非常重要:有2个Makefile.config.Ubuntu##.example相似文件,一个在主文件下,另一个在3rdparty/caffe/下,相当于OpenPose与Caffe的配置文件.任何修改必须2个文件同时改 (如OpenCV 3 flag, Atlab/OpenBLAS/MKL flag,等).如对CUDA 8 and Ubuntu16:3rdparty/caffe/Makefile.config.Ubuntu16_cuda8.example以及ubuntu/Makefile.config.Ubuntu16_cuda8.example.
重安装
如果你更新一些软件(所用的我们的库或第三方库),或者你简单想重装下它:
- 清空OpenPose及Caffe编译文件夹:
make clean && cd 3rdparty/caffe && make clean
- 重复Installation步骤.你不需要再下载这些模块了.
卸载
你仅需要删除OpenPose文件夹,如rm -rf openpose/.
-----------------------------
Windows
安装- Demo
- 下载并解压portable OpenPose demo 1.0.1.
安装- Library
- 安装的前提要求:
- Microsoft VS2015 Enterprise Update 3. VS2017 Community不支持, VS 2015 Community没被测试过.
- CUDA 8:安装到缺省位置,C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0.否则,相应的修改Visual Studio project solution.在VS2015被安装后,安装CUDA 8.0,确保CUDA安装生成对VS的所有必要文件.如果CUDA已经被安装了,在安装VS后重安装CUDA!
- cuDNN 5.1:一旦你已经下载它,就解压拷贝(merge)其内容到CUDA文件夹,C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0.
- 下载OpenPose依赖和模块 (body, face and hand models),即双击{openpose_path}\windows\download_3rdparty_and_models.bat.相当于,你可以手动下载它们:
- 模块:
- COCO model: download inmodels/pose/coco/.
- MPI model: download inmodels/pose/mpi/.
- Face model: download inmodels/face/.
- Hands model: download inmodels/hand/.
- 依赖:
- Caffe: Unzip as 3rdparty/windows/caffe/.
- Caffe dependencies: Unzip as3rdparty/windows/caffe3rdparty/.
- OpenCV 3.1: Unzip as3rdparty/windows/opencv/.
- 模块:
- 打开VS project sln文件,即双击{openpose_path}\windows\OpenPose.sln.
- 为了确认OpenPose在运行,尝试编译执行demo:
- 右键OpenPoseDemo -->Set as StartUp Project.
- 改为Debug byRelease mode.
- 用F5编译运行.
- 如果你有了已经连接的webcam, OpenPose在编译后将自动开始.
- 为了从命令行上使用创建的exe文件,你必须:
- 拷贝{openpose_folder}\3rdparty\windows\caffe\bin\的所有DLLs到{openpose_folder}\windows\x64\Release.
- 拷贝{openpose_folder}\3rdparty\windows\opencv\x64\vc14\bin\的所有DLLs到:{openpose_folder}\windows\x64\Release.
- 打开cmd (Windows button + X, then A).
- 进到OpenPose目录:cd C:\openpose\.
- 运行教程命令.
- 在默认的images, video or webcam上运行OpenPose,来验证正确安装的OpenPose:doc/quick_start.md#quick-start.
原文:https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md
- OpenPose的安装
- OpenPose的安装
- Openpose安装
- openpose的细节处理
- OpenPose
- OpenPose 安装配置与测试
- Tegra X2 系统上安装 openpose
- 多人脸部\肢体\手部识别OpenPose安装
- CMU OpenPose在Ubuntu 16.04的编译和使用
- QtCreator下用openpose搭建自己的QT工程
- 【OpenPose-Windows】error1 OpenPose项目加载失败
- 肢体语言识别系统OpenPose问世,它甚至能明白你的表情
- caffe openpose vs15
- openpose 问题汇总
- 【OpenPose-Windows】error2 win10-OpenPose-pose+hand/face中断问题
- OpenPose+windows 配置与编译
- openpose(1) 在qtcreator中运行
- 【OpenPose-Windows】OpenPose+VS2015+Windows+CUDA8+cuDNN5.1 官方配置教程
- docker私有仓库pull和push
- Error: could not open `C:\Java\jre7\lib\amd64\jvm.cfg';JAVA_HOME环境变量失效的解决办法
- 接口和抽象类有什么区别?
- 习题 4.4 有3个整数a,b,c,由键盘输入,输出其中最大的数。
- 抽象类
- OpenPose的安装
- JavaBean及其内省操作
- 2017 droidcon 免费送票了
- 京麦消息中心业务模型分析(京东)
- spring部分注解@Repository,@Service,@Controller,@Component,@scope,@Resource,@Autowired
- sonar设置代码检查发现问题之后,发送邮箱通知
- 阿里云CentOS 7 系统下,本文以 MATE 桌面环境安装进行安装配置说明:
- 反反爬虫相关机制
- JDBC(三)