LoginSignup
15
8

More than 5 years have passed since last update.

OpenPoseを動かす (Docker)

Last updated at Posted at 2017-05-13

はじめに

OpenPoseは,CVPR2017で発表された1枚のカラー画像から人物の骨格を推定する手法です.最近DNN界隈で話題になっているということで,手法の詳細はとりあえず置いておくとして,公開されているコードを動かしてみました.

Dockerfile

caffeとopenPoseのinstallはinstall_caffe_and_openpose.shを実行するだけで入ります.学習済みのモデルも自動でダウンロードしてきてくれます(逆に言うとイメージの中にモデルも入ってしまっています).とりあえず動けばいいのでapt-getも適当です(モデルのダウンロードにwgetは必須でした.)

FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04

RUN apt-get update && apt-get install -y build-essential cmake libatlas-base-dev git vim python-dev python-pip python-numpy libopencv-dev python-opencv wget

WORKDIR /root
RUN git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose.git
WORKDIR /root/openpose
RUN chmod u+x install_caffe_and_openpose.sh
RUN ./install_caffe_and_openpose.sh

デモを実行してみる

デモを実行してみます.
(https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/demo_overview.md)

以下のように--no_displayのオプションを使うとGUIなしで動きます.動画として出力するととりあえず結果を確認できます.
./build/examples/openpose/openpose.bin --video ./examples/media/video.avi --no_display --write_video PATH/TO/OUTPUT.avi

15
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
8