安装Ubuntu版openpose

Ubuntu 下载加速

  • apt使用清华源 sudo vi /etc/apt/sources.list

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

更新apt

1
2
sudo apt update
sudo apt upgrade
- 安装pip
1
2
3
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
pip -V  #查看pip版本
- pip 豆瓣源加速
1
2
3
mkdir ~/.pip
cd ~/.pip
sudo gedit ~/.pip/pip.conf
复制文件
1
2
3
4
[global] 
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
- 安装git
1
sudo apt install git
- git 加速 - 查找域名对应的ip地址,并修改hosts文件
1
2
nslookup github.global.ssl.fastly.Net
nslookup github.com
- 将下列内容加入sudo vi /etc/hosts文件中
1
2
151.101.76.249 http://global-ssl.fastly.net
192.30.255.113 http://github.com #此处112还是113根据自己的情况调整?
- 刷新dns缓存
1
sudo /etc/init.d/networking restart
## 安装openpose ### 克隆openpose
1
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose

准备工作

  • 安装Cmake GUI

    1
    sudo apt-get install cmake-qt-gui

  • 安装OpenCV

    1
    sudo apt-get install libopencv-dev

  • 安装Cafe

    1
    sudo bash ./ubuntu/install_cmake.sh

配置

  • Open CMake GUI and select the OpenPose directory as project source directory, and a non-existing or empty sub-directory (e.g., build) where the Makefile files (Ubuntu) or Visual Studio solution (Windows) will be generated. If build does not exist, it will ask you whether to create it. Press Yes.

  • Press the Configure button, keep the generator in Unix Makefile (Ubuntu) or set it to Visual Studio 14 2015 Win64 (Windows), and press Finish.

 

  • If this step is successful, the Configuring done text will appear in the bottom box in the last line. Otherwise, some red text will appear in that same bottom box.

  • Press the Generate button and proceed to OpenPose Building. You can now close CMake.

Note: If you prefer to use your own custom Caffe or OpenCV versions, see Custom Caffe or Custom OpenCV respectively.

坚持原创技术分享,您扫一扫将鼓励我继续写作!