Code Monkey home page Code Monkey logo

openpose-docker's Introduction

openpose-docker

  • openposeをコンテナで実行するDockerfileです
    • docker run コマンドに,入力ファイルとオプションを指定して 実行することで,Openposeの処理を実現します

準備

Dockerホストは以下の条件を満たしている必要があります.

  • Linux OSがインストールされていること
    • AWS g3s.xlarge,ubuntu18.04で動作確認しています
  • nvidia社のGPUが搭載されていること
  • docker-ce,nvidia-docker2がインストールされていること

Dockerイメージのビルド

git clone https://github.com/myoshimi/openpose-docker
cd openpose-docker
sudo docker build -t openpose .

使い方

Openposeで動画処理コマンド

openpose.binのオプションは以下の通り OpenPose - コマンド一覧(Qiita)が詳しいので,参照してください.

docker run --rm --runtime=nvidia \
    -v ${PWD}:/tmp/ openpose:latest \
    --face --hand --part_candidates \
    --display 0 \
    --model_folder /usr/local/openpose/models \
    --video       /tmp/input.avi \
    --write_json  /tmp/outputJSON \
    --write_video /tmp/output.avi
  • --write_json : 時刻ごとの姿勢情報(JSON形式)が出力されるディレクトリ
  • --display 0 : 姿勢推定結果を表示しない( AWSのVMなので途中結果の表示は不要 )
  • --model_folder : 使用する学習モデルも格納位置の指定
  • --video : 解析対象となる動画ファイル
  • --write_video : 解析結果を含んだ動画のファイル

静止画処理コマンド

動画と同様に,静止画も解析対象にできます.下記のように,動画ファイルを 指定する代わりに,画像ファイルを格納したディレクトリを指定するだけです. ディレクトリ内の全ての画像が解析対象になります.

docker run --rm --runtime=nvidia \
    -v ${PWD}:/tmp/ openpose:latest \
    --face --hand --part_candidates \
    --display 0 \
    --model_folder /usr/local/openpose/models \
    --image_dir    ./image \
    --write_json   ./outputJSON \
    --write_images ./output_image \

openpose-docker's People

Contributors

lym29 avatar myoshimi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.