GithubHelp home page GithubHelp logo

esemeniuc / openpose-docker Goto Github PK

View Code? Open in Web Editor NEW
87.0 3.0 37.0 20 KB

A docker build file for CMU openpose with Python API support

Home Page: https://hub.docker.com/r/cwaffles/openpose

Dockerfile 100.00%
docker openpose deep-learning deep-neural-networks pose-estimation cuda python

openpose-docker's Introduction

openpose-docker's People

Contributors

erikreed avatar esemeniuc avatar u0251077 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

openpose-docker's Issues

python binding is not working

When I tried to run the 01_body_from_image.py, I got the following error

Error: OpenPose library could not be found. Did you enable BUILD_PYTHON in CMake and have this Python script in the right folder?
cannot import name 'pyopenpose'

It seems the python api has not been built when building Caffe

-- Python interface is disabled or not all required dependencies found. Building without it...

-- ******************* Caffe Configuration Summary *******************
-- General:
-- Version : 1.0.0
-- Git : 1.0-147-gc95002fb
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- Release CXX flags : -O3 -DNDEBUG -fPIC -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
-- Debug CXX flags : -g -fPIC -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
-- Build type : Release

-- BUILD_SHARED_LIBS : ON
-- BUILD_python : OFF
-- BUILD_matlab : OFF
-- BUILD_docs : OFF
-- CPU_ONLY : OFF
-- USE_OPENCV : OFF
-- USE_LEVELDB : OFF
-- USE_LMDB : OFF
-- USE_NCCL : OFF
-- ALLOW_LMDB_NOLOCK : OFF
-- USE_HDF5 : ON

-- Dependencies:
-- BLAS : Yes (Atlas)
-- Boost : Yes (ver. 1.65)
-- glog : Yes
-- gflags : Yes
-- protobuf : Yes (ver. 3.0.0)
-- CUDA : Yes (ver. 10.0)

-- NVIDIA CUDA:
-- Target GPU(s) : Auto
-- GPU arch(s) : sm_30 sm_35 sm_37 sm_50 sm_52 sm_53 sm_60 sm_61 sm_62 sm_70 sm_75
-- cuDNN : Yes (ver. 7.6.5)

-- Install:
-- Install path : /openpose/build/caffe

cant see camera output as it only works with --display 0

./build/examples/openpose/openpose.bin --render_pose 0 --display 0 --write_json output2/
- It generates json, but cant see the GUI. Any way ?

./build/examples/openpose/openpose.bin --flir_camera --3d --number_people_max 1
- Steps for 3-D ?
OpenPose CMake must be compiled with the USE_FLIR_CAMERA flag in order to use the
FLIR camera.

opencv-python install error

Step 3/10 : RUN pip3 install numpy opencv-python
---> Running in 8eb3fe083088
Collecting numpy
Downloading https://files.pythonhosted.org/packages/b8/e5/a64ef44a85397ba3c377f6be9c02f3cb3e18023f8c89850dd319e7945521/numpy-1.19.2-cp36-cp36m-manylinux1_x86_64.whl (13.4MB)
Collecting opencv-python
Downloading https://files.pythonhosted.org/packages/77/f5/49f034f8d109efcf9b7e98fbc051878b83b2f02a1c73f92bbd37f317288e/opencv-python-4.4.0.42.tar.gz (88.9MB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'setuptools'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kghitlq6/opencv-python/
The command '/bin/sh -c pip3 install numpy opencv-python' returned a non-zero code: 1

Mac Os

Does it work on macOS Mojave?

Error : start docker env. : Unable to find image 'openpose_v1:latest' locally

Hi,
i tried to run docker after 'build the image using dockerfile', but i got an error from 'start docker env.'

Error below :

sudo docker run --gpus all --name openpose -it openpose_v1:latest /bin/bash

Unable to find image 'openpose_v1:latest' locally
docker: Error response from daemon: pull access denied for openpose_v1, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

thank you for helping.

update readme with short tutorial

Would be possible to give short info on how to properly compile and run this docker image?

I have no previous experience in Docker. I found a way how to install and run the image, however, I can not found openpose executable on the virtual machine. Before I spend a day or two reinstalling this image I would appreciate some help.

Best Andrej

test error

