Skip to content

Commit

Permalink
Merge pull request spmallick#122 from vikasguptaiisc/master
Browse files Browse the repository at this point in the history
added code for OpenPose multi-person
  • Loading branch information
spmallick authored Sep 11, 2018
2 parents 2f6771b + 4b7a759 commit 76e653e
Show file tree
Hide file tree
Showing 10 changed files with 4,038 additions and 0 deletions.
8 changes: 8 additions & 0 deletions OpenPose-Multi-Person/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
multi-person-openpose
pose/coco/pose_iter_440000.caffemodel
out.*
*.out
debug*.*
*.debug
cpp.jpg
py.jpg
18 changes: 18 additions & 0 deletions OpenPose-Multi-Person/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 2.8.12)

PROJECT(openPose)

find_package( OpenCV REQUIRED )

include_directories( ${OpenCV_INCLUDE_DIRS})

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

MACRO(add_example name)
ADD_EXECUTABLE(${name} ${name}.cpp)
TARGET_LINK_LIBRARIES(${name} ${OpenCV_LIBS})
ENDMACRO()

add_example(multi-person-openpose)
10 changes: 10 additions & 0 deletions OpenPose-Multi-Person/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1. RUN getModels.sh from command line
2. Use the Notebook for better understanding and debugging
3. Download caffe model from http://posefs1.perception.cs.cmu.edu/Users/ZheCao/pose_iter_440000.caffemodel

Requirements :
1. OpenCV > 3.4.1
2. Matplotlib for Notebook

Command to compile the cpp file in ubuntu:
g++ -o3 -std=c++11 multi-person-openpose.cpp `pkg-config --libs --cflags opencv` -lpthread -o multi-person-openpose
16 changes: 16 additions & 0 deletions OpenPose-Multi-Person/getModels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ------------------------- BODY, FACE AND HAND MODELS -------------------------
# Downloading body pose (COCO and MPI), face and hand models
OPENPOSE_URL="http://posefs1.perception.cs.cmu.edu/OpenPose/models/"
POSE_FOLDER="pose/"
FACE_FOLDER="face/"
HAND_FOLDER="hand/"

# ------------------------- POSE MODELS -------------------------
# Body (COCO)
COCO_FOLDER=${POSE_FOLDER}"coco/"
COCO_MODEL=${COCO_FOLDER}"pose_iter_440000.caffemodel"
wget -c ${OPENPOSE_URL}${COCO_MODEL} -P ${COCO_FOLDER}
# Alternative: it will not check whether file was fully downloaded
# if [ ! -f $COCO_MODEL ]; then
# wget ${OPENPOSE_URL}$COCO_MODEL -P $COCO_FOLDER
# fi
Binary file added OpenPose-Multi-Person/group.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 76e653e

Please sign in to comment.