搭建caffe运行openpose

本文详细介绍了如何搭建Caffe环境并配置OpenPose。首先确保.bashrc中包含Miniconda路径,创建沙盒环境,下载Caffe源码。接着安装依赖,激活Caffe环境安装OpenCV。修改Makefile.config,编译Caffe并设置环境变量。之后下载OpenPose,使用cmake-gui配置编译选项,并进行编译。整个过程需要注意环境的激活以及编译的步骤。
摘要由CSDN通过智能技术生成

搭建caffe

1.先确定.bashrc中有miniconda的路径

export PATH=/home/xiang/miniconda3/bin:$PATH

2.新创沙盒环境

conda create --name caffe-xy python=2.7.15

3.下载caffe

cd ~/miniconda3/envs/caffe-xy/
git clone https://github.com/BVLC/caffe.git

4.为了编译openpose,需要当前的commitf019d0dfe86f49d1140961f8c7dec22130c83154

cd caffe/
git checkout f019d0dfe86f49d1140961f8c7d

5.安装依赖

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y build-essential cmake git pkg-config
sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev protobuf-compiler
sudo apt-get install -y libatlas-base-dev 
sudo apt-get install -y --no-install-recommends libboost-all-dev
sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install -y libopencv-dev libhdf5-serial-dev
sudo apt-get install -y build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip

6.激活caffe沙盒环境安装opencv

source activate caffe-xy
conda install opencv

7.注释掉miniconda路径

#export PATH=/home/xiang/miniconda3/bin:$PATH

8.修改Makefile.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值