F0505 08:40:54.378906 224 pooling_layer.cu:212] Check failed: error == cudaSuccess (48 vs. 0) no kernel image is available for execution on the device
*** Check failure stack trace: ***
@ 0x7f00396020cd google::LogMessage::Fail()
@ 0x7f0039603f33 google::LogMessage::SendToLog()
@ 0x7f0039601c28 google::LogMessage::Flush()
@ 0x7f0039604999 google::LogMessageFatal::~LogMessageFatal()
@ 0x7f0038c4c1cb caffe::PoolingLayer<>::Forward_gpu()
@ 0x7f0038b9d672 caffe::Net<>::ForwardFromTo()
@ 0x7f003b04d257 op::NetCaffe::forwardPass()
@ 0x7f003b07403a op::PoseExtractorCaffe::forwardPass()
@ 0x7f003b06d235 op::PoseExtractor::forwardPass()
@ 0x7f003b06a37f op::WPoseExtractor<>::work()
@ 0x7f003b0aa269 op::Worker<>::checkAndWork()
@ 0x7f003b0aa3f3 op::SubThread<>::workTWorkers()
@ 0x7f003b0b4058 op::SubThreadQueueInOut<>::work()
@ 0x7f003b0ac6d1 op::Thread<>::threadFunction()
@ 0x7f003a51857f (unknown)
@ 0x7f0039c3a6db start_thread
@ 0x7f0039f7388f clone
i use "./build/examples/openpose/openpose.bin --video examples/media/video.avi --write_json output/ --display 0 --render_pose 0",but it always does not work,so what can i do ,thx

Quick start face & hands example doesn't work with Dockerfile

I was able to build the image without any problems. My host is Ubuntu 16, and I have 4 GTX TitanX GPUs.

docker run -it --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 openpose
./build/examples/openpose/openpose.bin --video examples/media/video.avi --face --hand

Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
Unable to init server: Could not connect: Connection refused
(OpenPose 1.4.0:13): Gtk-WARNING **: 14:24:40.539: cannot open display:
E0503 14:24:40.540756 29 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.
Segmentation fault (core dumped)

I thought the issue may have to do with restricting the GPUs, so I reran the container allowing all GPUs and I still got basically the same error:

root@e24603e44435:/openpose# ./build/examples/openpose/openpose.bin --video

examples/media/video.avi --face --hand
Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
Auto-detecting all available GPUs... Detected 4 GPU(s), using 4 of them starting at GPU 0.
Unable to init server: Could not connect: Connection refused
(OpenPose 1.4.0:13): Gtk-WARNING **: 14:35:09.111: cannot open display:
E0503 14:35:09.112191 30 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.
E0503 14:35:09.112211 29 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.
E0503 14:35:09.112223 31 common.cpp:114] Cannot create Cublas handle. Cublas won't be available.
Segmentation fault (core dumped)

Error while building Dockerfile: "Unsupported gpu architecture"

While trying to build the Dockerfile (or actually an extended Dockerfile based on this) I get the following error during the building of OpenPose:

nvcc fatal   : Unsupported gpu architecture 'compute_80'

Running Docker on Ubuntu 20.04, with a Titan Xp GPU.

Oddly enough I can compile OpenPose while running the container, but not when done during the building of the Dockerfile.

Not really your problem, but I wanted to document somewhere.

Cannot use python bindings

Problem

If I try to import the python openpose module it cannot be done. Also when I try to search for it in the installed modules I cannot find it.

Steps to reproduce problem

# Start the docker
mypc@myuser:~$ docker run -it --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 cwaffles/openpose-python
# Test 1
# Start python3 inside the docker
root@88579176c02b:/openpose# python3
# Try to import openpose, throws error
>>> import openpose
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'openpose'
# Test 2
# List modules installed inside docker using pip3
pip3 list | grep openpose
# No output
# Test 3
# Start python2 inside the docker
root@88579176c02b:/openpose# python3
# Try to import openpose, throws error
>>> import openpose
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'openpose'
# Test 4
# Try to run the example from "https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/examples/tutorial_api_python/01_body_from_image.py"
root@88579176c02b:/openpose# cd examples/tutorial_api_python/
root@88579176c02b:/openpose/examples/tutorial_api_python# python3 01_body_from_image.py 
Error: OpenPose library could not be found. Did you enable `BUILD_PYTHON` in CMake and have this Python script in the right folder?
Traceback (most recent call last):
  File "01_body_from_image.py", line 26, in <module>
    raise e
  File "01_body_from_image.py", line 23, in <module>
    from openpose import pyopenpose as op
  File "../../python/openpose/__init__.py", line 1, in <module>
    from . import pyopenpose as pyopenpose
ImportError: cannot import name 'pyopenpose'

Am I doing something wrong? Do you know of a way to fix this?

Difference between cwaffles/openpose and cwaffles/openpose-python

I'm fairly new to docker so apologies if this is obvious. I ran docker pull cwaffles/openpose and it downloaded fine, but when I ran your tutorial line

docker run -it --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 cwaffles/openpose-python

it downloaded cwaffles/openpose-python. Is there a difference between the two? Which one should we be using?

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.