問題:如何在 Ubuntu 20.04 環境下安裝 OpenPose 1.7.0
環境:
1.Ubuntu 20.04
2.CUDA 11.6, cuDNN 8.3.2
3.Python 3.8.10
注意:
1.不能安裝在 Anaconda,請詳見... https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/1_prerequisites.md
2.OpenCV 不能安裝 4.5.5 會出現錯誤 (官方建議 4.2.0)
步驟:
1.Clone OpenPose
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
cd openpose/
git submodule update --init --recursive --remote
2.Prerequisites
sudo apt-get install cmake-qt-gui
sudo bash ./scripts/ubuntu/install_cuda.sh (**CUDA, cuDNN 已安裝好, 故此項省略不做**)
sudo apt-get install libopencv-dev
sudo bash ./scripts/ubuntu/install_deps.sh
sudo apt install protobuf-compiler libgoogle-glog-dev
sudo apt install libboost-all-dev libhdf5-dev libatlas-base-dev
sudo pip3 install numpy opencv-python
3.CMake Configuration
mkdir build/
cd build/
cmake-gui .. (勾選 BUILD_PYTHON, 按 Configure, 按 Generate)
4.Compilation
nproc
make -j8 (將nproc顯示的數字填入8的位置)
5.Running OpenPose
cd .. (回到 openpose目錄)
./build/examples/openpose/openpose.bin --video examples/media/video.avi
畫面如下:
打完收工!!!
留言