diff --git a/Makefile b/Makefile
index 11b084aa..e94c768e 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ LIB_BUILD_DIR := $(BUILD_DIR)/lib
STATIC_NAME := $(LIB_BUILD_DIR)/lib$(LIBRARY_NAME).a
DYNAMIC_VERSION_MAJOR := 1
DYNAMIC_VERSION_MINOR := 0
-DYNAMIC_VERSION_REVISION := 0-rc2
+DYNAMIC_VERSION_REVISION := 0-rc3
DYNAMIC_NAME_SHORT := lib$(LIBRARY_NAME).so
#DYNAMIC_SONAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR)
DYNAMIC_VERSIONED_NAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR).$(DYNAMIC_VERSION_MINOR).$(DYNAMIC_VERSION_REVISION)
diff --git a/README.md b/README.md
index 4233bf98..eec0126c 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,19 @@
OpenPose
====================================
+## Latest News
+- Apr 2017: Body released!
+- May 2017: Windows version released!
+- Jun 2017: Face released!
+- Check all the [release notes](doc/release_notes.md).
+
+
+
## Introduction
OpenPose is a **library for real-time multi-person keypoint detection and multi-threading written in C++** using OpenCV and Caffe*, authored by [Gines Hidalgo](https://www.linkedin.com/in/gineshidalgo/), [Zhe Cao](http://www.andrew.cmu.edu/user/zhecao), [Tomas Simon](http://www.cs.cmu.edu/~tsimon/), [Shih-En Wei](https://scholar.google.com/citations?user=sFQD3k4AAAAJ&hl=en), [Hanbyul Joo](http://www.cs.cmu.edu/~hanbyulj/) and [Yaser Sheikh](http://www.cs.cmu.edu/~yaser/).
-* It uses Caffe, but the code is ready to be ported to other frameworks (e.g., Tensorflow or Torch). If you implement any of those, please, make a pull request and we will add it!
+\* It uses Caffe, but the code is ready to be ported to other frameworks (Tensorflow, Torch, etc.). If you implement any of those, feel free to make a pull request!
OpenPose represents the **first real-time system to jointly detect human body, hand and facial keypoints (in total 130 keypoints) on single images**. In addition, the system computational performance on body keypoint estimation is invariant to the number of detected people in the image.
@@ -15,11 +23,11 @@ OpenPose is freely available for free non-commercial use, and may be redistribut
Library main functionality:
-* Multi-person 15 or **18-keypoint body pose** estimation and rendering.
+* Multi-person 15 or **18-keypoint body pose** estimation and rendering. **Running time invariant of number of people** on the image.
-* Multi-person **2x21-keypoint hand** estimation and rendering (coming soon in around 1-2 months!).
+* Multi-person **2x21-keypoint hand** estimation and rendering. Note: In this initial version, **running time** linearly **depends** on the **number of people** on the image. **Coming soon (in around 1-5 weeks)!**
-* Multi-person **70-keypoint face** estimation and rendering (coming soon in around 2-3 months!).
+* Multi-person **70-keypoint face** estimation and rendering. Note: In this initial version, **running time** linearly **depends** on the **number of people** on the image.
* Flexible and easy-to-configure **multi-threading** module.
@@ -42,6 +50,11 @@ The pose estimation work is based on the C++ code from [the ECCV 2016 demo](http
+### Body + Face Estimation
+
+
+
+
## Coming Soon (But Already Working!)
### Body + Hands + Face Estimation
@@ -49,11 +62,6 @@ The pose estimation work is based on the C++ code from [the ECCV 2016 demo](http
-### Body + Face Estimation
-
-
-
-
### Body + Hands
@@ -132,7 +140,7 @@ doxygen doc_autogeneration.doxygen
## Output
#### Output Format
-There are 2 alternatives to save the **(x,y,score) body part locations**. The `write_pose` flag uses the OpenCV cv::FileStorage default formats (JSON, XML and YML). However, the JSON format is only available after OpenCV 3.0. Hence, `write_pose_json` saves the people pose data using a custom JSON writer. For the latter, each JSON file has a `people` array of objects, where each object has an array `body_parts` containing the body part locations and detection confidence formatted as `x1,y1,c1,x2,y2,c2,...`. The coordinates `x` and `y` can be normalized to the range [0,1], [-1,1], [0, source size], [0, output size], etc., depending on the flag `scale_mode`. In addition, `c` is the confidence in the range [0,1].
+There are 2 alternatives to save the **(x,y,score) body part locations**. The `write_keypoint` flag uses the OpenCV cv::FileStorage default formats (JSON, XML and YML). However, the JSON format is only available after OpenCV 3.0. Hence, `write_keypoint_json` saves the people pose data using a custom JSON writer. For the latter, each JSON file has a `people` array of objects, where each object has an array `body_parts` containing the body part locations and detection confidence formatted as `x1,y1,c1,x2,y2,c2,...`. The coordinates `x` and `y` can be normalized to the range [0,1], [-1,1], [0, source size], [0, output size], etc., depending on the flag `keypoint_scale`. In addition, `c` is the confidence in the range [0,1].
```
{
@@ -181,6 +189,16 @@ Where each index is the key value corresponding to each body part in `POSE_COCO_
#### Reading Saved Results
We use standard formats (JSON, XML, PNG, JPG, ...) to save our results, so there will be lots of frameworks to read them later, but you might also directly use our functions in [include/openpose/filestream.hpp](include/openpose/filestream.hpp). In particular, `loadData` (for JSON, XML and YML files) and `loadImage` (for image formats such as PNG or JPG) to load the data into cv::Mat format.
+#### Pose Output Format
+
+
+
+
+#### Face Output Format
+
+
+
+
## OpenPose Benchmark
diff --git a/doc/UML/1_0_0rc1/UML.mdj b/doc/UML/1_0_0rc3/UML.mdj
similarity index 99%
rename from doc/UML/1_0_0rc1/UML.mdj
rename to doc/UML/1_0_0rc3/UML.mdj
index 59660927..d72d4612 100755
--- a/doc/UML/1_0_0rc1/UML.mdj
+++ b/doc/UML/1_0_0rc3/UML.mdj
@@ -5917,7 +5917,7 @@
"_parent": {
"$ref": "AAAAAAFbHDZmRV10zeE="
},
- "name": "scaleKeyPoints",
+ "name": "scaleKeypoints",
"ownedElements": [
{
"_type": "UMLDependency",
@@ -6005,7 +6005,7 @@
"_parent": {
"$ref": "AAAAAAFbHDZmRV10zeE="
},
- "name": "wKeyPointScaler.hpp",
+ "name": "wKeypointScaler.hpp",
"ownedElements": [
{
"_type": "UMLDependency",
@@ -6076,7 +6076,7 @@
"_parent": {
"$ref": "AAAAAAFbHDZmRV10zeE="
},
- "name": "KeyPointScaler",
+ "name": "KeypointScaler",
"ownedElements": [
{
"_type": "UMLDependency",
@@ -6409,9 +6409,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 117,
+ "left": 141,
"top": 231,
- "width": 127,
+ "width": 103,
"height": 13,
"autoResize": false,
"underline": false,
@@ -6481,9 +6481,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 112,
+ "left": 136,
"top": 224,
- "width": 137,
+ "width": 113,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -6517,9 +6517,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 112,
+ "left": 136,
"top": 249,
- "width": 137,
+ "width": 113,
"height": 10,
"autoResize": false
},
@@ -6541,9 +6541,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 112,
+ "left": 136,
"top": 259,
- "width": 137,
+ "width": 113,
"height": 10,
"autoResize": false
},
@@ -6608,9 +6608,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 112,
+ "left": 136,
"top": 224,
- "width": 137,
+ "width": 113,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -6966,7 +6966,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 200,
+ "left": 152,
"top": 72,
"width": 0,
"height": 13,
@@ -6991,9 +6991,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 437,
+ "left": 413,
"top": 231,
- "width": 169,
+ "width": 113,
"height": 13,
"autoResize": false,
"underline": false,
@@ -7017,7 +7017,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 200,
+ "left": 152,
"top": 72,
"width": 72,
"height": 13,
@@ -7043,7 +7043,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 200,
+ "left": 152,
"top": 72,
"width": 0,
"height": 13,
@@ -7063,9 +7063,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 432,
+ "left": 408,
"top": 224,
- "width": 179,
+ "width": 123,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -7099,9 +7099,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 432,
+ "left": 408,
"top": 249,
- "width": 179,
+ "width": 123,
"height": 10,
"autoResize": false
},
@@ -7123,9 +7123,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 432,
+ "left": 408,
"top": 259,
- "width": 179,
+ "width": 123,
"height": 10,
"autoResize": false
},
@@ -7147,7 +7147,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 120,
+ "left": 96,
"top": -8,
"width": 10,
"height": 10,
@@ -7171,7 +7171,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 120,
+ "left": 96,
"top": -8,
"width": 10,
"height": 10,
@@ -7190,9 +7190,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 432,
+ "left": 408,
"top": 224,
- "width": 179,
+ "width": 123,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -8996,8 +8996,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 335,
- "top": 314,
+ "left": 316,
+ "top": 312,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9030,8 +9030,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 340,
- "top": 328,
+ "left": 321,
+ "top": 326,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9064,7 +9064,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 326,
+ "left": 305,
"top": 285,
"width": 0,
"height": 13,
@@ -9097,7 +9097,7 @@
"$ref": "AAAAAAFbHDibKUyHyzc="
},
"lineStyle": 1,
- "points": "448:269;215:343",
+ "points": "408:269;215:342",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -9139,8 +9139,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 200,
- "top": 289,
+ "left": 206,
+ "top": 291,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9173,8 +9173,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 215,
- "top": 287,
+ "left": 221,
+ "top": 290,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9207,8 +9207,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 171,
- "top": 294,
+ "left": 177,
+ "top": 292,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9240,7 +9240,7 @@
"$ref": "AAAAAAFbHDieuEywuH8="
},
"lineStyle": 1,
- "points": "183:269;190:327",
+ "points": "192:269;193:327",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -9568,8 +9568,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 182,
- "top": 180,
+ "left": 188,
+ "top": 179,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9602,8 +9602,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 197,
- "top": 177,
+ "left": 202,
+ "top": 174,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9636,8 +9636,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 153,
- "top": 187,
+ "left": 159,
+ "top": 188,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9669,7 +9669,7 @@
"$ref": "AAAAAAFbHDirkk2m0MU="
},
"lineStyle": 1,
- "points": "161:157;175:223",
+ "points": "163:157;185:223",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -9711,8 +9711,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 543,
- "top": 186,
+ "left": 515,
+ "top": 191,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9745,8 +9745,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 558,
- "top": 188,
+ "left": 528,
+ "top": 199,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9779,8 +9779,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 514,
- "top": 181,
+ "left": 490,
+ "top": 176,
"width": 0,
"height": 13,
"autoResize": false,
@@ -9812,7 +9812,7 @@
"$ref": "AAAAAAFbHDiqGk19SxU="
},
"lineStyle": 1,
- "points": "534:157;524:223",
+ "points": "523:157;483:223",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -11032,8 +11032,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 153,
- "top": 187,
+ "left": 159,
+ "top": 188,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11066,8 +11066,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 138,
- "top": 190,
+ "left": 145,
+ "top": 193,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11100,8 +11100,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 182,
- "top": 180,
+ "left": 188,
+ "top": 179,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11134,8 +11134,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 154,
- "top": 194,
+ "left": 162,
+ "top": 197,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11168,8 +11168,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 141,
- "top": 195,
+ "left": 149,
+ "top": 199,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11202,8 +11202,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 182,
- "top": 193,
+ "left": 190,
+ "top": 192,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11236,8 +11236,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 151,
- "top": 179,
+ "left": 156,
+ "top": 180,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11270,8 +11270,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 139,
- "top": 184,
+ "left": 145,
+ "top": 186,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11304,8 +11304,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 177,
- "top": 169,
+ "left": 181,
+ "top": 167,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11385,7 +11385,7 @@
"$ref": "AAAAAAFbHDieuEywuH8="
},
"lineStyle": 1,
- "points": "175:223;161:157",
+ "points": "185:223;163:157",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -11453,8 +11453,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 514,
- "top": 181,
+ "left": 490,
+ "top": 176,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11487,8 +11487,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 499,
- "top": 179,
+ "left": 477,
+ "top": 168,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11521,8 +11521,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 543,
- "top": 186,
+ "left": 515,
+ "top": 191,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11555,8 +11555,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 513,
- "top": 189,
+ "left": 483,
+ "top": 187,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11589,8 +11589,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 500,
- "top": 184,
+ "left": 473,
+ "top": 178,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11623,8 +11623,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 539,
- "top": 197,
+ "left": 504,
+ "top": 204,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11657,8 +11657,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 515,
- "top": 174,
+ "left": 496,
+ "top": 165,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11691,8 +11691,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 501,
- "top": 174,
+ "left": 484,
+ "top": 160,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11725,8 +11725,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 543,
- "top": 174,
+ "left": 522,
+ "top": 175,
"width": 0,
"height": 13,
"autoResize": false,
@@ -11806,7 +11806,7 @@
"$ref": "AAAAAAFbHDibKUyHyzc="
},
"lineStyle": 1,
- "points": "524:223;534:157",
+ "points": "483:223;523:157",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -12172,7 +12172,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 16,
+ "left": -32,
"top": -1104,
"width": 0,
"height": 13,
@@ -12197,9 +12197,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 285,
+ "left": 272,
"top": 231,
- "width": 124,
+ "width": 113,
"height": 13,
"autoResize": false,
"underline": false,
@@ -12223,7 +12223,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 16,
+ "left": -32,
"top": -1104,
"width": 72,
"height": 13,
@@ -12249,7 +12249,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 16,
+ "left": -32,
"top": -1104,
"width": 0,
"height": 13,
@@ -12269,9 +12269,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 280,
+ "left": 267,
"top": 224,
- "width": 134,
+ "width": 123,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -12305,9 +12305,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 280,
+ "left": 267,
"top": 249,
- "width": 134,
+ "width": 123,
"height": 10,
"autoResize": false
},
@@ -12329,9 +12329,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 280,
+ "left": 267,
"top": 259,
- "width": 134,
+ "width": 123,
"height": 10,
"autoResize": false
},
@@ -12353,7 +12353,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 104,
+ "left": 80,
"top": -696,
"width": 10,
"height": 10,
@@ -12377,7 +12377,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 104,
+ "left": 80,
"top": -696,
"width": 10,
"height": 10,
@@ -12396,9 +12396,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 280,
+ "left": 267,
"top": 224,
- "width": 134,
+ "width": 123,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -12599,8 +12599,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 271,
- "top": 308,
+ "left": 265,
+ "top": 306,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12633,8 +12633,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 279,
- "top": 320,
+ "left": 274,
+ "top": 318,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12667,7 +12667,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 254,
+ "left": 246,
"top": 283,
"width": 0,
"height": 13,
@@ -12700,7 +12700,7 @@
"$ref": "AAAAAAFbJy+z+E++48k="
},
"lineStyle": 1,
- "points": "312:269;215:335",
+ "points": "298:269;215:333",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -12742,8 +12742,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 338,
- "top": 181,
+ "left": 329,
+ "top": 179,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12776,8 +12776,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 323,
- "top": 179,
+ "left": 315,
+ "top": 175,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12810,8 +12810,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 367,
- "top": 186,
+ "left": 358,
+ "top": 188,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12844,8 +12844,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 337,
- "top": 189,
+ "left": 327,
+ "top": 187,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12878,8 +12878,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 324,
- "top": 185,
+ "left": 315,
+ "top": 181,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12912,8 +12912,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 364,
- "top": 197,
+ "left": 353,
+ "top": 199,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12946,8 +12946,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 339,
- "top": 174,
+ "left": 332,
+ "top": 171,
"width": 0,
"height": 13,
"autoResize": false,
@@ -12980,8 +12980,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 326,
- "top": 175,
+ "left": 318,
+ "top": 170,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13014,8 +13014,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 367,
- "top": 174,
+ "left": 360,
+ "top": 175,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13095,7 +13095,7 @@
"$ref": "AAAAAAFbJy+z+E++48k="
},
"lineStyle": 1,
- "points": "349:223;358:157",
+ "points": "335:223;354:157",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -13163,8 +13163,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 367,
- "top": 185,
+ "left": 358,
+ "top": 187,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13197,8 +13197,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 382,
- "top": 187,
+ "left": 372,
+ "top": 191,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13231,8 +13231,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 338,
- "top": 182,
+ "left": 329,
+ "top": 180,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13264,7 +13264,7 @@
"$ref": "AAAAAAFbJy96y08MtFk="
},
"lineStyle": 1,
- "points": "358:157;349:223",
+ "points": "354:157;335:223",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -13313,7 +13313,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 742,
+ "left": 678,
"top": -504,
"width": 0,
"height": 13,
@@ -13338,13 +13338,13 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 621,
+ "left": 589,
"top": 231,
- "width": 64,
+ "width": 95,
"height": 13,
"autoResize": false,
"underline": false,
- "text": "scaleKeyPoints",
+ "text": "scaleKeypoints",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
@@ -13364,7 +13364,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 742,
+ "left": 678,
"top": -504,
"width": 72,
"height": 13,
@@ -13390,7 +13390,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 742,
+ "left": 678,
"top": -504,
"width": 0,
"height": 13,
@@ -13410,9 +13410,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 616,
+ "left": 584,
"top": 224,
- "width": 74,
+ "width": 105,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -13446,9 +13446,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 616,
+ "left": 584,
"top": 249,
- "width": 74,
+ "width": 105,
"height": 10,
"autoResize": false
},
@@ -13470,9 +13470,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 616,
+ "left": 584,
"top": 259,
- "width": 74,
+ "width": 105,
"height": 10,
"autoResize": false
},
@@ -13494,7 +13494,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 87,
+ "left": 55,
"top": -200,
"width": 10,
"height": 10,
@@ -13518,7 +13518,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 87,
+ "left": 55,
"top": -200,
"width": 10,
"height": 10,
@@ -13537,9 +13537,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 616,
+ "left": 584,
"top": 224,
- "width": 74,
+ "width": 105,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -13604,7 +13604,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": -329,
+ "left": -393,
"top": -720,
"width": 0,
"height": 13,
@@ -13629,13 +13629,13 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 661,
+ "left": 629,
"top": 47,
- "width": 114,
+ "width": 136,
"height": 13,
"autoResize": false,
"underline": false,
- "text": "wKeyPointScaler.hpp",
+ "text": "wKeypointScaler.hpp",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
@@ -13655,7 +13655,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": -329,
+ "left": -393,
"top": -720,
"width": 72,
"height": 13,
@@ -13681,7 +13681,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": -329,
+ "left": -393,
"top": -720,
"width": 0,
"height": 13,
@@ -13701,9 +13701,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 656,
+ "left": 624,
"top": 40,
- "width": 124,
+ "width": 146,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -13737,9 +13737,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 656,
+ "left": 624,
"top": 65,
- "width": 124,
+ "width": 146,
"height": 10,
"autoResize": false
},
@@ -13761,9 +13761,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 656,
+ "left": 624,
"top": 75,
- "width": 124,
+ "width": 146,
"height": 10,
"autoResize": false
},
@@ -13785,7 +13785,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": -480,
+ "left": -512,
"top": -352,
"width": 10,
"height": 10,
@@ -13809,7 +13809,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": -480,
+ "left": -512,
"top": -352,
"width": 10,
"height": 10,
@@ -13828,9 +13828,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 656,
+ "left": 624,
"top": 40,
- "width": 124,
+ "width": 146,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -13888,8 +13888,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 708,
- "top": 99,
+ "left": 704,
+ "top": 93,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13922,8 +13922,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 721,
- "top": 106,
+ "left": 719,
+ "top": 94,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13956,8 +13956,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 681,
- "top": 84,
+ "left": 675,
+ "top": 90,
"width": 0,
"height": 13,
"autoResize": false,
@@ -13989,7 +13989,7 @@
"$ref": "AAAAAAFbgmAJRXI9LpI="
},
"lineStyle": 1,
- "points": "703:85;688:111",
+ "points": "692:85;689:111",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -14031,8 +14031,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 682,
- "top": 84,
+ "left": 675,
+ "top": 89,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14065,8 +14065,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 669,
- "top": 76,
+ "left": 660,
+ "top": 87,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14099,8 +14099,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 707,
- "top": 99,
+ "left": 704,
+ "top": 94,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14133,8 +14133,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 687,
- "top": 75,
+ "left": 677,
+ "top": 77,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14167,8 +14167,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 677,
- "top": 66,
+ "left": 664,
+ "top": 73,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14201,8 +14201,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 709,
- "top": 92,
+ "left": 703,
+ "top": 84,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14235,8 +14235,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 677,
- "top": 94,
+ "left": 674,
+ "top": 103,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14269,8 +14269,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 664,
- "top": 89,
+ "left": 660,
+ "top": 103,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14303,8 +14303,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 703,
- "top": 103,
+ "left": 701,
+ "top": 101,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14384,7 +14384,7 @@
"$ref": "AAAAAAFbgmGMA7e9i94="
},
"lineStyle": 1,
- "points": "688:111;703:85",
+ "points": "689:111;692:85",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -14452,8 +14452,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 820,
- "top": 133,
+ "left": 809,
+ "top": 132,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14486,8 +14486,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 830,
- "top": 122,
+ "left": 819,
+ "top": 121,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14520,8 +14520,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 799,
- "top": 154,
+ "left": 790,
+ "top": 155,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14553,7 +14553,7 @@
"$ref": "AAAAAAFbgmAJRXI9LpI="
},
"lineStyle": 1,
- "points": "741:85;880:215",
+ "points": "723:85;877:215",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -14629,11 +14629,11 @@
"containerExtending": false,
"left": 637,
"top": 119,
- "width": 75,
+ "width": 97,
"height": 13,
"autoResize": false,
"underline": false,
- "text": "KeyPointScaler",
+ "text": "KeypointScaler",
"horizontalAlignment": 2,
"verticalAlignment": 5,
"wordWrap": false
@@ -14701,7 +14701,7 @@
"containerExtending": false,
"left": 632,
"top": 112,
- "width": 85,
+ "width": 107,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -14737,7 +14737,7 @@
"containerExtending": false,
"left": 632,
"top": 137,
- "width": 85,
+ "width": 107,
"height": 10,
"autoResize": false
},
@@ -14761,7 +14761,7 @@
"containerExtending": false,
"left": 632,
"top": 147,
- "width": 85,
+ "width": 107,
"height": 10,
"autoResize": false
},
@@ -14828,7 +14828,7 @@
"containerExtending": false,
"left": 632,
"top": 112,
- "width": 85,
+ "width": 107,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -14886,8 +14886,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 418,
- "top": 307,
+ "left": 402,
+ "top": 309,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14920,8 +14920,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 421,
- "top": 322,
+ "left": 405,
+ "top": 324,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14954,8 +14954,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 411,
- "top": 278,
+ "left": 395,
+ "top": 280,
"width": 0,
"height": 13,
"autoResize": false,
@@ -14987,7 +14987,7 @@
"$ref": "AAAAAAFbgmAJRnJHsH0="
},
"lineStyle": 1,
- "points": "615:254;215:345",
+ "points": "583:258;215:345",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -15029,8 +15029,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 677,
- "top": 186,
+ "left": 673,
+ "top": 189,
"width": 0,
"height": 13,
"autoResize": false,
@@ -15063,8 +15063,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 692,
- "top": 189,
+ "left": 687,
+ "top": 195,
"width": 0,
"height": 13,
"autoResize": false,
@@ -15097,8 +15097,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 648,
- "top": 181,
+ "left": 646,
+ "top": 178,
"width": 0,
"height": 13,
"autoResize": false,
@@ -15130,7 +15130,7 @@
"$ref": "AAAAAAFbgmGMA7e9i94="
},
"lineStyle": 1,
- "points": "669:157;657:223",
+ "points": "675:157;646:223",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -25509,7 +25509,7 @@
"containerExtending": false,
"left": 5,
"top": 22,
- "width": 1127,
+ "width": 1023,
"height": 13,
"autoResize": false,
"underline": false,
@@ -25581,7 +25581,7 @@
"containerExtending": false,
"left": 0,
"top": 15,
- "width": 1137,
+ "width": 1033,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -25656,7 +25656,7 @@
"containerExtending": false,
"left": 0,
"top": 0,
- "width": 1137,
+ "width": 1033,
"height": 625,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -29512,9 +29512,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 45,
+ "left": 73,
"top": 567,
- "width": 85,
+ "width": 57,
"height": 13,
"autoResize": false,
"underline": false,
@@ -29584,9 +29584,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 560,
- "width": 95,
+ "width": 67,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -29620,9 +29620,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 585,
- "width": 95,
+ "width": 67,
"height": 10,
"autoResize": false
},
@@ -29644,9 +29644,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 595,
- "width": 95,
+ "width": 67,
"height": 10,
"autoResize": false
},
@@ -29711,9 +29711,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 560,
- "width": 95,
+ "width": 67,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -29803,9 +29803,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 45,
+ "left": 73,
"top": 463,
- "width": 87,
+ "width": 59,
"height": 13,
"autoResize": false,
"underline": false,
@@ -29875,9 +29875,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 456,
- "width": 97,
+ "width": 69,
"height": 25,
"autoResize": false,
"stereotypeLabel": {
@@ -29911,9 +29911,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 481,
- "width": 97,
+ "width": 69,
"height": 10,
"autoResize": false
},
@@ -29935,9 +29935,9 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 491,
- "width": 97,
+ "width": 69,
"height": 10,
"autoResize": false
},
@@ -30002,9 +30002,9 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 40,
+ "left": 68,
"top": 456,
- "width": 97,
+ "width": 69,
"height": 45,
"autoResize": false,
"stereotypeDisplay": "label",
@@ -30819,7 +30819,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 101,
+ "left": 115,
"top": 523,
"width": 0,
"height": 13,
@@ -30853,7 +30853,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 116,
+ "left": 130,
"top": 523,
"width": 0,
"height": 13,
@@ -30887,7 +30887,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 72,
+ "left": 86,
"top": 524,
"width": 0,
"height": 13,
@@ -30920,7 +30920,7 @@
"$ref": "AAAAAAFbHFy95Zfi54c="
},
"lineStyle": 1,
- "points": "88:501;87:559",
+ "points": "102:501;101:559",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -32248,8 +32248,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1968,
- "top": -1104,
+ "left": 1792,
+ "top": -1168,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32273,8 +32273,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1157,
- "top": 414,
+ "left": 1069,
+ "top": 382,
"width": 199,
"height": 13,
"autoResize": false,
@@ -32299,8 +32299,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1968,
- "top": -1104,
+ "left": 1792,
+ "top": -1168,
"width": 72,
"height": 13,
"autoResize": false,
@@ -32325,8 +32325,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1968,
- "top": -1104,
+ "left": 1792,
+ "top": -1168,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32345,8 +32345,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1152,
- "top": 407,
+ "left": 1064,
+ "top": 375,
"width": 209,
"height": 25,
"autoResize": false,
@@ -32378,8 +32378,8 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 1152,
- "top": 392,
+ "left": 1064,
+ "top": 360,
"width": 209,
"height": 168,
"autoResize": false,
@@ -32428,8 +32428,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 2048,
- "top": -888,
+ "left": 1872,
+ "top": -952,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32453,8 +32453,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1221,
- "top": 463,
+ "left": 1133,
+ "top": 431,
"width": 72,
"height": 13,
"autoResize": false,
@@ -32479,8 +32479,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 2048,
- "top": -888,
+ "left": 1872,
+ "top": -952,
"width": 73,
"height": 13,
"autoResize": false,
@@ -32505,8 +32505,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 2048,
- "top": -888,
+ "left": 1872,
+ "top": -952,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32525,8 +32525,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1216,
- "top": 456,
+ "left": 1128,
+ "top": 424,
"width": 82,
"height": 25,
"autoResize": false,
@@ -32561,8 +32561,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1216,
- "top": 481,
+ "left": 1128,
+ "top": 449,
"width": 82,
"height": 10,
"autoResize": false
@@ -32585,8 +32585,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1216,
- "top": 491,
+ "left": 1128,
+ "top": 459,
"width": 82,
"height": 10,
"autoResize": false
@@ -32609,8 +32609,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1032,
- "top": -392,
+ "left": 944,
+ "top": -424,
"width": 10,
"height": 10,
"autoResize": false
@@ -32633,8 +32633,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1032,
- "top": -392,
+ "left": 944,
+ "top": -424,
"width": 10,
"height": 10,
"autoResize": false
@@ -32652,8 +32652,8 @@
"showShadow": true,
"containerChangeable": true,
"containerExtending": false,
- "left": 1216,
- "top": 456,
+ "left": 1128,
+ "top": 424,
"width": 82,
"height": 45,
"autoResize": false,
@@ -32712,8 +32712,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 864,
- "top": 309,
+ "left": 820,
+ "top": 293,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32746,8 +32746,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 869,
- "top": 295,
+ "left": 825,
+ "top": 279,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32780,8 +32780,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 853,
- "top": 338,
+ "left": 809,
+ "top": 322,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32813,7 +32813,7 @@
"$ref": "AAAAAAFbHFyblZYYzdE="
},
"lineStyle": 1,
- "points": "504:197;1215:463",
+ "points": "503:197;1127:431",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -32855,8 +32855,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 993,
- "top": 306,
+ "left": 949,
+ "top": 291,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32889,8 +32889,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 1000,
- "top": 293,
+ "left": 957,
+ "top": 278,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32923,8 +32923,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 978,
- "top": 333,
+ "left": 934,
+ "top": 316,
"width": 0,
"height": 13,
"autoResize": false,
@@ -32956,7 +32956,7 @@
"$ref": "AAAAAAFbHFyaDpXvuYI="
},
"lineStyle": 1,
- "points": "757:197;1215:455",
+ "points": "754:197;1130:423",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -34269,8 +34269,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 269,
- "top": 384,
+ "left": 270,
+ "top": 386,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34303,8 +34303,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 263,
- "top": 370,
+ "left": 264,
+ "top": 372,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34337,8 +34337,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 280,
- "top": 411,
+ "left": 281,
+ "top": 413,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34372,7 +34372,7 @@
"containerChangeable": false,
"containerExtending": false,
"left": 155,
- "top": 429,
+ "top": 434,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34406,7 +34406,7 @@
"containerChangeable": false,
"containerExtending": false,
"left": 152,
- "top": 416,
+ "top": 421,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34440,7 +34440,7 @@
"containerChangeable": false,
"containerExtending": false,
"left": 161,
- "top": 456,
+ "top": 461,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34473,8 +34473,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 384,
- "top": 338,
+ "left": 386,
+ "top": 339,
"width": 0,
"height": 13,
"autoResize": false,
@@ -34507,7 +34507,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 377,
+ "left": 379,
"top": 327,
"width": 0,
"height": 13,
@@ -34541,7 +34541,7 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 398,
+ "left": 400,
"top": 362,
"width": 0,
"height": 13,
@@ -34622,7 +34622,7 @@
"$ref": "AAAAAAFbHFy95Zfi54c="
},
"lineStyle": 1,
- "points": "137:459;414:349",
+ "points": "137:464;416:349",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
@@ -35532,8 +35532,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 280,
- "top": 411,
+ "left": 281,
+ "top": 413,
"width": 0,
"height": 13,
"autoResize": false,
@@ -35566,8 +35566,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 286,
- "top": 425,
+ "left": 287,
+ "top": 427,
"width": 0,
"height": 13,
"autoResize": false,
@@ -35600,8 +35600,8 @@
"showShadow": true,
"containerChangeable": false,
"containerExtending": false,
- "left": 269,
- "top": 384,
+ "left": 270,
+ "top": 386,
"width": 0,
"height": 13,
"autoResize": false,
@@ -35633,7 +35633,7 @@
"$ref": "AAAAAAFbHFzB0pg0a44="
},
"lineStyle": 1,
- "points": "414:349;137:459",
+ "points": "416:349;137:464",
"stereotypeDisplay": "label",
"showVisibility": true,
"showProperty": true,
diff --git a/doc/UML/1_0_0rc1/UML.pdf b/doc/UML/1_0_0rc3/UML.pdf
similarity index 56%
rename from doc/UML/1_0_0rc1/UML.pdf
rename to doc/UML/1_0_0rc3/UML.pdf
index 0c551505..b643b206 100644
Binary files a/doc/UML/1_0_0rc1/UML.pdf and b/doc/UML/1_0_0rc3/UML.pdf differ
diff --git a/doc/UML/1_0_0rc1/UML.png b/doc/UML/1_0_0rc3/UML.png
similarity index 100%
rename from doc/UML/1_0_0rc1/UML.png
rename to doc/UML/1_0_0rc3/UML.png
diff --git a/doc/demo_overview.md b/doc/demo_overview.md
index eb1fe058..40f3d917 100644
--- a/doc/demo_overview.md
+++ b/doc/demo_overview.md
@@ -7,38 +7,65 @@ In order to learn how to use it, run `./build/examples/openpose/openpose.bin --h
-## Other Important Options
-Please, in order to check all the real time pose demo options and their details, run `./build/examples/openpose/openpose.bin --help`. We describe here some of the most important ones.
+## All Flags
+Each flag is divided into flag name, default value, and description.
-`--video input.mp4`: Input video. If omitted, it will use the webcam.
-
-`--camera 3`: Choose webcam number (default: 0). If `--camera`, `--image_dir` and `--write_video` are omitted, it is equivalent to use `--camera 0`.
-
-`--image_dir path_to_images/`: Run on all images (jpg, png, bmp, etc.) in `path_to_images/`. You can test the program with the image directory `examples/media/`.
-
-`--write_video path.avi`: Render images with this prefix: `path.avi`. You can test the program with the example video `examples/media/video.avi`.
-
-`--write_pose path/`: Output JSON, XML or YML files with the people pose data on the `path/` folder.
-
-`--process_real_time`: It might skip frames in order to keep the final output displaying frames on real time.
-
-`--disable_blending`: If selected, it will only render the pose skeleton or desired heat maps, while blocking the original background. Also related: `part_to_show`, `alpha_pose`, and `alpha_pose`.
-
-`--part_to_show`: Select the prediction channel to visualize (default: 0). 0 to visualize all the body parts, 1-18 for each body part heat map, 19 for the background heat map, 20 for all the body part heat maps together, 21 for all the PAFs, 22-69 for each body part pair PAF.
-
-`--no_display`: Display window not opened. Useful if there is no X server and/or to slightly speed up the processing if visual output is not required.
-
-`--num_gpu 2 --num_gpu_start 0`: Parallelize over this number of GPUs starting by the desired device id. Default is 1 and 0, respectively.
-
-`--num_scales 3 --scale_gap 0.15`: Use 3 scales, 1, (1-0.15), (1-0.15*2). Default is one scale. If you want to change the initial scale, you actually want to multiply your desired initial scale by the `net_resolution`.
-
-`--net_resolution 656x368 --resolution 1280x720`: For HD images and video (default values).
-
-`--net_resolution 496x368 --resolution 640x480`: For VGA images and video.
-
-`--model_pose MPI`: It will use MPI (15 body keypoints). Default: COCO (18 body keypoints). MPI is slightly faster. The variation `MPI_4_layers` sacrifies accuracy in order to further increase speed.
-
-`--logging_level 3`: Logging messages threshold, range [0,255]: 0 will output any message & 255 will output none. Current messages in the range [1-4], 1 for low priority messages and 4 for important ones.
+1. Debugging
+- DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any. Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
+2. Producer
+- DEFINE_int32(camera, 0, "The camera index for cv::VideoCapture. Integer in the range [0, 9].");
+- DEFINE_string(camera_resolution, "1280x720", "Size of the camera frames to ask for.");
+- DEFINE_string(video, "", "Use a video file instead of the camera. Use `examples/media/video.avi` for our default example video.");
+- DEFINE_string(image_dir, "", "Process a directory of images. Use `examples/media/` for our default example folder with 20 images.");
+- DEFINE_uint64(frame_first, 0, "Start on desired frame number.");
+- DEFINE_uint64(frame_last, -1, "Finish on desired frame number. Select -1 to disable this option.");
+- DEFINE_bool(frame_flip, false, "Flip/mirror each frame (e.g. for real time webcam demonstrations).");
+- DEFINE_int32(frame_rotate, 0, "Rotate each frame, 4 possible values: 0, 90, 180, 270.");
+- DEFINE_bool(frames_repeat, false, "Repeat frames when finished.");
+3. OpenPose
+- DEFINE_string(model_folder, "models/", "Folder where the pose models (COCO and MPI) are located.");
+- DEFINE_string(resolution, "1280x720", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the default images resolution.");
+- DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your machine.");
+- DEFINE_int32(num_gpu_start, 0, "GPU device start number.");
+- DEFINE_int32(keypoint_scale, 0, "Scaling of the (x,y) coordinates of the final pose data array, i.e. the scale of the (x,y) coordinates that will be saved with the `write_keypoint` & `write_keypoint_json` flags. Select `0` to scale it to the original source resolution, `1`to scale it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with `resolution`), `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
+4. OpenPose Body Pose
+- DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
+- DEFINE_string(net_resolution, "656x368", "Multiples of 16. If it is increased, the accuracy usually increases. If it is decreased, the speed increases.");
+- DEFINE_int32(num_scales, 1, "Number of scales to average.");
+- DEFINE_double(scale_gap, 0.3, "Scale gap between scales. No effect unless num_scales>1. Initial scale is always 1. If you want to change the initial scale, you actually want to multiply the `net_resolution` by your desired initial scale.");
+- DEFINE_bool(heatmaps_add_parts, false, "If true, it will add the body part heatmaps to the final op::Datum::poseHeatMaps array (program speed will decrease). Not required for our library, enable it only if you intend to process this information later. If more than one `add_heatmaps_X` flag is enabled, it will place then in sequential memory order: body parts + bkg + PAFs. It will follow the order on POSE_BODY_PART_MAPPING in `include/openpose/pose/poseParameters.hpp`.");
+- DEFINE_bool(heatmaps_add_bkg, false, "Same functionality as `add_heatmaps_parts`, but adding the heatmap corresponding to background.");
+- DEFINE_bool(heatmaps_add_PAFs, false, "Same functionality as `add_heatmaps_parts`, but adding the PAFs.");
+5. OpenPose Face
+- DEFINE_bool(face, false, "Enables face keypoint detection. It will share some parameters from the body pose, e.g. `model_folder`.");
+- DEFINE_string(face_net_resolution, "368x368", "Multiples of 16. Analogous to `net_resolution` but applied to the face keypoint detector. 320x320 usually works fine while giving a substantial speed up when multiple faces on the image.");
+6. OpenPose Hand
+7. OpenPose Rendering
+- DEFINE_int32(part_to_show, 0, "Part to show from the start.");
+- DEFINE_bool(disable_blending, false, "If blending is enabled, it will merge the results with the original frame. If disabled, it will only display the results.");
+8. OpenPose Rendering Pose
+- DEFINE_bool(no_render_pose, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown. If true, it will leave them empty.");
+- DEFINE_double(alpha_pose, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
+- DEFINE_double(alpha_heatmap, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
+9. OpenPose Rendering Face
+- DEFINE_bool(no_render_face, false, "Analogous to `no_render_pose` but applied to the face keypoints and heat maps.");
+- DEFINE_double(alpha_face, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
+- DEFINE_double(alpha_heatmap_face, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
+10. Display
+- DEFINE_bool(fullscreen, false, "Run in full-screen mode (press f during runtime to toggle).");
+- DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is too long, it will skip frames. If it is too fast, it will slow it down.");
+- DEFINE_bool(no_gui_verbose, false, "Do not write text on output images on GUI (e.g. number of current frame and people). It does not affect the pose rendering.");
+- DEFINE_bool(no_display, false, "Do not open a display window.");
+11. Result Saving
+- DEFINE_string(write_images, "", "Directory to write rendered frames in `write_images_format` image format.");
+- DEFINE_string(write_images_format, "png", "File extension and format for `write_images`, e.g. png, jpg or bmp. Check the OpenCV function cv::imwrite for all compatible extensions.");
+- DEFINE_string(write_video, "", "Full file path to write rendered frames in motion JPEG video format. It might fail if the final path does not finish in `.avi`. It internally uses cv::VideoWriter.");
+- DEFINE_string(write_keypoint, "", "Directory to write the people body pose keypoint data. Desired format on `write_keypoint_format`.");
+- DEFINE_string(write_keypoint_format, "yml", "File extension and format for `write_keypoint`: json, xml, yaml and yml. Json not available for OpenCV < 3.0, use `write_keypoint_json` instead.");
+- DEFINE_string(write_keypoint_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
+- DEFINE_string(write_coco_json, "", "Full file path to write people pose data with *.json COCO validation format.");
+- DEFINE_string(write_heatmaps, "", "Directory to write heatmaps with *.png format. At least 1 `add_heatmaps_X` flag must be enabled.");
+- DEFINE_string(write_heatmaps_format, "png", "File extension and format for `write_heatmaps`, analogous to `write_images_format`. Recommended `png` or any compressed and lossless format.");
## Multiple Scales
Running at multiple scales might drastically slow down the speed, but it will increase the accuracy. Given the CNN input size (set with `net_resolution`), `num_scales` and `scale_gap` configure the number of scales to use and the gap between them, respectively. For instance, `--num_scales 3 --scale_gap 0.15` means using 3 scales at resolution: (1), (1-0.15) and (1-2*0.15) times the `net_resolution`.
@@ -51,6 +78,36 @@ The following command will save all the body part heat maps, background heat map
+## Some Important Configuration Flags
+Please, in order to check all the real time pose demo options and their details, run `./build/examples/openpose/openpose.bin --help`. We describe here some of the most important ones.
+
+- `--face`: If enabled, it will also detect the faces on the image. Note that this will considerable slow down the performance and increse the required GPU memory. In addition, the greater number of people on the image, the slower OpenPose will be.
+- `--video input.mp4`: Input video. If omitted, it will use the webcam.
+- `--camera 3`: Choose webcam number (default: 0). If `--camera`, `--image_dir` and `--write_video` are omitted, it is equivalent to use `--camera 0`.
+- `--image_dir path_to_images/`: Run on all images (jpg, png, bmp, etc.) in `path_to_images/`. You can test the program with the image directory `examples/media/`.
+- `--write_video path.avi`: Render images with this prefix: `path.avi`. You can test the program with the example video `examples/media/video.avi`.
+- `--write_images folder_path`: Render images on the folder `folder_path`.
+- `--write_keypoint path/`: Output JSON, XML or YML files with the people pose data on the `path/` folder.
+- `--process_real_time`: It might skip frames in order to keep the final output displaying frames on real time.
+- `--disable_blending`: If selected, it will only render the pose skeleton or desired heat maps, while blocking the original background. Also related: `part_to_show`, `alpha_pose`, and `alpha_pose`.
+- `--part_to_show`: Select the prediction channel to visualize (default: 0). 0 to visualize all the body parts, 1-18 for each body part heat map, 19 for the background heat map, 20 for all the body part heat maps together, 21 for all the PAFs, 22-69 for each body part pair PAF.
+- `--no_display`: Display window not opened. Useful if there is no X server and/or to slightly speed up the processing if visual output is not required.
+- `--num_gpu 2 --num_gpu_start 0`: Parallelize over this number of GPUs starting by the desired device id. Default is 1 and 0, respectively.
+- `--num_scales 3 --scale_gap 0.15`: Use 3 scales, 1, (1-0.15), (1-0.15*2). Default is one scale. If you want to change the initial scale, you actually want to multiply your desired initial scale by the `net_resolution`.
+- `--net_resolution 656x368 --resolution 1280x720`: For HD images and video (default values).
+- `--net_resolution 496x368 --resolution 640x480`: For VGA images and video.
+- `--model_pose MPI`: It will use MPI (15 body keypoints). Default: COCO (18 body keypoints). MPI is slightly faster. The variation `MPI_4_layers` sacrifies accuracy in order to further increase speed.
+- `--logging_level 3`: Logging messages threshold, range [0,255]: 0 will output any message & 255 will output none. Current messages in the range [1-4], 1 for low priority messages and 4 for important ones.
+
+
+
+## Rendering Face without Pose
+```
+./build/examples/openpose/openpose.bin --face --no_render_pose
+```
+
+
+
## Example
The following example runs the video `vid.mp4`, renders image frames on `output/result.avi`, and outputs JSON files as `output/%12d.json`, parallelizing over 2 GPUs:
```
diff --git a/doc/installation.md b/doc/installation.md
index 004c3f5b..fc3fb1e5 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -181,6 +181,20 @@ bin\OpenPoseDemo.exe --image_dir examples/media/
windows_project\x64\Release\OpenPoseDemo.exe --image_dir examples/media/
```
+**4. Body Pose and Face Keypoint Detector (e.g. on Video)**
+```
+# Ubuntu
+./build/examples/openpose/openpose.bin --video examples/media/video.avi --face
+```
+```
+:: Windows - Demo
+bin\OpenPoseDemo.exe --video examples/media/video.avi --face
+```
+```
+:: Windows - Library
+windows_project\x64\Release\OpenPoseDemo.exe --video examples/media/video.avi --face
+```
+
The visual GUI should show the original image with the poses blended on it, similarly to the pose of this gif:
diff --git a/doc/library_overview.md b/doc/library_overview.md
index 1b09fd19..7dd47775 100644
--- a/doc/library_overview.md
+++ b/doc/library_overview.md
@@ -180,7 +180,7 @@ The human body pose detection is wrapped into the `WPoseExtractor` worker and
Currently, only `PoseExtractorCaffe` is implemented, which uses the Caffe framework. We might add other famous frameworks later (e.g. Torch or TensorFlow). If you compile our library with any other framework, please email us or make a pull request! We are really interested in adding any other Deep Net framework, and the code is mostly prepared for it. Just create the equivalent `PoseExtractorDesiredFramework` and make the pull request!
#### Constructor
-In order to be initialized, `PoseExtractorCaffe` has the following constructor and parameters: `PoseExtractorCaffe(const cv::Size& netInputSize, const cv::Size& netOutputSize, const cv::Size& outputSize, const int scaleNumber, const double scaleGap, const PoseModel poseModel, const std::string& modelsFolder, const int gpuId)`.
+In order to be initialized, `PoseExtractorCaffe` has the following constructor and parameters: `PoseExtractorCaffe(const Point& netInputSize, const Point& netOutputSize, const Point& outputSize, const int scaleNumber, const double scaleGap, const PoseModel poseModel, const std::string& modelsFolder, const int gpuId)`.
1. `netInputSize` is the resolution of the first layer of the deep net. I.e., the frames given to this class must have that size.
@@ -199,7 +199,7 @@ In order to be initialized, `PoseExtractorCaffe` has the following constructor a
#### Detect Human Pose
In order to detect the human pose:
-1. First run the deep net over the desired target image, by using `forwardPass(const Array& inputNetData, const cv::Size& inputDataSize)`. `inputNetData` is the input image scaled to `netInputSize`, while `inputDataSize` indicates the original frame resolution before being rescaled to `netInputSize` (this is required given that we resize the images keeping the original aspect ratio).
+1. First run the deep net over the desired target image, by using `forwardPass(const Array& inputNetData, const Point& inputDataSize)`. `inputNetData` is the input image scaled to `netInputSize`, while `inputDataSize` indicates the original frame resolution before being rescaled to `netInputSize` (this is required given that we resize the images keeping the original aspect ratio).
2. After, you can choose either to get:
1. The people pose as a op::Array: `Array getPose()`.
@@ -213,13 +213,13 @@ Due to performance reasons, we only copy the people pose data given by `getPose(
After estimating the pose, you usually desired to visualize it. `PoseRenderer` does this work for you.
#### Constructor
-In order to be initialized, `PoseRenderer` has the following constructor and parameters: `PoseRenderer(const cv::Size& netOutputSize, const cv::Size& outputSize, const PoseModel poseModel, const std::shared_ptr& poseExtractor, const float alphaPose, const float alphaHeatmap)`.
+In order to be initialized, `PoseRenderer` has the following constructor and parameters: `PoseRenderer(const Point& netOutputSize, const Point& outputSize, const PoseModel poseModel, const std::shared_ptr& poseExtractor, const float alphaKeypoint, const float alphaHeatMap)`.
1. `netOutputSize`, `outputSize` and `poseModel` are the same as the ones used for `PoseExtractorCaffe`.
2. `poseExtractor` is the pose extractor used previously. It is only used for heatmap and PAFs rendering, since the GPU data is not copied to `op::Datum` for performance purposes. If any of the heatmaps are gonna be rendered, `PoseRenderer` must be placed in the same thread as `PoseExtractor`. Otherwise, it will throw a runtime exception.
-3. `alphaPose` and `alphaHeatMap` controls the blending coefficient between original frame and rendered pose or heatmap/PAF respectively. A value `alphaPose = 1` will render the pose with no transparency at all, while `alphaPose = 0` will not be visible. In addition, `alphaHeatMap = 1` would only show the heatmap, while `alphaHeatMap = 0` would only show the original frame.
+3. `alphaKeypoint` and `alphaHeatMap` controls the blending coefficient between original frame and rendered pose or heatmap/PAF respectively. A value `alphaKeypoint = 1` will render the pose with no transparency at all, while `alphaKeypoint = 0` will not be visible. In addition, `alphaHeatMap = 1` would only show the heatmap, while `alphaHeatMap = 0` would only show the original frame.
#### Render Human Pose
In order to render the detected human pose, run `std::pair renderPose(Array& outputData, const Array& pose, const double scaleNetToOutput)`.
diff --git a/doc/media/keypoints_face.png b/doc/media/keypoints_face.png
new file mode 100644
index 00000000..4af4f179
Binary files /dev/null and b/doc/media/keypoints_face.png differ
diff --git a/doc/media/keypoints_pose.png b/doc/media/keypoints_pose.png
new file mode 100644
index 00000000..10dd473c
Binary files /dev/null and b/doc/media/keypoints_pose.png differ
diff --git a/doc/media/paf_heat_maps.png b/doc/media/paf_heat_maps.png
index 90d40443..ca2ebc45 100644
Binary files a/doc/media/paf_heat_maps.png and b/doc/media/paf_heat_maps.png differ
diff --git a/doc/release_notes.md b/doc/release_notes.md
new file mode 100644
index 00000000..1def04c5
--- /dev/null
+++ b/doc/release_notes.md
@@ -0,0 +1,43 @@
+OpenPose Library - Release Notes
+====================================
+
+
+
+## OpenPose 1.0.0rc1
+1. Initial version, main functionality:
+ 1. Body keypoint detection and rendering on Ubuntu 14 and 16.
+ 2. It can read an image directory, video or webcam.
+ 3. It can display the results or storing them on disk.
+
+
+
+## OpenPose 1.0.0rc2
+1. Main improvements:
+ 1. Rendering max resolution from 720p to >32k images.
+ 2. Highly improved documentation.
+2. Functions or paremeters renamed:
+ 1. Demo renamed from rtpose to openpose.
+3. Main bugs fixed:
+ 1. Demo uses exec instead of start, so it works with more OpenCV custom compiled versions.
+
+
+
+## OpenPose 1.0.0rc3
+1. Main improvements:
+ 1. Added face keypoint detection.
+ 2. Added Windows 10 compatibily.
+ 3. Auto-detection of the number of GPUs.
+ 4. MPI visualization more similar to COCO one.
+ 5. Rendering max resolution from 720p to >32k images.
+ 6. GUI info adder working when the worker TDatum has more than 1 Datum.
+ 7. It prints out the error description before throwing the exception (so that it is writen on the Windows cmd).
+ 8. Highly improved documentation.
+2. Functions or paremeters renamed:
+ 1. Flag `write_pose` renamed as `write_keypoint` and it also applies to face and/or hands.
+ 2. Flag `write_pose_json` renamed as `write_keypoint_json` and it also applies to face and/or hands.
+ 3. Flag `write_pose_format` renamed as `write_keypoint_format` and it also applies to face and/or hands.
+ 4. PoseSaver and its JSON variant renamed as KeypointSaver.
+ 5. PoseJsonCocoSaver renamed as CocoJsonSaver.
+3. Main bugs fixed:
+ 1. All visualization functions moved to same thread, so it works with most OpenCV custom compiled versions.
+ 2. Fixed error on debug mode: `Too many resources requested for launch`.
diff --git a/examples/openpose/openpose.cpp b/examples/openpose/openpose.cpp
index 3bc81549..02c2193a 100755
--- a/examples/openpose/openpose.cpp
+++ b/examples/openpose/openpose.cpp
@@ -2,11 +2,12 @@
// If the user wants to learn to use the OpenPose library, we highly recommend to start with the `examples/tutorial_*/` folders.
// This example summarizes all the funcitonality of the OpenPose library:
// 1. Read folder of images / video / webcam (`producer` module)
- // 2. Extract and render pose / heatmap / PAF of that image (`pose` module)
- // 3. Save the results on disc (`filestream` module)
- // 4. Display the rendered pose (`gui` module)
+ // 2. Extract and render body keypoint / heatmap / PAF of that image (`pose` module)
+ // 3. Extract and render face keypoint / heatmap / PAF of that image (`face` module)
+ // 4. Save the results on disc (`filestream` module)
+ // 5. Display the rendered pose (`gui` module)
// Everything in a multi-thread scenario (`thread` module)
- // Points 2 to 4 are included in the `wrapper` module
+ // Points 2 to 5 are included in the `wrapper` module
// In addition to the previous OpenPose modules, we also need to use:
// 1. `core` module:
// For the Array class that the `pose` module needs
@@ -21,11 +22,9 @@
#include // std::string
#include // std::this_thread
#include // std::vector
-// OpenCV dependencies
-#include // cv::Mat & cv::Size
// Other 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
// Option a) Importing all modules
@@ -33,6 +32,7 @@
// Option b) Manually importing the desired modules. Recommended if you only intend to use a few modules.
// #include
// #include
+// #include
// #include
// #include
// #include
@@ -41,13 +41,9 @@
// #include
// #include
-// Uncomment to avoid needing `op::` before each class and function of the OpenPose library. Analogously for OpenCV and the standard C++ library
-// using namespace op;
-// using namespace cv;
-// using namespace std;
-
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -62,47 +58,59 @@ DEFINE_bool(frame_flip, false, "Flip/mirror each frame
DEFINE_int32(frame_rotate, 0, "Rotate each frame, 4 possible values: 0, 90, 180, 270.");
DEFINE_bool(frames_repeat, false, "Repeat frames when finished.");
// OpenPose
-DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
DEFINE_string(model_folder, "models/", "Folder where the pose models (COCO and MPI) are located.");
-DEFINE_string(net_resolution, "656x368", "Multiples of 16.");
DEFINE_string(resolution, "1280x720", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the default images resolution.");
-DEFINE_int32(num_gpu, 1, "The number of GPU devices to use.");
+DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your machine.");
DEFINE_int32(num_gpu_start, 0, "GPU device start number.");
+DEFINE_int32(keypoint_scale, 0, "Scaling of the (x,y) coordinates of the final pose data array, i.e. the scale of the (x,y) coordinates that will be saved"
+ " with the `write_keypoint` & `write_keypoint_json` flags. Select `0` to scale it to the original source resolution, `1`to scale"
+ " it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with `resolution`),"
+ " `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
+// OpenPose Body Pose
+DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
+DEFINE_string(net_resolution, "656x368", "Multiples of 16. If it is increased, the accuracy usually increases. If it is decreased, the speed increases.");
DEFINE_int32(num_scales, 1, "Number of scales to average.");
DEFINE_double(scale_gap, 0.3, "Scale gap between scales. No effect unless num_scales>1. Initial scale is always 1. If you want to change the initial scale,"
" you actually want to multiply the `net_resolution` by your desired initial scale.");
-DEFINE_int32(scale_mode, 0, "Scaling of the (x,y) coordinates of the final pose data array (op::Datum::pose), i.e. the scale of the (x,y) coordinates that"
- " will be saved with the `write_pose` & `write_pose_json` flags. Select `0` to scale it to the original source resolution, `1`"
- " to scale it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with "
- " `resolution`), `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
DEFINE_bool(heatmaps_add_parts, false, "If true, it will add the body part heatmaps to the final op::Datum::poseHeatMaps array (program speed will decrease). Not"
" required for our library, enable it only if you intend to process this information later. If more than one `add_heatmaps_X`"
" flag is enabled, it will place then in sequential memory order: body parts + bkg + PAFs. It will follow the order on"
" POSE_BODY_PART_MAPPING in `include/openpose/pose/poseParameters.hpp`.");
DEFINE_bool(heatmaps_add_bkg, false, "Same functionality as `add_heatmaps_parts`, but adding the heatmap corresponding to background.");
DEFINE_bool(heatmaps_add_PAFs, false, "Same functionality as `add_heatmaps_parts`, but adding the PAFs.");
+// OpenPose Face
+DEFINE_bool(face, false, "Enables face keypoint detection. It will share some parameters from the body pose, e.g. `model_folder`.");
+DEFINE_string(face_net_resolution, "368x368", "Multiples of 16. Analogous to `net_resolution` but applied to the face keypoint detector. 320x320 usually works fine"
+ " while giving a substantial speed up when multiple faces on the image.");
+// OpenPose Hand
// OpenPose Rendering
-DEFINE_bool(no_render_output, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown."
- " If true, it will leave them empty.");
DEFINE_int32(part_to_show, 0, "Part to show from the start.");
DEFINE_bool(disable_blending, false, "If blending is enabled, it will merge the results with the original frame. If disabled, it will only display the results.");
+// OpenPose Rendering Pose
+DEFINE_bool(no_render_pose, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown."
+ " If true, it will leave them empty.");
DEFINE_double(alpha_pose, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
DEFINE_double(alpha_heatmap, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
-// Consumer
+// OpenPose Rendering Face
+DEFINE_bool(no_render_face, false, "Analogous to `no_render_pose` but applied to the face keypoints and heat maps.");
+DEFINE_double(alpha_face, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
+DEFINE_double(alpha_heatmap_face, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
+// Display
DEFINE_bool(fullscreen, false, "Run in full-screen mode (press f during runtime to toggle).");
DEFINE_bool(process_real_time, false, "Enable to keep the original source frame rate (e.g. for video). If the processing time is too long, it will skip frames. If it is"
" too fast, it will slow it down.");
DEFINE_bool(no_gui_verbose, false, "Do not write text on output images on GUI (e.g. number of current frame and people). It does not affect the pose rendering.");
DEFINE_bool(no_display, false, "Do not open a display window.");
+// Result Saving
DEFINE_string(write_images, "", "Directory to write rendered frames in `write_images_format` image format.");
DEFINE_string(write_images_format, "png", "File extension and format for `write_images`, e.g. png, jpg or bmp. Check the OpenCV function cv::imwrite"
" for all compatible extensions.");
DEFINE_string(write_video, "", "Full file path to write rendered frames in motion JPEG video format. It might fail if the final path does"
" not finish in `.avi`. It internally uses cv::VideoWriter.");
-DEFINE_string(write_pose, "", "Directory to write the people pose data. Desired format on `write_pose_format`.");
-DEFINE_string(write_pose_format, "yml", "File extension and format for `write_pose`: json, xml, yaml and yml. Json not available for OpenCV < 3.0,"
- " use `write_pose_json` instead.");
-DEFINE_string(write_pose_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
+DEFINE_string(write_keypoint, "", "Directory to write the people body pose keypoint data. Desired format on `write_keypoint_format`.");
+DEFINE_string(write_keypoint_format, "yml", "File extension and format for `write_keypoint`: json, xml, yaml and yml. Json not available for OpenCV < 3.0,"
+ " use `write_keypoint_json` instead.");
+DEFINE_string(write_keypoint_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
DEFINE_string(write_coco_json, "", "Full file path to write people pose data with *.json COCO validation format.");
DEFINE_string(write_heatmaps, "", "Directory to write heatmaps with *.png format. At least 1 `add_heatmaps_X` flag must be enabled.");
DEFINE_string(write_heatmaps_format, "png", "File extension and format for `write_heatmaps`, analogous to `write_images_format`. Recommended `png` or any compressed and"
@@ -124,18 +132,18 @@ op::PoseModel gflagToPoseModel(const std::string& poseModeString)
}
}
-op::ScaleMode gflagToScaleMode(const int scaleMode)
+op::ScaleMode gflagToScaleMode(const int keypointScale)
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
- if (scaleMode == 0)
+ if (keypointScale == 0)
return op::ScaleMode::InputResolution;
- else if (scaleMode == 1)
+ else if (keypointScale == 1)
return op::ScaleMode::NetOutputResolution;
- else if (scaleMode == 2)
+ else if (keypointScale == 2)
return op::ScaleMode::OutputResolution;
- else if (scaleMode == 3)
+ else if (keypointScale == 3)
return op::ScaleMode::ZeroToOne;
- else if (scaleMode == 4)
+ else if (keypointScale == 4)
return op::ScaleMode::PlusMinusOne;
else
{
@@ -166,7 +174,7 @@ op::ProducerType gflagsToProducerType(const std::string& imageDirectory, const s
return op::ProducerType::Webcam;
}
-std::shared_ptr gflagsToProducer(const std::string& imageDirectory, const std::string& videoPath, const int webcamIndex, const cv::Size webcamResolution)
+std::shared_ptr gflagsToProducer(const std::string& imageDirectory, const std::string& videoPath, const int webcamIndex, const op::Point webcamResolution)
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
const auto type = gflagsToProducerType(imageDirectory, videoPath, webcamIndex);
@@ -198,31 +206,35 @@ std::vector gflagToHeatMaps(const bool heatmaps_add_parts, cons
}
// Google flags into program variables
-std::tuple, op::PoseModel, op::ScaleMode, std::vector> gflagsToOpParameters()
+std::tuple, op::Point, op::Point, op::Point, std::shared_ptr, op::PoseModel, op::ScaleMode, std::vector> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// cameraFrameSize
- cv::Size cameraFrameSize;
- auto nRead = sscanf(FLAGS_camera_resolution.c_str(), "%dx%d", &cameraFrameSize.width, &cameraFrameSize.height);
+ op::Point cameraFrameSize;
+ auto nRead = sscanf(FLAGS_camera_resolution.c_str(), "%dx%d", &cameraFrameSize.x, &cameraFrameSize.y);
op::checkE(nRead, 2, "Error, camera resolution format (" + FLAGS_camera_resolution + ") invalid, should be e.g., 1280x720", __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// netInputSize
- cv::Size netInputSize;
- nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.width, &netInputSize.height);
+ op::Point netInputSize;
+ nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.x, &netInputSize.y);
op::checkE(nRead, 2, "Error, net resolution format (" + FLAGS_net_resolution + ") invalid, should be e.g., 656x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
+ // faceNetInputSize
+ op::Point faceNetInputSize;
+ nRead = sscanf(FLAGS_face_net_resolution.c_str(), "%dx%d", &faceNetInputSize.x, &faceNetInputSize.y);
+ op::checkE(nRead, 2, "Error, face net resolution format (" + FLAGS_face_net_resolution + ") invalid, should be e.g., 368x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
// producerType
const auto producerSharedPtr = gflagsToProducer(FLAGS_image_dir, FLAGS_video, FLAGS_camera, cameraFrameSize);
// poseModel
const auto poseModel = gflagToPoseModel(FLAGS_model_pose);
- // scaleMode
- const auto scaleMode = gflagToScaleMode(FLAGS_scale_mode);
+ // keypointScale
+ const auto keypointScale = gflagToScaleMode(FLAGS_keypoint_scale);
// heatmaps to add
const auto heatMapTypes = gflagToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs);
// Return
- return std::make_tuple(cameraFrameSize, outputSize, netInputSize, producerSharedPtr, poseModel, scaleMode, heatMapTypes);
+ return std::make_tuple(cameraFrameSize, outputSize, netInputSize, faceNetInputSize, producerSharedPtr, poseModel, keypointScale, heatMapTypes);
}
int opRealTimePoseDemo()
@@ -236,35 +248,41 @@ int opRealTimePoseDemo()
const auto timerBegin = std::chrono::high_resolution_clock::now();
// Applying user defined configuration
- cv::Size cameraFrameSize;
- cv::Size outputSize;
- cv::Size netInputSize;
+ op::Point cameraFrameSize;
+ op::Point outputSize;
+ op::Point netInputSize;
+ op::Point faceNetInputSize;
std::shared_ptr producerSharedPtr;
op::PoseModel poseModel;
- op::ScaleMode scaleMode;
+ op::ScaleMode keypointScale;
std::vector heatMapTypes;
- std::tie(cameraFrameSize, outputSize, netInputSize, producerSharedPtr, poseModel, scaleMode, heatMapTypes) = gflagsToOpParameters();
+ std::tie(cameraFrameSize, outputSize, netInputSize, faceNetInputSize, producerSharedPtr, poseModel, keypointScale, heatMapTypes) = gflagsToOpParameters();
// OpenPose wrapper
op::log("Configuring OpenPose wrapper.", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
op::Wrapper> opWrapper;
- const op::WrapperStructPose wrapperStructPose{netInputSize, outputSize, scaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_num_scales, (float)FLAGS_scale_gap,
- !FLAGS_no_render_output, poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap,
+ // Pose configuration (use WrapperStructPose{} for default and recommended configuration)
+ const op::WrapperStructPose wrapperStructPose{netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_num_scales, (float)FLAGS_scale_gap,
+ !FLAGS_no_render_pose, poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap,
FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, op::ScaleMode::UnsignedChar};
+ // (Experimental, function and class names might change in next versions) Face configuration (use op::WrapperStructFace{} to disable it)
+ const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, !FLAGS_no_render_face, (float)FLAGS_alpha_face, (float)FLAGS_alpha_heatmap_face};
+ // (Experimental, function and class names might change in next versions) Hand configuration (use op::WrapperStructFace{} to disable it)
+ const op::experimental::WrapperStructHand wrapperStructHand{false};
+ // Producer (use default to disable any input)
const op::WrapperStructInput wrapperStructInput{producerSharedPtr, FLAGS_frame_first, FLAGS_frame_last, FLAGS_process_real_time, FLAGS_frame_flip,
FLAGS_frame_rotate, FLAGS_frames_repeat};
- const op::WrapperStructOutput wrapperStructOutput{!FLAGS_no_display, !FLAGS_no_gui_verbose, FLAGS_fullscreen, FLAGS_write_pose, op::stringToDataFormat(FLAGS_write_pose_format),
- FLAGS_write_pose_json, FLAGS_write_coco_json, FLAGS_write_images, FLAGS_write_images_format, FLAGS_write_video,
- FLAGS_write_heatmaps, FLAGS_write_heatmaps_format};
- // Pose configuration (use WrapperStructPose{} for default and recommended configuration)
- // Producer (use default to disable any input)
// Consumer (comment or use default argument to disable any output)
- opWrapper.configure(wrapperStructPose, wrapperStructInput, wrapperStructOutput);
+ const op::WrapperStructOutput wrapperStructOutput{!FLAGS_no_display, !FLAGS_no_gui_verbose, FLAGS_fullscreen, FLAGS_write_keypoint, op::stringToDataFormat(FLAGS_write_keypoint_format),
+ FLAGS_write_keypoint_json, FLAGS_write_coco_json, FLAGS_write_images, FLAGS_write_images_format, FLAGS_write_video,
+ FLAGS_write_heatmaps, FLAGS_write_heatmaps_format};
+ // Configure wrapper
+ opWrapper.configure(wrapperStructPose, wrapperStructFace, wrapperStructHand, wrapperStructInput, wrapperStructOutput);
// Set to single-thread running (e.g. for debugging purposes)
// opWrapper.disableMultiThreading();
// Start processing
- // Two different ways of running the program on multithread enviroment
+ // Two different ways of running the program on multithread environment
op::log("Starting thread(s)", op::Priority::Max);
// Option a) Recommended - Also using the main thread (this thread) for processing (it saves 1 thread)
// Start, run & stop threads
diff --git a/examples/tutorial_pose/1_extract_from_image.cpp b/examples/tutorial_pose/1_extract_from_image.cpp
index ddc7d43a..c23fb89c 100644
--- a/examples/tutorial_pose/1_extract_from_image.cpp
+++ b/examples/tutorial_pose/1_extract_from_image.cpp
@@ -10,7 +10,7 @@
// 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
#include
#include
@@ -18,8 +18,9 @@
#include
#include
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -28,7 +29,7 @@ DEFINE_string(image_path, "examples/media/COCO_val2014_00000000019
// OpenPose
DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
DEFINE_string(model_folder, "models/", "Folder where the pose models (COCO and MPI) are located.");
-DEFINE_string(net_resolution, "656x368", "Multiples of 16.");
+DEFINE_string(net_resolution, "656x368", "Multiples of 16. If it is increased, the accuracy usually increases. If it is decreased, the speed increases.");
DEFINE_string(resolution, "1280x720", "The image resolution (display). Use \"-1x-1\" to force the program to use the default images resolution.");
DEFINE_int32(num_gpu_start, 0, "GPU device start number.");
DEFINE_double(scale_gap, 0.3, "Scale gap between scales. No effect unless num_scales>1. Initial scale is always 1. If you want to change the initial scale, "
@@ -54,16 +55,16 @@ op::PoseModel gflagToPoseModel(const std::string& poseModeString)
}
// Google flags into program variables
-std::tuple gflagsToOpParameters()
+std::tuple, op::Point, op::Point, op::PoseModel> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// netInputSize
- cv::Size netInputSize;
- nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.width, &netInputSize.height);
+ op::Point netInputSize;
+ nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.x, &netInputSize.y);
op::checkE(nRead, 2, "Error, net resolution format (" + FLAGS_net_resolution + ") invalid, should be e.g., 656x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
// netOutputSize
const auto netOutputSize = netInputSize;
@@ -89,9 +90,9 @@ int openPoseTutorialPose1()
op::check(0 <= FLAGS_logging_level && FLAGS_logging_level <= 255, "Wrong logging_level value.", __LINE__, __FUNCTION__, __FILE__);
op::ConfigureLog::setPriorityThreshold((op::Priority)FLAGS_logging_level);
// Step 2 - Read Google flags (user defined configuration)
- cv::Size outputSize;
- cv::Size netInputSize;
- cv::Size netOutputSize;
+ op::Point outputSize;
+ op::Point netInputSize;
+ op::Point netOutputSize;
op::PoseModel poseModel;
std::tie(outputSize, netInputSize, netOutputSize, poseModel) = gflagsToOpParameters();
// Step 3 - Initialize all required classes
@@ -101,7 +102,7 @@ int openPoseTutorialPose1()
FLAGS_model_folder, FLAGS_num_gpu_start};
op::PoseRenderer poseRenderer{netOutputSize, outputSize, poseModel, nullptr, (float)FLAGS_alpha_pose};
op::OpOutputToCvMat opOutputToCvMat{outputSize};
- const cv::Size windowedSize = outputSize;
+ const op::Point windowedSize = outputSize;
op::FrameDisplayer frameDisplayer{windowedSize, "OpenPose Tutorial - Example 1"};
// Step 4 - Initialize resources on desired thread (in this case single thread, i.e. we init resources here)
poseExtractorCaffe.initializationOnThread();
@@ -117,11 +118,11 @@ int openPoseTutorialPose1()
double scaleInputToOutput;
op::Array outputArray;
std::tie(scaleInputToOutput, outputArray) = cvMatToOpOutput.format(inputImage);
- // Step 3 - Estimate poseKeyPoints
- poseExtractorCaffe.forwardPass(netInputArray, inputImage.size());
- const auto poseKeyPoints = poseExtractorCaffe.getPoseKeyPoints();
- // Step 4 - Render poseKeyPoints
- poseRenderer.renderPose(outputArray, poseKeyPoints);
+ // Step 3 - Estimate poseKeypoints
+ poseExtractorCaffe.forwardPass(netInputArray, {inputImage.cols, inputImage.rows});
+ const auto poseKeypoints = poseExtractorCaffe.getPoseKeypoints();
+ // Step 4 - Render poseKeypoints
+ poseRenderer.renderPose(outputArray, poseKeypoints);
// Step 5 - OpenPose output format to cv::Mat
auto outputImage = opOutputToCvMat.formatToCvMat(outputArray);
diff --git a/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp b/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp
index 0c429160..52fadcaf 100644
--- a/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp
+++ b/examples/tutorial_pose/2_extract_pose_or_heatmat_from_image.cpp
@@ -10,7 +10,7 @@
// 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
#include
#include
@@ -18,8 +18,9 @@
#include
#include
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -28,7 +29,7 @@ DEFINE_string(image_path, "examples/media/COCO_val2014_00000000019
// OpenPose
DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
DEFINE_string(model_folder, "models/", "Folder where the pose models (COCO and MPI) are located.");
-DEFINE_string(net_resolution, "656x368", "Multiples of 16.");
+DEFINE_string(net_resolution, "656x368", "Multiples of 16. If it is increased, the accuracy usually increases. If it is decreased, the speed increases.");
DEFINE_string(resolution, "1280x720", "The image resolution (display). Use \"-1x-1\" to force the program to use the default images resolution.");
DEFINE_int32(num_gpu_start, 0, "GPU device start number.");
DEFINE_double(scale_gap, 0.3, "Scale gap between scales. No effect unless num_scales>1. Initial scale is always 1. If you want to change the initial scale, "
@@ -56,16 +57,16 @@ op::PoseModel gflagToPoseModel(const std::string& poseModeString)
}
// Google flags into program variables
-std::tuple gflagsToOpParameters()
+std::tuple, op::Point, op::Point, op::PoseModel> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// netInputSize
- cv::Size netInputSize;
- nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.width, &netInputSize.height);
+ op::Point netInputSize;
+ nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.x, &netInputSize.y);
op::checkE(nRead, 2, "Error, net resolution format (" + FLAGS_net_resolution + ") invalid, should be e.g., 656x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
// netOutputSize
const auto netOutputSize = netInputSize;
@@ -91,9 +92,9 @@ int openPoseTutorialPose2()
op::check(0 <= FLAGS_logging_level && FLAGS_logging_level <= 255, "Wrong logging_level value.", __LINE__, __FUNCTION__, __FILE__);
op::ConfigureLog::setPriorityThreshold((op::Priority)FLAGS_logging_level);
// Step 2 - Read Google flags (user defined configuration)
- cv::Size outputSize;
- cv::Size netInputSize;
- cv::Size netOutputSize;
+ op::Point outputSize;
+ op::Point netInputSize;
+ op::Point netOutputSize;
op::PoseModel poseModel;
std::tie(outputSize, netInputSize, netOutputSize, poseModel) = gflagsToOpParameters();
// Step 3 - Initialize all required classes
@@ -105,7 +106,7 @@ int openPoseTutorialPose2()
op::PoseRenderer poseRenderer{netOutputSize, outputSize, poseModel, poseExtractorPtr, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap};
poseRenderer.setElementToRender(FLAGS_part_to_show);
op::OpOutputToCvMat opOutputToCvMat{outputSize};
- const cv::Size windowedSize = outputSize;
+ const op::Point windowedSize = outputSize;
op::FrameDisplayer frameDisplayer{windowedSize, "OpenPose Tutorial - Example 2"};
// Step 4 - Initialize resources on desired thread (in this case single thread, i.e. we init resources here)
poseExtractorPtr->initializationOnThread();
@@ -121,12 +122,12 @@ int openPoseTutorialPose2()
double scaleInputToOutput;
op::Array outputArray;
std::tie(scaleInputToOutput, outputArray) = cvMatToOpOutput.format(inputImage);
- // Step 3 - Estimate poseKeyPoints
- poseExtractorPtr->forwardPass(netInputArray, inputImage.size());
- const auto poseKeyPoints = poseExtractorPtr->getPoseKeyPoints();
+ // Step 3 - Estimate poseKeypoints
+ poseExtractorPtr->forwardPass(netInputArray, {inputImage.cols, inputImage.rows});
+ const auto poseKeypoints = poseExtractorPtr->getPoseKeypoints();
const auto scaleNetToOutput = poseExtractorPtr->getScaleNetToOutput();
// Step 4 - Render pose
- poseRenderer.renderPose(outputArray, poseKeyPoints, scaleNetToOutput);
+ poseRenderer.renderPose(outputArray, poseKeypoints, scaleNetToOutput);
// Step 5 - OpenPose output format to cv::Mat
auto outputImage = opOutputToCvMat.formatToCvMat(outputArray);
diff --git a/examples/tutorial_thread/1_openpose_read_and_display.cpp b/examples/tutorial_thread/1_openpose_read_and_display.cpp
index df3769c3..11437cf3 100644
--- a/examples/tutorial_thread/1_openpose_read_and_display.cpp
+++ b/examples/tutorial_thread/1_openpose_read_and_display.cpp
@@ -9,7 +9,7 @@
// 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
#include
#include
@@ -17,8 +17,9 @@
#include
#include
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -55,7 +56,7 @@ op::ProducerType gflagsToProducerType(const std::string& imageDirectory, const s
return op::ProducerType::Webcam;
}
-std::shared_ptr gflagsToProducer(const std::string& imageDirectory, const std::string& videoPath, const int webcamIndex, const cv::Size webcamResolution)
+std::shared_ptr gflagsToProducer(const std::string& imageDirectory, const std::string& videoPath, const int webcamIndex, const op::Point webcamResolution)
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
const auto type = gflagsToProducerType(imageDirectory, videoPath, webcamIndex);
@@ -74,16 +75,16 @@ std::shared_ptr gflagsToProducer(const std::string& imageDirectory
}
// Google flags into program variables
-std::tuple> gflagsToOpParameters()
+std::tuple, op::Point, std::shared_ptr> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// cameraFrameSize
- cv::Size cameraFrameSize;
- auto nRead = sscanf(FLAGS_camera_resolution.c_str(), "%dx%d", &cameraFrameSize.width, &cameraFrameSize.height);
+ op::Point cameraFrameSize;
+ auto nRead = sscanf(FLAGS_camera_resolution.c_str(), "%dx%d", &cameraFrameSize.x, &cameraFrameSize.y);
op::checkE(nRead, 2, "Error, camera resolution format (" + FLAGS_camera_resolution + ") invalid, should be e.g., 1280x720", __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// producerType
@@ -105,17 +106,17 @@ int openPoseTutorialThread1()
op::check(0 <= FLAGS_logging_level && FLAGS_logging_level <= 255, "Wrong logging_level value.", __LINE__, __FUNCTION__, __FILE__);
op::ConfigureLog::setPriorityThreshold((op::Priority)FLAGS_logging_level);
// Step 2 - Read Google flags (user defined configuration)
- cv::Size cameraFrameSize;
- cv::Size outputSize;
+ op::Point cameraFrameSize;
+ op::Point outputSize;
std::shared_ptr producerSharedPtr;
std::tie(cameraFrameSize, outputSize, producerSharedPtr) = gflagsToOpParameters();
// Step 3 - Setting producer
auto videoSeekSharedPtr = std::make_shared, std::atomic>>();
videoSeekSharedPtr->first = false;
videoSeekSharedPtr->second = 0;
- const cv::Size producerSize{(int)producerSharedPtr->get(CV_CAP_PROP_FRAME_WIDTH),
+ const op::Point producerSize{(int)producerSharedPtr->get(CV_CAP_PROP_FRAME_WIDTH),
(int)producerSharedPtr->get(CV_CAP_PROP_FRAME_HEIGHT)};
- if (outputSize.width == -1 || outputSize.height == -1)
+ if (outputSize.x == -1 || outputSize.y == -1)
{
if (producerSize.area() > 0)
outputSize = producerSize;
@@ -162,7 +163,7 @@ int openPoseTutorialThread1()
// ------------------------- STARTING AND STOPPING THREADING -------------------------
op::log("Starting thread(s)", op::Priority::Max);
- // Two different ways of running the program on multithread enviroment
+ // Two different ways of running the program on multithread environment
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
threadManager.exec(); // It blocks this thread until all threads have finished
// Option b) Giving to the user the control of this thread
diff --git a/examples/tutorial_thread/2_user_processing_function.cpp b/examples/tutorial_thread/2_user_processing_function.cpp
index 79d3a9c5..faef043d 100644
--- a/examples/tutorial_thread/2_user_processing_function.cpp
+++ b/examples/tutorial_thread/2_user_processing_function.cpp
@@ -10,7 +10,7 @@
// 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
#include
#include
@@ -18,8 +18,9 @@
#include
#include
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -89,7 +90,7 @@ op::ProducerType gflagsToProducerType(const std::string& imageDirectory, const s
return op::ProducerType::Webcam;
}
-std::shared_ptr gflagsToProducer(const std::string& imageDirectory, const std::string& videoPath, const int webcamIndex, const cv::Size webcamResolution)
+std::shared_ptr gflagsToProducer(const std::string& imageDirectory, const std::string& videoPath, const int webcamIndex, const op::Point webcamResolution)
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
const auto type = gflagsToProducerType(imageDirectory, videoPath, webcamIndex);
@@ -108,16 +109,16 @@ std::shared_ptr gflagsToProducer(const std::string& imageDirectory
}
// Google flags into program variables
-std::tuple> gflagsToOpParameters()
+std::tuple, op::Point, std::shared_ptr> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// cameraFrameSize
- cv::Size cameraFrameSize;
- auto nRead = sscanf(FLAGS_camera_resolution.c_str(), "%dx%d", &cameraFrameSize.width, &cameraFrameSize.height);
+ op::Point cameraFrameSize;
+ auto nRead = sscanf(FLAGS_camera_resolution.c_str(), "%dx%d", &cameraFrameSize.x, &cameraFrameSize.y);
op::checkE(nRead, 2, "Error, camera resolution format (" + FLAGS_camera_resolution + ") invalid, should be e.g., 1280x720", __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// producerType
@@ -139,17 +140,17 @@ int openPoseTutorialThread2()
op::check(0 <= FLAGS_logging_level && FLAGS_logging_level <= 255, "Wrong logging_level value.", __LINE__, __FUNCTION__, __FILE__);
op::ConfigureLog::setPriorityThreshold((op::Priority)FLAGS_logging_level);
// Step 2 - Read Google flags (user defined configuration)
- cv::Size cameraFrameSize;
- cv::Size outputSize;
+ op::Point cameraFrameSize;
+ op::Point outputSize;
std::shared_ptr producerSharedPtr;
std::tie(cameraFrameSize, outputSize, producerSharedPtr) = gflagsToOpParameters();
// Step 3 - Setting producer
auto videoSeekSharedPtr = std::make_shared, std::atomic>>();
videoSeekSharedPtr->first = false;
videoSeekSharedPtr->second = 0;
- const cv::Size producerSize{(int)producerSharedPtr->get(CV_CAP_PROP_FRAME_WIDTH),
+ const op::Point producerSize{(int)producerSharedPtr->get(CV_CAP_PROP_FRAME_WIDTH),
(int)producerSharedPtr->get(CV_CAP_PROP_FRAME_HEIGHT)};
- if (outputSize.width == -1 || outputSize.height == -1)
+ if (outputSize.x == -1 || outputSize.y == -1)
{
if (producerSize.area() > 0)
outputSize = producerSize;
@@ -204,7 +205,7 @@ int openPoseTutorialThread2()
// ------------------------- STARTING AND STOPPING THREADING -------------------------
op::log("Starting thread(s)", op::Priority::Max);
- // Two different ways of running the program on multithread enviroment
+ // Two different ways of running the program on multithread environment
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
threadManager.exec(); // It blocks this thread until all threads have finished
// Option b) Giving to the user the control of this thread
diff --git a/examples/tutorial_thread/3_user_input_processing_and_output.cpp b/examples/tutorial_thread/3_user_input_processing_and_output.cpp
index c9667040..afefbc1a 100644
--- a/examples/tutorial_thread/3_user_input_processing_and_output.cpp
+++ b/examples/tutorial_thread/3_user_input_processing_and_output.cpp
@@ -10,7 +10,7 @@
// 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
// Option a) Importing all modules
#include
@@ -23,8 +23,9 @@
// #include
// #include
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -114,7 +115,7 @@ public:
{
// User's post-processing (after OpenPose processing & before OpenPose outputs) here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
try
{
if (datumsPtr != nullptr && !datumsPtr->empty())
@@ -142,7 +143,7 @@ public:
{
// User's displaying/saving/other processing here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
if (datumsPtr != nullptr && !datumsPtr->empty())
{
cv::imshow("User worker GUI", datumsPtr->at(0).cvOutputData);
@@ -195,7 +196,7 @@ int openPoseTutorialThread3()
// ------------------------- STARTING AND STOPPING THREADING -------------------------
op::log("Starting thread(s)", op::Priority::Max);
- // Two different ways of running the program on multithread enviroment
+ // Two different ways of running the program on multithread environment
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
threadManager.exec(); // It blocks this thread until all threads have finished
// Option b) Giving to the user the control of this thread
diff --git a/examples/tutorial_thread/4_user_input_processing_output_and_datum.cpp b/examples/tutorial_thread/4_user_input_processing_output_and_datum.cpp
index 4b09ecad..6d590a96 100644
--- a/examples/tutorial_thread/4_user_input_processing_output_and_datum.cpp
+++ b/examples/tutorial_thread/4_user_input_processing_output_and_datum.cpp
@@ -10,7 +10,7 @@
// 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
// Option a) Importing all modules
#include
@@ -23,8 +23,9 @@
// #include
// #include
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
@@ -126,7 +127,7 @@ public:
{
// User's post-processing (after OpenPose processing & before OpenPose outputs) here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
try
{
if (datumsPtr != nullptr && !datumsPtr->empty())
@@ -154,7 +155,7 @@ public:
{
// User's displaying/saving/other processing here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
if (datumsPtr != nullptr && !datumsPtr->empty())
{
cv::imshow("User worker GUI", datumsPtr->at(0).cvOutputData);
@@ -207,7 +208,7 @@ int openPoseTutorialThread4()
// ------------------------- STARTING AND STOPPING THREADING -------------------------
op::log("Starting thread(s)", op::Priority::Max);
- // Two different ways of running the program on multithread enviroment
+ // Two different ways of running the program on multithread environment
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
threadManager.exec(); // It blocks this thread until all threads have finished
// Option b) Giving to the user the control of this thread
diff --git a/examples/tutorial_wrapper/1_user_asynchronous.cpp b/examples/tutorial_wrapper/1_user_asynchronous.cpp
index b2e14f5f..b6ca99b6 100644
--- a/examples/tutorial_wrapper/1_user_asynchronous.cpp
+++ b/examples/tutorial_wrapper/1_user_asynchronous.cpp
@@ -2,7 +2,7 @@
// Asynchronous mode: ideal for fast prototyping when performance is not an issue. The user emplaces/pushes and pops frames from the OpenPose wrapper when he desires to.
// This example shows the user how to use the OpenPose wrapper class:
- // 1. Extract and render pose / heatmap / PAF of that image
+ // 1. Extract and render keypoint / heatmap / PAF of that image
// 2. Save the results on disc
// 3. Display the rendered pose
// Everything in a multi-thread scenario
@@ -20,11 +20,9 @@
#include // std::string
#include // std::this_thread
#include // std::vector
-// OpenCV dependencies
-#include // cv::Mat & cv::Size
// Other 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
// Option a) Importing all modules
@@ -32,6 +30,7 @@
// Option b) Manually importing the desired modules. Recommended if you only intend to use a few modules.
// #include
// #include
+// #include
// #include
// #include
// #include
@@ -40,56 +39,63 @@
// #include
// #include
-// Uncomment to avoid needing `op::` before each class and function of the OpenPose library. Analogously for OpenCV and the standard C++ library
-// using namespace op;
-// using namespace cv;
-// using namespace std;
-
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
// Producer
DEFINE_string(image_dir, "examples/media/", "Process a directory of images.");
// OpenPose
-DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
DEFINE_string(model_folder, "models/", "Folder where the pose models (COCO and MPI) are located.");
-DEFINE_string(net_resolution, "656x368", "Multiples of 16.");
-DEFINE_string(resolution, "1280x720", "The image resolution (display and output).");
-DEFINE_int32(num_gpu, 1, "The number of GPU devices to use.");
+DEFINE_string(resolution, "1280x720", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the default images resolution.");
+DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your machine.");
DEFINE_int32(num_gpu_start, 0, "GPU device start number.");
+DEFINE_int32(keypoint_scale, 0, "Scaling of the (x,y) coordinates of the final pose data array, i.e. the scale of the (x,y) coordinates that will be saved"
+ " with the `write_keypoint` & `write_keypoint_json` flags. Select `0` to scale it to the original source resolution, `1`to scale"
+ " it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with `resolution`),"
+ " `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
+// OpenPose Body Pose
+DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
+DEFINE_string(net_resolution, "656x368", "Multiples of 16. If it is increased, the accuracy usually increases. If it is decreased, the speed increases.");
DEFINE_int32(num_scales, 1, "Number of scales to average.");
DEFINE_double(scale_gap, 0.3, "Scale gap between scales. No effect unless num_scales>1. Initial scale is always 1. If you want to change the initial scale,"
" you actually want to multiply the `net_resolution` by your desired initial scale.");
-DEFINE_int32(scale_mode, 0, "Scaling of the (x,y) coordinates of the final pose data array (op::Datum::pose), i.e. the scale of the (x,y) coordinates that"
- " will be saved with the `write_pose` & `write_pose_json` flags. Select `0` to scale it to the original source resolution, `1`"
- " to scale it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with "
- " `resolution`), `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
DEFINE_bool(heatmaps_add_parts, false, "If true, it will add the body part heatmaps to the final op::Datum::poseHeatMaps array (program speed will decrease). Not"
" required for our library, enable it only if you intend to process this information later. If more than one `add_heatmaps_X`"
" flag is enabled, it will place then in sequential memory order: body parts + bkg + PAFs. It will follow the order on"
" POSE_BODY_PART_MAPPING in `include/openpose/pose/poseParameters.hpp`.");
DEFINE_bool(heatmaps_add_bkg, false, "Same functionality as `add_heatmaps_parts`, but adding the heatmap corresponding to background.");
DEFINE_bool(heatmaps_add_PAFs, false, "Same functionality as `add_heatmaps_parts`, but adding the PAFs.");
-DEFINE_int32(heatmaps_scale_mode, 2, "Set 0 to scale op::Datum::poseHeatMaps in the range [0,1], 1 for [-1,1]; and 2 for integer rounded [0,255].");
+DEFINE_int32(heatmaps_scale, 2, "Set 0 to scale op::Datum::poseHeatMaps in the range [0,1], 1 for [-1,1]; and 2 for integer rounded [0,255].");
+// OpenPose Face
+DEFINE_bool(face, false, "Enables face keypoint detection. It will share some parameters from the body pose, e.g. `model_folder`.");
+DEFINE_string(face_net_resolution, "368x368", "Multiples of 16. Analogous to `net_resolution` but applied to the face keypoint detector. 320x320 usually works fine"
+ " while giving a substantial speed up when multiple faces on the image.");
+// OpenPose Hand
// OpenPose Rendering
-DEFINE_bool(no_render_output, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown."
- " If true, it will leave them empty.");
DEFINE_int32(part_to_show, 0, "Part to show from the start.");
-DEFINE_bool(disable_blending, false, "If false, it will blend the results with the original frame. If true, it will only display the results.");
+DEFINE_bool(disable_blending, false, "If blending is enabled, it will merge the results with the original frame. If disabled, it will only display the results.");
+// OpenPose Rendering Pose
+DEFINE_bool(no_render_pose, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown."
+ " If true, it will leave them empty.");
DEFINE_double(alpha_pose, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
DEFINE_double(alpha_heatmap, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
-// Consumer
+// OpenPose Rendering Face
+DEFINE_bool(no_render_face, false, "Analogous to `no_render_pose` but applied to the face keypoints and heat maps.");
+DEFINE_double(alpha_face, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
+DEFINE_double(alpha_heatmap_face, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
+// Result Saving
DEFINE_string(write_images, "", "Directory to write rendered frames in `write_images_format` image format.");
DEFINE_string(write_images_format, "png", "File extension and format for `write_images`, e.g. png, jpg or bmp. Check the OpenCV function cv::imwrite"
" for all compatible extensions.");
DEFINE_string(write_video, "", "Full file path to write rendered frames in motion JPEG video format. It might fail if the final path does"
" not finish in `.avi`. It internally uses cv::VideoWriter.");
-DEFINE_string(write_pose, "", "Directory to write the people pose data. Desired format on `write_pose_format`.");
-DEFINE_string(write_pose_format, "yml", "File extension and format for `write_pose`: json, xml, yaml and yml. Json not available for OpenCV < 3.0,"
- " use `write_pose_json` instead.");
-DEFINE_string(write_pose_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
+DEFINE_string(write_keypoint, "", "Directory to write the people body pose keypoint data. Desired format on `write_keypoint_format`.");
+DEFINE_string(write_keypoint_format, "yml", "File extension and format for `write_keypoint`: json, xml, yaml and yml. Json not available for OpenCV < 3.0,"
+ " use `write_keypoint_json` instead.");
+DEFINE_string(write_keypoint_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
DEFINE_string(write_coco_json, "", "Full file path to write people pose data with *.json COCO validation format.");
DEFINE_string(write_heatmaps, "", "Directory to write heatmaps with *.png format. At least 1 `add_heatmaps_X` flag must be enabled.");
DEFINE_string(write_heatmaps_format, "png", "File extension and format for `write_heatmaps`, analogous to `write_images_format`. Recommended `png` or any compressed and"
@@ -176,7 +182,7 @@ public:
{
// User's displaying/saving/other processing here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
if (datumsPtr != nullptr && !datumsPtr->empty())
{
cv::imshow("User worker GUI", datumsPtr->at(0).cvOutputData);
@@ -203,18 +209,18 @@ op::PoseModel gflagToPoseModel(const std::string& poseModeString)
}
}
-op::ScaleMode gflagToScaleMode(const int scaleMode)
+op::ScaleMode gflagToScaleMode(const int keypointScale)
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
- if (scaleMode == 0)
+ if (keypointScale == 0)
return op::ScaleMode::InputResolution;
- else if (scaleMode == 1)
+ else if (keypointScale == 1)
return op::ScaleMode::NetOutputResolution;
- else if (scaleMode == 2)
+ else if (keypointScale == 2)
return op::ScaleMode::OutputResolution;
- else if (scaleMode == 3)
+ else if (keypointScale == 3)
return op::ScaleMode::ZeroToOne;
- else if (scaleMode == 4)
+ else if (keypointScale == 4)
return op::ScaleMode::PlusMinusOne;
else
{
@@ -238,27 +244,31 @@ std::vector gflagToHeatMaps(const bool heatmaps_add_parts, cons
}
// Google flags into program variables
-std::tuple, op::ScaleMode> gflagsToOpParameters()
+std::tuple, op::Point, op::Point, op::PoseModel, op::ScaleMode, std::vector, op::ScaleMode> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// netInputSize
- cv::Size netInputSize;
- nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.width, &netInputSize.height);
+ op::Point netInputSize;
+ nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.x, &netInputSize.y);
op::checkE(nRead, 2, "Error, net resolution format (" + FLAGS_net_resolution + ") invalid, should be e.g., 656x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
+ // faceNetInputSize
+ op::Point faceNetInputSize;
+ nRead = sscanf(FLAGS_face_net_resolution.c_str(), "%dx%d", &faceNetInputSize.x, &faceNetInputSize.y);
+ op::checkE(nRead, 2, "Error, face net resolution format (" + FLAGS_face_net_resolution + ") invalid, should be e.g., 368x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
// poseModel
const auto poseModel = gflagToPoseModel(FLAGS_model_pose);
- // scaleMode
- const auto scaleMode = gflagToScaleMode(FLAGS_scale_mode);
+ // keypointScale
+ const auto keypointScale = gflagToScaleMode(FLAGS_keypoint_scale);
// heatmaps to add
const auto heatMapTypes = gflagToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs);
- op::check(FLAGS_heatmaps_scale_mode >= 0 && FLAGS_heatmaps_scale_mode <= 2, "Non valid `heatmaps_scale_mode`.", __LINE__, __FUNCTION__, __FILE__);
- const auto heatMapsScaleMode = (FLAGS_heatmaps_scale_mode == 0 ? op::ScaleMode::PlusMinusOne : (FLAGS_heatmaps_scale_mode == 1 ? op::ScaleMode::ZeroToOne : op::ScaleMode::UnsignedChar ));
+ op::check(FLAGS_heatmaps_scale >= 0 && FLAGS_heatmaps_scale <= 2, "Non valid `heatmaps_scale`.", __LINE__, __FUNCTION__, __FILE__);
+ const auto heatMapScale = (FLAGS_heatmaps_scale == 0 ? op::ScaleMode::PlusMinusOne : (FLAGS_heatmaps_scale == 1 ? op::ScaleMode::ZeroToOne : op::ScaleMode::UnsignedChar ));
// return
- return std::make_tuple(outputSize, netInputSize, poseModel, scaleMode, heatMapTypes, heatMapsScaleMode);
+ return std::make_tuple(outputSize, netInputSize, faceNetInputSize, poseModel, keypointScale, heatMapTypes, heatMapScale);
}
int openPoseTutorialWrapper1()
@@ -272,13 +282,14 @@ int openPoseTutorialWrapper1()
const auto timerBegin = std::chrono::high_resolution_clock::now();
// Applying user defined configuration
- cv::Size outputSize;
- cv::Size netInputSize;
+ op::Point outputSize;
+ op::Point netInputSize;
+ op::Point faceNetInputSize;
op::PoseModel poseModel;
- op::ScaleMode scaleMode;
+ op::ScaleMode keypointScale;
std::vector heatMapTypes;
- op::ScaleMode heatMapsScaleMode;
- std::tie(outputSize, netInputSize, poseModel, scaleMode, heatMapTypes, heatMapsScaleMode) = gflagsToOpParameters();
+ op::ScaleMode heatMapScale;
+ std::tie(outputSize, netInputSize, faceNetInputSize, poseModel, keypointScale, heatMapTypes, heatMapScale) = gflagsToOpParameters();
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// Configure OpenPose
@@ -286,16 +297,19 @@ int openPoseTutorialWrapper1()
const bool displayGui = false;
const bool guiVerbose = false;
const bool fullScreen = false;
- const op::WrapperStructPose wrapperStructPose{netInputSize, outputSize, scaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_num_scales, (float)FLAGS_scale_gap,
- !FLAGS_no_render_output, poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap,
- FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapsScaleMode};
- const op::WrapperStructOutput wrapperStructOutput{displayGui, guiVerbose, fullScreen, FLAGS_write_pose, op::stringToDataFormat(FLAGS_write_pose_format),
- FLAGS_write_pose_json, FLAGS_write_coco_json, FLAGS_write_images, FLAGS_write_images_format, FLAGS_write_video,
- FLAGS_write_heatmaps, FLAGS_write_heatmaps_format};
- // Pose configuration (use WrapperStructPose{} for default and recommended configuration)
- // Producer (use default to disable any input)
+ const op::WrapperStructPose wrapperStructPose{netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_num_scales, (float)FLAGS_scale_gap,
+ !FLAGS_no_render_pose, poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap,
+ FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale};
+ // (Experimental, function and class names might change in next versions) Face configuration (use op::WrapperStructFace{} to disable it)
+ const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, !FLAGS_no_render_face, (float)FLAGS_alpha_face, (float)FLAGS_alpha_heatmap_face};
+ // (Experimental, function and class names might change in next versions) Hand configuration (use op::WrapperStructFace{} to disable it)
+ const op::experimental::WrapperStructHand wrapperStructHand{false};
// Consumer (comment or use default argument to disable any output)
- opWrapper.configure(wrapperStructPose, op::WrapperStructInput{}, wrapperStructOutput);
+ const op::WrapperStructOutput wrapperStructOutput{displayGui, guiVerbose, fullScreen, FLAGS_write_keypoint, op::stringToDataFormat(FLAGS_write_keypoint_format),
+ FLAGS_write_keypoint_json, FLAGS_write_coco_json, FLAGS_write_images, FLAGS_write_images_format, FLAGS_write_video,
+ FLAGS_write_heatmaps, FLAGS_write_heatmaps_format};
+ // Configure wrapper
+ opWrapper.configure(wrapperStructPose, wrapperStructFace, wrapperStructHand, op::WrapperStructInput{}, wrapperStructOutput);
// Set to single-thread running (e.g. for debugging purposes)
// opWrapper.disableMultiThreading();
diff --git a/examples/tutorial_wrapper/2_user_synchronous.cpp b/examples/tutorial_wrapper/2_user_synchronous.cpp
index aa4a222a..3a5f00d1 100644
--- a/examples/tutorial_wrapper/2_user_synchronous.cpp
+++ b/examples/tutorial_wrapper/2_user_synchronous.cpp
@@ -2,7 +2,7 @@
// Synchronous mode: ideal for performance. The user can add his own frames producer / post-processor / consumer to the OpenPose wrapper or use the default ones.
// This example shows the user how to use the OpenPose wrapper class:
- // 1. Extract and render pose / heatmap / PAF of that image
+ // 1. Extract and render keypoint / heatmap / PAF of that image
// 2. Save the results on disc
// 3. Display the rendered pose
// Everything in a multi-thread scenario
@@ -20,11 +20,9 @@
#include // std::string
#include // std::this_thread
#include // std::vector
-// OpenCV dependencies
-#include // cv::Mat & cv::Size
// Other 3rdpary depencencies
#include // DEFINE_bool, DEFINE_int32, DEFINE_int64, DEFINE_uint64, DEFINE_double, DEFINE_string
-#include // google::InitGoogleLogging, CHECK, CHECK_EQ, LOG, VLOG, ...
+#include // google::InitGoogleLogging
// OpenPose dependencies
// Option a) Importing all modules
@@ -32,6 +30,7 @@
// Option b) Manually importing the desired modules. Recommended if you only intend to use a few modules.
// #include
// #include
+// #include
// #include
// #include
// #include
@@ -40,56 +39,63 @@
// #include
// #include
-// Uncomment to avoid needing `op::` before each class and function of the OpenPose library. Analogously for OpenCV and the standard C++ library
-// using namespace op;
-// using namespace cv;
-// using namespace std;
-
-// Gflags in the command line terminal. Check all the options by adding the flag `--help`, e.g. `openpose.bin --help`.
-// Note: This command will show you flags for several files. Check only the flags for the file you are checking. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
+// See all the available parameter options withe the `--help` flag. E.g. `./build/examples/openpose/openpose.bin --help`.
+// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
+// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
// Debugging
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while 255 will not output any."
" Current OpenPose library messages are in the range 0-4: 1 for low priority messages and 4 for important ones.");
// Producer
DEFINE_string(image_dir, "examples/media/", "Process a directory of images.");
// OpenPose
-DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
DEFINE_string(model_folder, "models/", "Folder where the pose models (COCO and MPI) are located.");
-DEFINE_string(net_resolution, "656x368", "Multiples of 16.");
-DEFINE_string(resolution, "1280x720", "The image resolution (display and output).");
-DEFINE_int32(num_gpu, 1, "The number of GPU devices to use.");
+DEFINE_string(resolution, "1280x720", "The image resolution (display and output). Use \"-1x-1\" to force the program to use the default images resolution.");
+DEFINE_int32(num_gpu, -1, "The number of GPU devices to use. If negative, it will use all the available GPUs in your machine.");
DEFINE_int32(num_gpu_start, 0, "GPU device start number.");
+DEFINE_int32(keypoint_scale, 0, "Scaling of the (x,y) coordinates of the final pose data array, i.e. the scale of the (x,y) coordinates that will be saved"
+ " with the `write_keypoint` & `write_keypoint_json` flags. Select `0` to scale it to the original source resolution, `1`to scale"
+ " it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with `resolution`),"
+ " `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
+// OpenPose Body Pose
+DEFINE_string(model_pose, "COCO", "Model to be used (e.g. COCO, MPI, MPI_4_layers).");
+DEFINE_string(net_resolution, "656x368", "Multiples of 16. If it is increased, the accuracy usually increases. If it is decreased, the speed increases.");
DEFINE_int32(num_scales, 1, "Number of scales to average.");
DEFINE_double(scale_gap, 0.3, "Scale gap between scales. No effect unless num_scales>1. Initial scale is always 1. If you want to change the initial scale,"
" you actually want to multiply the `net_resolution` by your desired initial scale.");
-DEFINE_int32(scale_mode, 0, "Scaling of the (x,y) coordinates of the final pose data array (op::Datum::pose), i.e. the scale of the (x,y) coordinates that"
- " will be saved with the `write_pose` & `write_pose_json` flags. Select `0` to scale it to the original source resolution, `1`"
- " to scale it to the net output size (set with `net_resolution`), `2` to scale it to the final output size (set with "
- " `resolution`), `3` to scale it in the range [0,1], and 4 for range [-1,1]. Non related with `num_scales` and `scale_gap`.");
DEFINE_bool(heatmaps_add_parts, false, "If true, it will add the body part heatmaps to the final op::Datum::poseHeatMaps array (program speed will decrease). Not"
" required for our library, enable it only if you intend to process this information later. If more than one `add_heatmaps_X`"
" flag is enabled, it will place then in sequential memory order: body parts + bkg + PAFs. It will follow the order on"
" POSE_BODY_PART_MAPPING in `include/openpose/pose/poseParameters.hpp`.");
DEFINE_bool(heatmaps_add_bkg, false, "Same functionality as `add_heatmaps_parts`, but adding the heatmap corresponding to background.");
DEFINE_bool(heatmaps_add_PAFs, false, "Same functionality as `add_heatmaps_parts`, but adding the PAFs.");
-DEFINE_int32(heatmaps_scale_mode, 2, "Set 0 to scale op::Datum::poseHeatMaps in the range [0,1], 1 for [-1,1]; and 2 for integer rounded [0,255].");
+DEFINE_int32(heatmaps_scale, 2, "Set 0 to scale op::Datum::poseHeatMaps in the range [0,1], 1 for [-1,1]; and 2 for integer rounded [0,255].");
+// OpenPose Face
+DEFINE_bool(face, false, "Enables face keypoint detection. It will share some parameters from the body pose, e.g. `model_folder`.");
+DEFINE_string(face_net_resolution, "368x368", "Multiples of 16. Analogous to `net_resolution` but applied to the face keypoint detector. 320x320 usually works fine"
+ " while giving a substantial speed up when multiple faces on the image.");
+// OpenPose Hand
// OpenPose Rendering
-DEFINE_bool(no_render_output, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown."
- " If true, it will leave them empty.");
DEFINE_int32(part_to_show, 0, "Part to show from the start.");
-DEFINE_bool(disable_blending, false, "If false, it will blend the results with the original frame. If true, it will only display the results.");
+DEFINE_bool(disable_blending, false, "If blending is enabled, it will merge the results with the original frame. If disabled, it will only display the results.");
+// OpenPose Rendering Pose
+DEFINE_bool(no_render_pose, false, "If false, it will fill both `outputData` and `cvOutputData` with the original image + desired part to be shown."
+ " If true, it will leave them empty.");
DEFINE_double(alpha_pose, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
DEFINE_double(alpha_heatmap, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
-// Consumer
+// OpenPose Rendering Face
+DEFINE_bool(no_render_face, false, "Analogous to `no_render_pose` but applied to the face keypoints and heat maps.");
+DEFINE_double(alpha_face, 0.6, "Blending factor (range 0-1) for the body part rendering. 1 will show it completely, 0 will hide it.");
+DEFINE_double(alpha_heatmap_face, 0.7, "Blending factor (range 0-1) between heatmap and original frame. 1 will only show the heatmap, 0 will only show the frame.");
+// Result Saving
DEFINE_string(write_images, "", "Directory to write rendered frames in `write_images_format` image format.");
DEFINE_string(write_images_format, "png", "File extension and format for `write_images`, e.g. png, jpg or bmp. Check the OpenCV function cv::imwrite"
" for all compatible extensions.");
DEFINE_string(write_video, "", "Full file path to write rendered frames in motion JPEG video format. It might fail if the final path does"
" not finish in `.avi`. It internally uses cv::VideoWriter.");
-DEFINE_string(write_pose, "", "Directory to write the people pose data. Desired format on `write_pose_format`.");
-DEFINE_string(write_pose_format, "yml", "File extension and format for `write_pose`: json, xml, yaml and yml. Json not available for OpenCV < 3.0,"
- " use `write_pose_json` instead.");
-DEFINE_string(write_pose_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
+DEFINE_string(write_keypoint, "", "Directory to write the people body pose keypoint data. Desired format on `write_keypoint_format`.");
+DEFINE_string(write_keypoint_format, "yml", "File extension and format for `write_keypoint`: json, xml, yaml and yml. Json not available for OpenCV < 3.0,"
+ " use `write_keypoint_json` instead.");
+DEFINE_string(write_keypoint_json, "", "Directory to write people pose data with *.json format, compatible with any OpenCV version.");
DEFINE_string(write_coco_json, "", "Full file path to write people pose data with *.json COCO validation format.");
DEFINE_string(write_heatmaps, "", "Directory to write heatmaps with *.png format. At least 1 `add_heatmaps_X` flag must be enabled.");
DEFINE_string(write_heatmaps_format, "png", "File extension and format for `write_heatmaps`, analogous to `write_images_format`. Recommended `png` or any compressed and"
@@ -188,7 +194,7 @@ public:
{
// User's post-processing (after OpenPose processing & before OpenPose outputs) here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
try
{
if (datumsPtr != nullptr && !datumsPtr->empty())
@@ -216,7 +222,7 @@ public:
{
// User's displaying/saving/other processing here
// datum.cvOutputData: rendered frame with pose or heatmaps
- // datum.poseKeyPoints: Array with the estimated pose
+ // datum.poseKeypoints: Array with the estimated pose
if (datumsPtr != nullptr && !datumsPtr->empty())
{
cv::imshow("User worker GUI", datumsPtr->at(0).cvOutputData);
@@ -248,18 +254,18 @@ op::PoseModel gflagToPoseModel(const std::string& poseModeString)
}
}
-op::ScaleMode gflagToScaleMode(const int scaleMode)
+op::ScaleMode gflagToScaleMode(const int keypointScale)
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
- if (scaleMode == 0)
+ if (keypointScale == 0)
return op::ScaleMode::InputResolution;
- else if (scaleMode == 1)
+ else if (keypointScale == 1)
return op::ScaleMode::NetOutputResolution;
- else if (scaleMode == 2)
+ else if (keypointScale == 2)
return op::ScaleMode::OutputResolution;
- else if (scaleMode == 3)
+ else if (keypointScale == 3)
return op::ScaleMode::ZeroToOne;
- else if (scaleMode == 4)
+ else if (keypointScale == 4)
return op::ScaleMode::PlusMinusOne;
else
{
@@ -283,27 +289,31 @@ std::vector gflagToHeatMaps(const bool heatmaps_add_parts, cons
}
// Google flags into program variables
-std::tuple, op::ScaleMode> gflagsToOpParameters()
+std::tuple, op::Point, op::Point, op::PoseModel, op::ScaleMode, std::vector, op::ScaleMode> gflagsToOpParameters()
{
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// outputSize
- cv::Size outputSize;
- auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.width, &outputSize.height);
+ op::Point outputSize;
+ auto nRead = sscanf(FLAGS_resolution.c_str(), "%dx%d", &outputSize.x, &outputSize.y);
op::checkE(nRead, 2, "Error, resolution format (" + FLAGS_resolution + ") invalid, should be e.g., 960x540 ", __LINE__, __FUNCTION__, __FILE__);
// netInputSize
- cv::Size netInputSize;
- nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.width, &netInputSize.height);
+ op::Point netInputSize;
+ nRead = sscanf(FLAGS_net_resolution.c_str(), "%dx%d", &netInputSize.x, &netInputSize.y);
op::checkE(nRead, 2, "Error, net resolution format (" + FLAGS_net_resolution + ") invalid, should be e.g., 656x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
+ // faceNetInputSize
+ op::Point faceNetInputSize;
+ nRead = sscanf(FLAGS_face_net_resolution.c_str(), "%dx%d", &faceNetInputSize.x, &faceNetInputSize.y);
+ op::checkE(nRead, 2, "Error, face net resolution format (" + FLAGS_face_net_resolution + ") invalid, should be e.g., 368x368 (multiples of 16)", __LINE__, __FUNCTION__, __FILE__);
// poseModel
const auto poseModel = gflagToPoseModel(FLAGS_model_pose);
- // scaleMode
- const auto scaleMode = gflagToScaleMode(FLAGS_scale_mode);
+ // keypointScale
+ const auto keypointScale = gflagToScaleMode(FLAGS_keypoint_scale);
// heatmaps to add
const auto heatMapTypes = gflagToHeatMaps(FLAGS_heatmaps_add_parts, FLAGS_heatmaps_add_bkg, FLAGS_heatmaps_add_PAFs);
- op::check(FLAGS_heatmaps_scale_mode >= 0 && FLAGS_heatmaps_scale_mode <= 2, "Non valid `heatmaps_scale_mode`.", __LINE__, __FUNCTION__, __FILE__);
- const auto heatMapsScaleMode = (FLAGS_heatmaps_scale_mode == 0 ? op::ScaleMode::PlusMinusOne : (FLAGS_heatmaps_scale_mode == 1 ? op::ScaleMode::ZeroToOne : op::ScaleMode::UnsignedChar ));
+ op::check(FLAGS_heatmaps_scale >= 0 && FLAGS_heatmaps_scale <= 2, "Non valid `heatmaps_scale`.", __LINE__, __FUNCTION__, __FILE__);
+ const auto heatMapScale = (FLAGS_heatmaps_scale == 0 ? op::ScaleMode::PlusMinusOne : (FLAGS_heatmaps_scale == 1 ? op::ScaleMode::ZeroToOne : op::ScaleMode::UnsignedChar ));
// return
- return std::make_tuple(outputSize, netInputSize, poseModel, scaleMode, heatMapTypes, heatMapsScaleMode);
+ return std::make_tuple(outputSize, netInputSize, faceNetInputSize, poseModel, keypointScale, heatMapTypes, heatMapScale);
}
int openPoseTutorialWrapper2()
@@ -317,13 +327,14 @@ int openPoseTutorialWrapper2()
const auto timerBegin = std::chrono::high_resolution_clock::now();
// Applying user defined configuration
- cv::Size outputSize;
- cv::Size netInputSize;
+ op::Point outputSize;
+ op::Point netInputSize;
+ op::Point faceNetInputSize;
op::PoseModel poseModel;
- op::ScaleMode scaleMode;
+ op::ScaleMode keypointScale;
std::vector heatMapTypes;
- op::ScaleMode heatMapsScaleMode;
- std::tie(outputSize, netInputSize, poseModel, scaleMode, heatMapTypes, heatMapsScaleMode) = gflagsToOpParameters();
+ op::ScaleMode heatMapScale;
+ std::tie(outputSize, netInputSize, faceNetInputSize, poseModel, keypointScale, heatMapTypes, heatMapScale) = gflagsToOpParameters();
op::log("", op::Priority::Low, __LINE__, __FUNCTION__, __FILE__);
// Initializing the user custom classes
@@ -348,21 +359,24 @@ int openPoseTutorialWrapper2()
const bool displayGui = false;
const bool guiVerbose = false;
const bool fullScreen = false;
- const op::WrapperStructPose wrapperStructPose{netInputSize, outputSize, scaleMode, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_num_scales, (float)FLAGS_scale_gap,
- !FLAGS_no_render_output, poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap,
- FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapsScaleMode};
- const op::WrapperStructOutput wrapperStructOutput{displayGui, guiVerbose, fullScreen, FLAGS_write_pose, op::stringToDataFormat(FLAGS_write_pose_format),
- FLAGS_write_pose_json, FLAGS_write_coco_json, FLAGS_write_images, FLAGS_write_images_format, FLAGS_write_video,
- FLAGS_write_heatmaps, FLAGS_write_heatmaps_format};
- // Pose configuration (use WrapperStructPose{} for default and recommended configuration)
- // Producer (use default to disable any input)
+ const op::WrapperStructPose wrapperStructPose{netInputSize, outputSize, keypointScale, FLAGS_num_gpu, FLAGS_num_gpu_start, FLAGS_num_scales, (float)FLAGS_scale_gap,
+ !FLAGS_no_render_pose, poseModel, !FLAGS_disable_blending, (float)FLAGS_alpha_pose, (float)FLAGS_alpha_heatmap,
+ FLAGS_part_to_show, FLAGS_model_folder, heatMapTypes, heatMapScale};
+ // (Experimental, function and class names might change in next versions) Face configuration (use op::WrapperStructFace{} to disable it)
+ const op::WrapperStructFace wrapperStructFace{FLAGS_face, faceNetInputSize, !FLAGS_no_render_face, (float)FLAGS_alpha_face, (float)FLAGS_alpha_heatmap_face};
+ // (Experimental, function and class names might change in next versions) Hand configuration (use op::WrapperStructFace{} to disable it)
+ const op::experimental::WrapperStructHand wrapperStructHand{false};
// Consumer (comment or use default argument to disable any output)
- opWrapper.configure(wrapperStructPose, op::WrapperStructInput{}, wrapperStructOutput);
+ const op::WrapperStructOutput wrapperStructOutput{displayGui, guiVerbose, fullScreen, FLAGS_write_keypoint, op::stringToDataFormat(FLAGS_write_keypoint_format),
+ FLAGS_write_keypoint_json, FLAGS_write_coco_json, FLAGS_write_images, FLAGS_write_images_format, FLAGS_write_video,
+ FLAGS_write_heatmaps, FLAGS_write_heatmaps_format};
+ // Configure wrapper
+ opWrapper.configure(wrapperStructPose, wrapperStructFace, wrapperStructHand, op::WrapperStructInput{}, wrapperStructOutput);
// Set to single-thread running (e.g. for debugging purposes)
// opWrapper.disableMultiThreading();
op::log("Starting thread(s)", op::Priority::Max);
- // Two different ways of running the program on multithread enviroment
+ // Two different ways of running the program on multithread environment
// // Option a) Recommended - Also using the main thread (this thread) for processing (it saves 1 thread)
// // Start, run & stop threads
opWrapper.exec(); // It blocks this thread until all threads have finished
diff --git a/include/openpose/core/array.hpp b/include/openpose/core/array.hpp
index 6e5c5934..e9a77518 100644
--- a/include/openpose/core/array.hpp
+++ b/include/openpose/core/array.hpp
@@ -1,8 +1,8 @@
-#ifndef OPENPOSE__CORE__ARRAY_HPP
-#define OPENPOSE__CORE__ARRAY_HPP
+#ifndef OPENPOSE_CORE_ARRAY_HPP
+#define OPENPOSE_CORE_ARRAY_HPP
#include
-#include
+#include // cv::Mat
#include // Note: std::shared_ptr not (fully) supported for array pointers: http://stackoverflow.com/questions/8947579/
namespace op
@@ -327,6 +327,20 @@ namespace op
return at(getIndexAndCheck(indexes));
}
+ /**
+ * It returns a string with the whole array data. Useful for debugging.
+ * The format is: values separated by a space, and a enter for each dimension. E.g.:
+ * For the Array{2, 2, 3}, it will print:
+ * Array::toString():
+ * x1 x2 x3
+ * x4 x5 x6
+ *
+ * x7 x8 x9
+ * x10 x11 x12
+ * @return A string with the array values in the above format.
+ */
+ const std::string toString() const;
+
private:
std::vector mSize;
size_t mVolume;
@@ -363,4 +377,4 @@ namespace op
};
}
-#endif // OPENPOSE__CORE__ARRAY_HPP
+#endif // OPENPOSE_CORE_ARRAY_HPP
diff --git a/include/openpose/core/cvMatToOpInput.hpp b/include/openpose/core/cvMatToOpInput.hpp
index ba2d867a..50fc2e1d 100644
--- a/include/openpose/core/cvMatToOpInput.hpp
+++ b/include/openpose/core/cvMatToOpInput.hpp
@@ -1,16 +1,17 @@
-#ifndef OPENPOSE__CORE__CV_MAT_TO_OP_INPUT_HPP
-#define OPENPOSE__CORE__CV_MAT_TO_OP_INPUT_HPP
+#ifndef OPENPOSE_CORE_CV_MAT_TO_OP_INPUT_HPP
+#define OPENPOSE_CORE_CV_MAT_TO_OP_INPUT_HPP
#include
-#include
+#include // cv::Mat
#include "array.hpp"
+#include "point.hpp"
namespace op
{
class CvMatToOpInput
{
public:
- CvMatToOpInput(const cv::Size& netInputResolution, const int scaleNumber = 1, const float scaleGap = 0.25);
+ CvMatToOpInput(const Point& netInputResolution, const int scaleNumber = 1, const float scaleGap = 0.25);
Array format(const cv::Mat& cvInputData) const;
@@ -21,4 +22,4 @@ namespace op
};
}
-#endif // OPENPOSE__CORE__CV_MAT_TO_OP_INPUT_HPP
+#endif // OPENPOSE_CORE_CV_MAT_TO_OP_INPUT_HPP
diff --git a/include/openpose/core/cvMatToOpOutput.hpp b/include/openpose/core/cvMatToOpOutput.hpp
index 4b98c25f..d33dc1a9 100644
--- a/include/openpose/core/cvMatToOpOutput.hpp
+++ b/include/openpose/core/cvMatToOpOutput.hpp
@@ -1,16 +1,17 @@
-#ifndef OPENPOSE__CORE__CV_MAT_TO_OP_OUTPUT_HPP
-#define OPENPOSE__CORE__CV_MAT_TO_OP_OUTPUT_HPP
+#ifndef OPENPOSE_CORE_CV_MAT_TO_OP_OUTPUT_HPP
+#define OPENPOSE_CORE_CV_MAT_TO_OP_OUTPUT_HPP
#include
-#include
+#include // cv::Mat
#include "array.hpp"
+#include "point.hpp"
namespace op
{
class CvMatToOpOutput
{
public:
- CvMatToOpOutput(const cv::Size& outputResolution, const bool generateOutput = true);
+ CvMatToOpOutput(const Point& outputResolution, const bool generateOutput = true);
std::tuple> format(const cv::Mat& cvInputData) const;
@@ -20,4 +21,4 @@ namespace op
};
}
-#endif // OPENPOSE__CORE__CV_MAT_TO_OP_OUTPUT_HPP
+#endif // OPENPOSE_CORE_CV_MAT_TO_OP_OUTPUT_HPP
diff --git a/include/openpose/core/datum.hpp b/include/openpose/core/datum.hpp
index 22e558f1..b85e5011 100644
--- a/include/openpose/core/datum.hpp
+++ b/include/openpose/core/datum.hpp
@@ -1,9 +1,12 @@
-#ifndef OPENPOSE__CORE__DATUM_HPP
-#define OPENPOSE__CORE__DATUM_HPP
+#ifndef OPENPOSE_CORE_DATUM_HPP
+#define OPENPOSE_CORE_DATUM_HPP
+#include // std::shared_ptr
#include // std::string
#include // cv::Mat
#include "array.hpp"
+#include "point.hpp"
+#include "rectangle.hpp"
namespace op
{
@@ -17,7 +20,7 @@ namespace op
// -------------------------------------------------- ID parameters -------------------------------------------------- //
unsigned long long id; /**< Datum ID. Internally used to sort the Datums if multi-threading is used. */
- std::string name; /**< Name used when saving the data to disk (e.g. `write_images` or `write_pose` flags in the demo). */
+ std::string name; /**< Name used when saving the data to disk (e.g. `write_images` or `write_keypoint` flags in the demo). */
// -------------------------------------------------- Input image and rendered version parameters -------------------------------------------------- //
/**
@@ -37,7 +40,7 @@ namespace op
/**
* Rendered image in Array format.
* It consists of a blending of the inputNetData and the pose/body part(s) heatmap/PAF(s).
- * If rendering is disabled (e.g. `no_render_output` flag in the demo), then outputData will be empty.
+ * If rendering is disabled (e.g. `no_render_pose` flag in the demo), then outputData will be empty.
* Size: 3 x output_net_height x output_net_width
*/
Array outputData;
@@ -57,31 +60,38 @@ namespace op
* If outputData is empty, then cvOutputData will also be empty.
* Size: #people x #body parts (e.g. 18 for COCO or 15 for MPI) x 3 ((x,y) coordinates + score)
*/
- Array poseKeyPoints;
+ Array poseKeypoints;
/**
* Body pose heatmaps (body parts, background and/or PAFs) for the whole image.
* This parameters is by default empty and disabled for performance. Each group (body parts, background and PAFs) can be individually enabled.
* #heatmaps = #body parts (if enabled) + 1 (if background enabled) + 2 x #PAFs (if enabled). Each PAF has 2 consecutive channels, one for x- and one for y-coordinates.
* Order heatmaps: body parts + background (as appears in POSE_BODY_PART_MAPPING) + (x,y) channel of each PAF (sorted as appears in POSE_BODY_PART_PAIRS). See `pose/poseParameters.hpp`.
- * The user can choose the heatmaps normalization: ranges [0, 1], [-1, 1] or [0, 255]. Check the `heatmaps_scale_mode` flag in the examples/tutorial_wrapper/ for more details.
+ * The user can choose the heatmaps normalization: ranges [0, 1], [-1, 1] or [0, 255]. Check the `heatmaps_scale` flag in the examples/tutorial_wrapper/ for more details.
* Size: #heatmaps x output_net_height x output_net_width
*/
Array poseHeatMaps;
/**
- * Experimental (NOT IMPLEMENTED YET)
- * Face code is in development phase. Not included in this version.
- * Size: #people's faces to render x #face parts (71) x 3 ((x,y) coordinates + score)
+ * Face detection locations (x,y,width,height) for each person in the image.
+ * It has been resized to the same resolution as `poseKeypoints`.
+ * Size: #people
*/
- Array faceKeyPoints;
+ std::vector> faceRectangles;
+
+ /**
+ * Face keypoints (x,y,score) locations for each person in the image.
+ * It has been resized to the same resolution as `poseKeypoints`.
+ * Size: #people x #face parts (70) x 3 ((x,y) coordinates + score)
+ */
+ Array faceKeypoints;
/**
* Experimental (NOT IMPLEMENTED YET)
* Hands code is in development phase. Not included in this version.
* Size: #people's hands to render x 2 (right and left hand) x #hand parts (21) x 3 ((x,y) coordinates + score)
*/
- Array handKeyPoints;
+ Array handKeypoints;
// -------------------------------------------------- Other parameters -------------------------------------------------- //
double scaleInputToOutput; /**< Scale ratio between the input Datum::cvInputData and the output Datum::cvOutputData. */
@@ -209,4 +219,4 @@ namespace op
};
}
-#endif // OPENPOSE__CORE__DATUM_HPP
+#endif // OPENPOSE_CORE_DATUM_HPP
diff --git a/include/openpose/core/enumClasses.hpp b/include/openpose/core/enumClasses.hpp
index a2e8b184..f7821883 100644
--- a/include/openpose/core/enumClasses.hpp
+++ b/include/openpose/core/enumClasses.hpp
@@ -1,5 +1,5 @@
-#ifndef OPENPOSE__CORE__ENUM_CLASSES_HPP
-#define OPENPOSE__CORE__ENUM_CLASSES_HPP
+#ifndef OPENPOSE_CORE_ENUM_CLASSES_HPP
+#define OPENPOSE_CORE_ENUM_CLASSES_HPP
namespace op
{
@@ -21,4 +21,4 @@ namespace op
};
}
-#endif // OPENPOSE__CORE__ENUM_CLASSES_HPP
+#endif // OPENPOSE_CORE_ENUM_CLASSES_HPP
diff --git a/include/openpose/core/headers.hpp b/include/openpose/core/headers.hpp
index 1075cf7c..89655e5e 100644
--- a/include/openpose/core/headers.hpp
+++ b/include/openpose/core/headers.hpp
@@ -1,5 +1,5 @@
-#ifndef OPENPOSE__CORE__HEADERS_HPP
-#define OPENPOSE__CORE__HEADERS_HPP
+#ifndef OPENPOSE_CORE_HEADERS_HPP
+#define OPENPOSE_CORE_HEADERS_HPP
// core module
#include "array.hpp"
@@ -7,19 +7,21 @@
#include "cvMatToOpOutput.hpp"
#include "datum.hpp"
#include "enumClasses.hpp"
-#include "keyPointScaler.hpp"
+#include "keypointScaler.hpp"
#include "net.hpp"
#include "netCaffe.hpp"
#include "nmsBase.hpp"
#include "nmsCaffe.hpp"
#include "opOutputToCvMat.hpp"
+#include "point.hpp"
+#include "rectangle.hpp"
#include "renderer.hpp"
#include "resizeAndMergeBase.hpp"
#include "resizeAndMergeCaffe.hpp"
-#include "scaleKeyPoints.hpp"
+#include "scaleKeypoints.hpp"
#include "wCvMatToOpInput.hpp"
#include "wCvMatToOpOutput.hpp"
-#include "wKeyPointScaler.hpp"
+#include "wKeypointScaler.hpp"
#include "wOpOutputToCvMat.hpp"
-#endif // OPENPOSE__CORE__HEADERS_HPP
+#endif // OPENPOSE_CORE_HEADERS_HPP
diff --git a/include/openpose/core/keyPointScaler.hpp b/include/openpose/core/keypointScaler.hpp
similarity index 50%
rename from include/openpose/core/keyPointScaler.hpp
rename to include/openpose/core/keypointScaler.hpp
index 9ed2e139..1046aee4 100644
--- a/include/openpose/core/keyPointScaler.hpp
+++ b/include/openpose/core/keypointScaler.hpp
@@ -1,24 +1,25 @@
-#ifndef OPENPOSE__CORE__KEY_POINT_SCALER_HPP
-#define OPENPOSE__CORE__KEY_POINT_SCALER_HPP
+#ifndef OPENPOSE_CORE_KEYPOINT_SCALER_HPP
+#define OPENPOSE_CORE_KEYPOINT_SCALER_HPP
#include
#include "array.hpp"
+#include "point.hpp"
#include "enumClasses.hpp"
namespace op
{
- class KeyPointScaler
+ class KeypointScaler
{
public:
- explicit KeyPointScaler(const ScaleMode scaleMode);
+ explicit KeypointScaler(const ScaleMode scaleMode);
- void scale(Array& arrayToScale, const float scaleInputToOutput, const float scaleNetToOutput, const cv::Size& producerSize) const;
+ void scale(Array& arrayToScale, const float scaleInputToOutput, const float scaleNetToOutput, const Point& producerSize) const;
- void scale(std::vector