【精华】ubuntu编译openpose

(1)参考资料

ubuntu20 openpose cuda11.7 cudnn8 opencv4.7.0_Nightmare004的博客-CSDN博客

(2)opencv编译

ubuntu安装opencv

# (1)ubuntu20依赖安装
sudo apt-get install build-essential libavcodec-dev libavformat-dev libjpeg.dev libtiff5.dev libswscale-dev cmake g++ wget unzip pkg-config ffmpeg libpng-dev libjpeg-dev libopenexr-dev libtiff-dev libwebp-dev libtiff5-dev libxvidcore-dev libx264-dev libxine2-dev libv4l-dev v4l-utils libatlas-base-dev gfortran libeigen3-dev mesa-utils libgl1-mesa-dri -y

sudo apt-get install libgtk2.0-dev libgtk-3-dev -y
sudo apt-get install libgtkgl2.0-dev libgtkglext1-dev -y

sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev -y

# (2)编译
unzip opencv-4.7.0.zip
mkdir -p build && cd build
cmake -D OPENCV_DOWNLOAD_MIRROR_ID=gitcode -D BUILD_TIFF=ON -D OPENCV_GENERATE_PKGCONFIG=ON ..
make -j 8
sudo make install
sudo ldconfig 

# (3)测试
pkg-config --modversion opencv4

(3)Openpose编译

ubuntu下安装openpose超详细以及一些踩过的坑

在python环境下使用Openposes_python

OpenCV安装包下载地址

# (1)项目及依赖包下载
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
cd openpose/

cd 3rdparty
git clone https://github.com/pybind/pybind11
git clone https://github.com/CMU-Perceptual-Computing-Lab/caffe.git
cd ..

git submodule update --init --recursive --remote

cd ..
cd scripts/ubuntu
bash install_deps.sh
cd ..

# (2)编译
cd openpose/
mkdir build && cd build
cmake -D USE_CUDNN=OFF DBUILD_PYTHON=ON ..
make -j 8

# (3)测试
# Video
./build/examples/openpose/openpose.bin --video examples/media/video.avi
# Camera
./build/examples/openpose/openpose.bin --face --hand
# Picture
./build/examples/openpose/openpose.bin --image_dir examples/media/ --face --hand

(4)异常问题

1 Syntax error: end of file unexpected (expecting “then”) 或者Syntax error: end of file unexpected (expecting “do”)

linux脚本相关: Syntax error: end of file unexpected (expecting “then“) 或者Syntax error: end of file unexp_syntax error: end of file unexpected (expecting…)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值