From d35b6056fe7dde7f16fcdc019541ce0789a995bf Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 3 Oct 2017 18:43:06 +0000 Subject: [PATCH] Deploy code docs to GitHub Pages Travis build: 37 Commit: f54a312bc9808ac25d92caaaf67e5229d7025810 --- doxygen.log | 21 +- html/classop_1_1_face_extractor-members.html | 5 +- html/classop_1_1_face_extractor.html | 37 +- html/classop_1_1_face_extractor.js | 3 +- html/classop_1_1_hand_extractor-members.html | 5 +- html/classop_1_1_hand_extractor.html | 37 +- html/classop_1_1_hand_extractor.js | 3 +- html/datum_8hpp_source.html | 138 ++- html/face_extractor_8hpp.html | 1 + html/face_extractor_8hpp_source.html | 81 +- html/functions_f.html | 5 +- html/functions_func_f.html | 2 +- html/functions_func_g.html | 8 +- html/functions_func_h.html | 2 +- html/functions_g.html | 4 +- html/functions_h.html | 5 +- html/functions_vars.html | 6 + html/hand_extractor_8hpp.html | 1 + html/hand_extractor_8hpp_source.html | 105 +- html/namespaceop.html | 96 +- html/navtree.js | 10 +- html/navtreeindex0.js | 14 +- html/navtreeindex1.js | 6 +- html/navtreeindex2.js | 6 +- html/navtreeindex3.js | 8 +- html/navtreeindex4.js | 36 +- html/navtreeindex5.js | 4 + html/search/all_5.js | 7 +- html/search/all_6.js | 2 +- html/search/all_7.js | 23 +- html/search/functions_5.js | 2 +- html/search/functions_6.js | 2 +- html/search/functions_7.js | 2 +- html/search/variables_5.js | 1 + html/search/variables_7.js | 1 + html/structop_1_1_datum-members.html | 6 +- html/structop_1_1_datum.html | 32 +- html/structop_1_1_datum.js | 2 + html/w_face_extractor_8hpp_source.html | 43 +- html/w_hand_extractor_8hpp_source.html | 46 +- html/w_heat_map_saver_8hpp_source.html | 44 +- html/w_pose_extractor_8hpp_source.html | 4 +- html/wrapper_8hpp_source.html | 1173 +++++++++--------- 43 files changed, 1105 insertions(+), 934 deletions(-) diff --git a/doxygen.log b/doxygen.log index 8c933bc7..a687f008 100644 --- a/doxygen.log +++ b/doxygen.log @@ -640,12 +640,16 @@ Generating docs for file /home/travis/build/CMU-Perceptual-Computing-Lab/openpos Generating docs for file /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/thread/worker.hpp... Generating docs for file /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/thread/workerConsumer.hpp... Generating docs for file /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/thread/workerProducer.hpp... -Generating docs for file /home/travi/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:81: warning: explicit link request to 'people' could not be resolved +Generating docs for file /home/travi/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:88: warning: explicit link request to 'people' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:88: warning: explicit link request to 'face' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:81: warning: explicit link request to 'people' could not be resolved /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:81: warning: explicit link request to 'face' could not be resolved /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:74: warning: explicit link request to 'people' could not be resolved -/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:96: warning: explicit link request to 'people' could not be resolved -/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:96: warning: explicit link request to 'hand' could not be resolved -/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:88: warning: explicit link request to 'people' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:110: warning: explicit link request to 'people' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:110: warning: explicit link request to 'hand' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:103: warning: explicit link request to 'people' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:103: warning: explicit link request to 'hand' could not be resolved +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:95: warning: explicit link request to 'people' could not be resolved /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:32: warning: explicit link request to 'scales' could not be resolved /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:64: warning: explicit link request to 'heatmaps' could not be resolved /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/datum.hpp:64: warning: explicit link request to 'body' could not be resolved @@ -710,8 +714,11 @@ Generating docs for compound op::KeypointJsonSaver... Generating docs for compound op::KeypointSaver... Generating docs for compound op::VideoSaver... Generating docs for compound op::WCocoJsonSaver... -Generating/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/hand/handExtractor.hpp:39: warning: argument 'fpsMode' of command @param is not found in the argument list of op::HandExtractor::forwardPass(const std::vector< std::array< Rectangle< float >, 2 >> handRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput) -/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/hand/handExtractor.hpp:39: warning: The following parameters of op::HandExtractor::forwardPass(const std::vector< std::array< Rectangle< float >, 2 >> handRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput) are not documented: +Generating/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/hand/handExtractor.hpp:22: warning: The following parameters of op::HandExtractor::HandExtractor(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const unsigned short numberScales=1, const float rangeScales=0.4f, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne) are not documented: + parameter 'heatMapTypes' + parameter 'heatMapScale' +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/hand/handExtractor.hpp:44: warning: argument 'fpsMode' of command @param is not found in the argument list of op::HandExtractor::forwardPass(const std::vector< std::array< Rectangle< float >, 2 >> handRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput) +/home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/hand/handExtractor.hpp:44: warning: The following parameters of op::HandExtractor::forwardPass(const std::vector< std::array< Rectangle< float >, 2 >> handRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput) are not documented: parameter 'handRectangles' /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/producer/producer.hpp:20: warning: argument 'repeatWhenFinished' of command @param is not found in the argument list of op::Producer::Producer(const ProducerType type) /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/producer/producer.hpp:20: warning: The following parameters of op::Producer::Producer(const ProducerType type) are not documented: @@ -816,5 +823,5 @@ Generating file index... Generating file member index... Generating example index... finalizing index lists... -lookup cache used 2430/65536 hits=13693 misses=2547 +lookup cache used 2453/65536 hits=13822 misses=2571 finished... diff --git a/html/classop_1_1_face_extractor-members.html b/html/classop_1_1_face_extractor-members.html index b7f3b17a..8aae54c5 100644 --- a/html/classop_1_1_face_extractor-members.html +++ b/html/classop_1_1_face_extractor-members.html @@ -112,10 +112,11 @@ $(document).ready(function(){initNavTree('classop_1_1_face_extractor.html','');}

This is the complete list of members for op::FaceExtractor, including all inherited members.

- + - + +
FaceExtractor(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId)op::FaceExtractorexplicit
FaceExtractor(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne)op::FaceExtractorexplicit
forwardPass(const std::vector< Rectangle< float >> &faceRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput)op::FaceExtractor
getFaceKeypoints() const op::FaceExtractor
initializationOnThread()op::FaceExtractor
getHeatMaps() const op::FaceExtractor
initializationOnThread()op::FaceExtractor
diff --git a/html/classop_1_1_face_extractor.html b/html/classop_1_1_face_extractor.html index 05fba7c3..e1183b38 100644 --- a/html/classop_1_1_face_extractor.html +++ b/html/classop_1_1_face_extractor.html @@ -117,17 +117,19 @@ $(document).ready(function(){initNavTree('classop_1_1_face_extractor.html','');} - - + + + +

Public Member Functions

 FaceExtractor (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId)
 
 FaceExtractor (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne)
 
void initializationOnThread ()
 
void forwardPass (const std::vector< Rectangle< float >> &faceRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput)
 
Array< float > getFaceKeypoints () const
 
Array< float > getHeatMaps () const
 

Constructor & Destructor Documentation

- +
@@ -156,7 +158,19 @@ Public Member Functions - + + + + + + + + + + + + + @@ -219,6 +233,21 @@ Public Member Functions
const int gpuId gpuId,
const std::vector< HeatMapType > & heatMapTypes = {},
const ScaleMode heatMapScale = ScaleMode::ZeroToOne 
+
+
+ +
+
+ + + + + + + +
Array<float> op::FaceExtractor::getHeatMaps () const
+
+
diff --git a/html/classop_1_1_face_extractor.js b/html/classop_1_1_face_extractor.js index 3f47e434..9f87f447 100644 --- a/html/classop_1_1_face_extractor.js +++ b/html/classop_1_1_face_extractor.js @@ -1,7 +1,8 @@ var classop_1_1_face_extractor = [ - [ "FaceExtractor", "classop_1_1_face_extractor.html#aa2c31df663d2bb2e4d965833bb8270a8", null ], + [ "FaceExtractor", "classop_1_1_face_extractor.html#a04b4cd08bc5cbba132be73368890af02", null ], [ "forwardPass", "classop_1_1_face_extractor.html#a557850c549e3972916e833f9ffea99e1", null ], [ "getFaceKeypoints", "classop_1_1_face_extractor.html#a13d7920f4029a4aa6d63b3609956c475", null ], + [ "getHeatMaps", "classop_1_1_face_extractor.html#af326457ed8977781fe48f1086ac5efee", null ], [ "initializationOnThread", "classop_1_1_face_extractor.html#a2692c0040bb8c0b84a84d195194d037a", null ] ]; \ No newline at end of file diff --git a/html/classop_1_1_hand_extractor-members.html b/html/classop_1_1_hand_extractor-members.html index e2046b68..7211efb0 100644 --- a/html/classop_1_1_hand_extractor-members.html +++ b/html/classop_1_1_hand_extractor-members.html @@ -114,8 +114,9 @@ $(document).ready(function(){initNavTree('classop_1_1_hand_extractor.html','');} - - + + +
forwardPass(const std::vector< std::array< Rectangle< float >, 2 >> handRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput)op::HandExtractor
getHandKeypoints() const op::HandExtractor
HandExtractor(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const unsigned short numberScales=1, const float rangeScales=0.4f)op::HandExtractorexplicit
initializationOnThread()op::HandExtractor
getHeatMaps() const op::HandExtractor
HandExtractor(const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const unsigned short numberScales=1, const float rangeScales=0.4f, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne)op::HandExtractorexplicit
initializationOnThread()op::HandExtractor
diff --git a/html/classop_1_1_hand_extractor.html b/html/classop_1_1_hand_extractor.html index af70e92b..7667c0b2 100644 --- a/html/classop_1_1_hand_extractor.html +++ b/html/classop_1_1_hand_extractor.html @@ -117,19 +117,21 @@ $(document).ready(function(){initNavTree('classop_1_1_hand_extractor.html','');} - - + + + +

Public Member Functions

 HandExtractor (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const unsigned short numberScales=1, const float rangeScales=0.4f)
 
 HandExtractor (const Point< int > &netInputSize, const Point< int > &netOutputSize, const std::string &modelFolder, const int gpuId, const unsigned short numberScales=1, const float rangeScales=0.4f, const std::vector< HeatMapType > &heatMapTypes={}, const ScaleMode heatMapScale=ScaleMode::ZeroToOne)
 
void initializationOnThread ()
 
void forwardPass (const std::vector< std::array< Rectangle< float >, 2 >> handRectangles, const cv::Mat &cvInputData, const float scaleInputToOutput)
 
std::array< Array< float >, 2 > getHandKeypoints () const
 
std::array< Array< float >, 2 > getHeatMaps () const
 

Detailed Description

Hand keypoint extractor class.

Constructor & Destructor Documentation

- +
@@ -170,7 +172,19 @@ Public Member Functions - + + + + + + + + + + + + + @@ -256,6 +270,21 @@ Public Member Functions

This function returns the hand keypoins. VERY IMPORTANT: use getHandKeypoints().clone() if the keypoints are going to be edited in a different thread.

Returns
And std::array with all the left hand keypoints (index 0) and all the right ones (index 1). Each Array<float> follows the pose structure, i.e. the first dimension corresponds to all the people in the image, the second to each specific keypoint, and the third one to (x, y, score).
+ + + +
+
+
const float rangeScales = 0.4f rangeScales = 0.4f,
const std::vector< HeatMapType > & heatMapTypes = {},
const ScaleMode heatMapScale = ScaleMode::ZeroToOne 
+ + + + + + +
std::array<Array<float>, 2> op::HandExtractor::getHeatMaps () const
+
+
diff --git a/html/classop_1_1_hand_extractor.js b/html/classop_1_1_hand_extractor.js index be53bbe6..e34e3851 100644 --- a/html/classop_1_1_hand_extractor.js +++ b/html/classop_1_1_hand_extractor.js @@ -1,7 +1,8 @@ var classop_1_1_hand_extractor = [ - [ "HandExtractor", "classop_1_1_hand_extractor.html#a7ec55995554e5f617b56145c8c432558", null ], + [ "HandExtractor", "classop_1_1_hand_extractor.html#a0a86a06bdf506b28497c8b7f7469bb31", null ], [ "forwardPass", "classop_1_1_hand_extractor.html#a0f76c1b4cf6770bbb889259204510877", null ], [ "getHandKeypoints", "classop_1_1_hand_extractor.html#a322a1c3a0ab7abaf0c697246af9309cc", null ], + [ "getHeatMaps", "classop_1_1_hand_extractor.html#af5ce8cd602820921de3ec3f676aacf0d", null ], [ "initializationOnThread", "classop_1_1_hand_extractor.html#aa5592a468cfdcfdd687d6f9d465d3eda", null ] ]; \ No newline at end of file diff --git a/html/datum_8hpp_source.html b/html/datum_8hpp_source.html index 89a0ffff..7b60cd94 100644 --- a/html/datum_8hpp_source.html +++ b/html/datum_8hpp_source.html @@ -138,89 +138,95 @@ $(document).ready(function(){initNavTree('datum_8hpp_source.html','');});
77 
83  Array<float> faceKeypoints;
84 
-
90  std::vector<std::array<Rectangle<float>, 2>> handRectangles;
+
90  Array<float> faceHeatMaps;
91 
-
98  std::array<Array<float>, 2> handKeypoints;
-
99 
-
100  // -------------------------------------------------- Other parameters -------------------------------------------------- //
-
101  float scaleInputToOutput;
-
103  float scaleNetToOutput;
-
105  std::vector<float> scaleRatios;
-
107  std::pair<int, std::string> elementRendered;
-
113  // -------------------------------------------------- Functions -------------------------------------------------- //
-
118  explicit Datum();
-
119 
-
127  Datum(const Datum& datum);
-
128 
-
135  Datum& operator=(const Datum& datum);
-
136 
-
142  Datum(Datum&& datum);
-
143 
-
150  Datum& operator=(Datum&& datum);
-
151 
-
156  virtual ~Datum();
+
97  std::vector<std::array<Rectangle<float>, 2>> handRectangles;
+
98 
+
105  std::array<Array<float>, 2> handKeypoints;
+
106 
+
112  std::array<Array<float>, 2> handHeatMaps;
+
113 
+
114  // -------------------------------------------------- Other parameters -------------------------------------------------- //
+
115  float scaleInputToOutput;
+
117  float scaleNetToOutput;
+
119  std::vector<float> scaleRatios;
+
121  std::pair<int, std::string> elementRendered;
+
127  // -------------------------------------------------- Functions -------------------------------------------------- //
+
132  explicit Datum();
+
133 
+
141  Datum(const Datum& datum);
+
142 
+
149  Datum& operator=(const Datum& datum);
+
150 
+
156  Datum(Datum&& datum);
157 
-
164  Datum clone() const;
+
164  Datum& operator=(Datum&& datum);
165 
-
166 
-
167 
-
168 
-
169 
-
170  // -------------------------------------------------- Comparison operators -------------------------------------------------- //
-
176  inline bool operator<(const Datum& datum) const
-
177  {
-
178  return id < datum.id;
-
179  }
-
185  inline bool operator>(const Datum& datum) const
-
186  {
-
187  return id > datum.id;
-
188  }
-
194  inline bool operator<=(const Datum& datum) const
-
195  {
-
196  return id <= datum.id;
-
197  }
-
203  inline bool operator>=(const Datum& datum) const
-
204  {
-
205  return id >= datum.id;
-
206  }
-
212  inline bool operator==(const Datum& datum) const
-
213  {
-
214  return id == datum.id;
-
215  }
-
221  inline bool operator!=(const Datum& datum) const
-
222  {
-
223  return id != datum.id;
-
224  }
-
225  };
-
226 }
-
227 
-
228 #endif // OPENPOSE_CORE_DATUM_HPP
-
float scaleNetToOutput
Definition: datum.hpp:103
+
170  virtual ~Datum();
+
171 
+
178  Datum clone() const;
+
179 
+
180 
+
181 
+
182 
+
183 
+
184  // -------------------------------------------------- Comparison operators -------------------------------------------------- //
+
190  inline bool operator<(const Datum& datum) const
+
191  {
+
192  return id < datum.id;
+
193  }
+
199  inline bool operator>(const Datum& datum) const
+
200  {
+
201  return id > datum.id;
+
202  }
+
208  inline bool operator<=(const Datum& datum) const
+
209  {
+
210  return id <= datum.id;
+
211  }
+
217  inline bool operator>=(const Datum& datum) const
+
218  {
+
219  return id >= datum.id;
+
220  }
+
226  inline bool operator==(const Datum& datum) const
+
227  {
+
228  return id == datum.id;
+
229  }
+
235  inline bool operator!=(const Datum& datum) const
+
236  {
+
237  return id != datum.id;
+
238  }
+
239  };
+
240 }
+
241 
+
242 #endif // OPENPOSE_CORE_DATUM_HPP
+
float scaleNetToOutput
Definition: datum.hpp:117
std::string name
Definition: datum.hpp:19
-
bool operator==(const Datum &datum) const
Definition: datum.hpp:212
+
bool operator==(const Datum &datum) const
Definition: datum.hpp:226
Array< float > poseHeatMaps
Definition: datum.hpp:69
-
std::pair< int, std::string > elementRendered
Definition: datum.hpp:107
-
bool operator!=(const Datum &datum) const
Definition: datum.hpp:221
+
std::array< Array< float >, 2 > handHeatMaps
Definition: datum.hpp:112
+
std::pair< int, std::string > elementRendered
Definition: datum.hpp:121
+
bool operator!=(const Datum &datum) const
Definition: datum.hpp:235
Array< float > inputNetData
Definition: datum.hpp:34
std::vector< Rectangle< float > > faceRectangles
Definition: datum.hpp:76
Array< float > poseKeypoints
Definition: datum.hpp:59
-
std::vector< std::array< Rectangle< float >, 2 > > handRectangles
Definition: datum.hpp:90
-
bool operator<(const Datum &datum) const
Definition: datum.hpp:176
+
std::vector< std::array< Rectangle< float >, 2 > > handRectangles
Definition: datum.hpp:97
+
bool operator<(const Datum &datum) const
Definition: datum.hpp:190
Array< float > outputData
Definition: datum.hpp:42
-
std::array< Array< float >, 2 > handKeypoints
Definition: datum.hpp:98
-
std::vector< float > scaleRatios
Definition: datum.hpp:105
+
std::array< Array< float >, 2 > handKeypoints
Definition: datum.hpp:105
+
std::vector< float > scaleRatios
Definition: datum.hpp:119
Definition: datum.hpp:14
+
Array< float > faceHeatMaps
Definition: datum.hpp:90
cv::Mat cvInputData
Definition: datum.hpp:26
cv::Mat cvOutputData
Definition: datum.hpp:50
Array< float > faceKeypoints
Definition: datum.hpp:83
unsigned long long id
Definition: datum.hpp:17
-
float scaleInputToOutput
Definition: datum.hpp:101
-
bool operator<=(const Datum &datum) const
Definition: datum.hpp:194
+
float scaleInputToOutput
Definition: datum.hpp:115
+
bool operator<=(const Datum &datum) const
Definition: datum.hpp:208
#define OP_API
Definition: macros.hpp:5
-
bool operator>(const Datum &datum) const
Definition: datum.hpp:185
-
bool operator>=(const Datum &datum) const
Definition: datum.hpp:203
+
bool operator>(const Datum &datum) const
Definition: datum.hpp:199
+
bool operator>=(const Datum &datum) const
Definition: datum.hpp:217
diff --git a/html/face_extractor_8hpp.html b/html/face_extractor_8hpp.html index 3859d3cd..71392965 100644 --- a/html/face_extractor_8hpp.html +++ b/html/face_extractor_8hpp.html @@ -117,6 +117,7 @@ $(document).ready(function(){initNavTree('face_extractor_8hpp.html','');}); #include <openpose/core/maximumCaffe.hpp>
#include <openpose/core/net.hpp>
#include <openpose/core/resizeAndMergeCaffe.hpp>
+#include <openpose/core/enumClasses.hpp>

Go to the source code of this file.

diff --git a/html/face_extractor_8hpp_source.html b/html/face_extractor_8hpp_source.html index 03dfdcf7..b17bcad9 100644 --- a/html/face_extractor_8hpp_source.html +++ b/html/face_extractor_8hpp_source.html @@ -117,51 +117,64 @@ $(document).ready(function(){initNavTree('face_extractor_8hpp_source.html','');}
8 #include <openpose/core/maximumCaffe.hpp>
9 #include <openpose/core/net.hpp>
10 #include <openpose/core/resizeAndMergeCaffe.hpp>
-
11 
-
12 namespace op
-
13 {
-
14  class OP_API FaceExtractor
-
15  {
-
16  public:
-
17  explicit FaceExtractor(const Point<int>& netInputSize, const Point<int>& netOutputSize, const std::string& modelFolder, const int gpuId);
-
18 
-
19  void initializationOnThread();
-
20 
-
21  void forwardPass(const std::vector<Rectangle<float>>& faceRectangles, const cv::Mat& cvInputData, const float scaleInputToOutput);
+
11 #include <openpose/core/enumClasses.hpp>
+
12 
+
13 namespace op
+
14 {
+
15  class OP_API FaceExtractor
+
16  {
+
17  public:
+
18  explicit FaceExtractor(const Point<int>& netInputSize, const Point<int>& netOutputSize,
+
19  const std::string& modelFolder, const int gpuId,
+
20  const std::vector<HeatMapType>& heatMapTypes = {},
+
21  const ScaleMode heatMapScale = ScaleMode::ZeroToOne);
22 
-
23  Array<float> getFaceKeypoints() const;
+
23  void initializationOnThread();
24 
-
25  private:
-
26  const Point<int> mNetOutputSize;
-
27  const Point<int> mOutputSize;
-
28  std::shared_ptr<Net> spNet;
-
29  std::shared_ptr<ResizeAndMergeCaffe<float>> spResizeAndMergeCaffe;
-
30  std::shared_ptr<MaximumCaffe<float>> spMaximumCaffe;
-
31  Array<float> mFaceImageCrop;
-
32  Array<float> mFaceKeypoints;
-
33  // Init with thread
-
34  boost::shared_ptr<caffe::Blob<float>> spCaffeNetOutputBlob;
-
35  std::shared_ptr<caffe::Blob<float>> spHeatMapsBlob;
-
36  std::shared_ptr<caffe::Blob<float>> spPeaksBlob;
-
37  std::thread::id mThreadId;
-
38 
-
39  void checkThread() const;
-
40 
-
41  DELETE_COPY(FaceExtractor);
-
42  };
-
43 }
-
44 
-
45 #endif // OPENPOSE_FACE_FACE_EXTRACTOR_HPP
+
25  void forwardPass(const std::vector<Rectangle<float>>& faceRectangles, const cv::Mat& cvInputData,
+
26  const float scaleInputToOutput);
+
27 
+
28  Array<float> getFaceKeypoints() const;
+
29 
+
30  Array<float> getHeatMaps() const;
+
31 
+
32  private:
+
33  const Point<int> mNetOutputSize;
+
34  std::shared_ptr<Net> spNet;
+
35  std::shared_ptr<ResizeAndMergeCaffe<float>> spResizeAndMergeCaffe;
+
36  std::shared_ptr<MaximumCaffe<float>> spMaximumCaffe;
+
37  Array<float> mFaceImageCrop;
+
38  Array<float> mFaceKeypoints;
+
39  // HeatMaps parameters
+
40  const ScaleMode mHeatMapScaleMode;
+
41  const std::vector<HeatMapType> mHeatMapTypes;
+
42  Array<float> mHeatMaps;
+
43  // Init with thread
+
44  boost::shared_ptr<caffe::Blob<float>> spCaffeNetOutputBlob;
+
45  std::shared_ptr<caffe::Blob<float>> spHeatMapsBlob;
+
46  std::shared_ptr<caffe::Blob<float>> spPeaksBlob;
+
47  std::thread::id mThreadId;
+
48 
+
49  void checkThread() const;
+
50 
+
51  DELETE_COPY(FaceExtractor);
+
52  };
+
53 }
+
54 
+
55 #endif // OPENPOSE_FACE_FACE_EXTRACTOR_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:25
+
+
ScaleMode
Definition: enumClasses.hpp:6
Definition: rectangle.hpp:10
#define OP_API
Definition: macros.hpp:5
-
Definition: faceExtractor.hpp:14
+
+
Definition: faceExtractor.hpp:15
diff --git a/html/functions_f.html b/html/functions_f.html index d9a484d4..c8579a2c 100644 --- a/html/functions_f.html +++ b/html/functions_f.html @@ -153,11 +153,14 @@ $(document).ready(function(){initNavTree('functions_f.html','');}); : op::FaceDetector
  • FaceExtractor() -: op::FaceExtractor +: op::FaceExtractor
  • FaceGpuRenderer() : op::FaceGpuRenderer
  • +
  • faceHeatMaps +: op::Datum +
  • faceKeypoints : op::Datum
  • diff --git a/html/functions_func_f.html b/html/functions_func_f.html index 7c657ac2..90d13aab 100644 --- a/html/functions_func_f.html +++ b/html/functions_func_f.html @@ -149,7 +149,7 @@ $(document).ready(function(){initNavTree('functions_func_f.html','');}); : op::FaceDetector
  • FaceExtractor() -: op::FaceExtractor +: op::FaceExtractor
  • FaceGpuRenderer() : op::FaceGpuRenderer diff --git a/html/functions_func_g.html b/html/functions_func_g.html index 150a71e9..99b0cb97 100644 --- a/html/functions_func_g.html +++ b/html/functions_func_g.html @@ -196,7 +196,9 @@ $(document).ready(function(){initNavTree('functions_func_g.html','');}); : op::PoseExtractor
  • getHeatMaps() -: op::PoseExtractor +: op::FaceExtractor +, op::HandExtractor +, op::PoseExtractor
  • getInputDataCpuPtr() : op::Net @@ -245,7 +247,7 @@ $(document).ready(function(){initNavTree('functions_func_g.html','');}); : op::Renderer
  • getSize() -: op::Array< T > +: op::Array< T >
  • getTWorkersSize() : op::SubThread< TDatums, TWorker > @@ -254,7 +256,7 @@ $(document).ready(function(){initNavTree('functions_func_g.html','');}); : op::Producer
  • getVolume() -: op::Array< T > +: op::Array< T >
  • GpuRenderer() : op::GpuRenderer diff --git a/html/functions_func_h.html b/html/functions_func_h.html index 65fbb63e..ed475f88 100644 --- a/html/functions_func_h.html +++ b/html/functions_func_h.html @@ -152,7 +152,7 @@ $(document).ready(function(){initNavTree('functions_func_h.html','');}); : op::HandDetectorFromTxt
  • HandExtractor() -: op::HandExtractor +: op::HandExtractor
  • HandGpuRenderer() : op::HandGpuRenderer diff --git a/html/functions_g.html b/html/functions_g.html index 0a8460f7..a9b2bf06 100644 --- a/html/functions_g.html +++ b/html/functions_g.html @@ -200,7 +200,9 @@ $(document).ready(function(){initNavTree('functions_g.html','');}); : op::PoseExtractor
  • getHeatMaps() -: op::PoseExtractor +: op::FaceExtractor +, op::HandExtractor +, op::PoseExtractor
  • getInputDataCpuPtr() : op::Net diff --git a/html/functions_h.html b/html/functions_h.html index b5e811ee..2eda6828 100644 --- a/html/functions_h.html +++ b/html/functions_h.html @@ -156,11 +156,14 @@ $(document).ready(function(){initNavTree('functions_h.html','');}); : op::HandDetectorFromTxt
  • HandExtractor() -: op::HandExtractor +: op::HandExtractor
  • HandGpuRenderer() : op::HandGpuRenderer
  • +
  • handHeatMaps +: op::Datum +
  • handKeypoints : op::Datum
  • diff --git a/html/functions_vars.html b/html/functions_vars.html index 84cded8a..f359e6ca 100644 --- a/html/functions_vars.html +++ b/html/functions_vars.html @@ -195,6 +195,9 @@ $(document).ready(function(){initNavTree('functions_vars.html','');});

    - f -

    -
    - - -
    -
    - - - - - - - - -
    op::COMPILE_TEMPLATE_DATUM (WHandExtractor )
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    op::COMPILE_TEMPLATE_DATUM (WFaceExtractor )
    -
    - -
    -
    - -
    -
    - - - - - - - - -
    op::COMPILE_TEMPLATE_DATUM (WHeatMapSaver )
    -
    -
    @@ -2206,6 +2158,22 @@ template<typename TPointerContainer >
    +
    + + +
    +
    + + + + + + + + +
    op::COMPILE_TEMPLATE_DATUM (WFaceExtractor )
    +
    +
    @@ -2222,6 +2190,38 @@ template<typename TPointerContainer >
    +
    + + +
    +
    + + + + + + + + +
    op::COMPILE_TEMPLATE_DATUM (WHeatMapSaver )
    +
    + +
    +
    + +
    +
    + + + + + + + + +
    op::COMPILE_TEMPLATE_DATUM (WHandExtractor )
    +
    +
    diff --git a/html/navtree.js b/html/navtree.js index 4c6dd4c9..388db4e9 100644 --- a/html/navtree.js +++ b/html/navtree.js @@ -35,11 +35,11 @@ var NAVTREE = var NAVTREEINDEX = [ "annotated.html", -"classop_1_1_queue.html#ae2b845322940bfc89b6342137d8ac372", -"classop_1_1_worker_consumer.html#a26cf5c40df363d94d603fce92a5b69eb", -"hand_detector_8hpp_source.html", -"rectangle_8hpp.html", -"w_gui_8hpp.html" +"classop_1_1_queue.html", +"classop_1_1_worker.html#ae45ac828f6e8f6055203c224e50f145b", +"hand_cpu_renderer_8hpp_source.html", +"queue_base_8hpp.html", +"w_face_renderer_8hpp_source.html" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/html/navtreeindex0.js b/html/navtreeindex0.js index 8b0d4389..498971cc 100644 --- a/html/navtreeindex0.js +++ b/html/navtreeindex0.js @@ -77,10 +77,11 @@ var NAVTREEINDEX0 = "classop_1_1_face_detector.html#a9f72a1ac7276849dc9cbc141eedf96ca":[1,0,0,16,1], "classop_1_1_face_detector.html#adfeab6977c93b7bef66c1dfbcf6f8150":[1,0,0,16,0], "classop_1_1_face_extractor.html":[1,0,0,17], +"classop_1_1_face_extractor.html#a04b4cd08bc5cbba132be73368890af02":[1,0,0,17,0], "classop_1_1_face_extractor.html#a13d7920f4029a4aa6d63b3609956c475":[1,0,0,17,2], -"classop_1_1_face_extractor.html#a2692c0040bb8c0b84a84d195194d037a":[1,0,0,17,3], +"classop_1_1_face_extractor.html#a2692c0040bb8c0b84a84d195194d037a":[1,0,0,17,4], "classop_1_1_face_extractor.html#a557850c549e3972916e833f9ffea99e1":[1,0,0,17,1], -"classop_1_1_face_extractor.html#aa2c31df663d2bb2e4d965833bb8270a8":[1,0,0,17,0], +"classop_1_1_face_extractor.html#af326457ed8977781fe48f1086ac5efee":[1,0,0,17,3], "classop_1_1_face_gpu_renderer.html":[1,0,0,18], "classop_1_1_face_gpu_renderer.html#a01a207676e3ec1a8718b8717cd999f53":[1,0,0,18,1], "classop_1_1_face_gpu_renderer.html#a344b4f1d256d6ad805273eb8ba29cde1":[1,0,0,18,0], @@ -127,10 +128,11 @@ var NAVTREEINDEX0 = "classop_1_1_hand_detector_from_txt.html#a1e6ba23fa1486e92a3bdca36b2e86d22":[1,0,0,46,1], "classop_1_1_hand_detector_from_txt.html#a94ef5e925c5d25b181c56ae79bb1eed2":[1,0,0,46,0], "classop_1_1_hand_extractor.html":[1,0,0,47], +"classop_1_1_hand_extractor.html#a0a86a06bdf506b28497c8b7f7469bb31":[1,0,0,47,0], "classop_1_1_hand_extractor.html#a0f76c1b4cf6770bbb889259204510877":[1,0,0,47,1], "classop_1_1_hand_extractor.html#a322a1c3a0ab7abaf0c697246af9309cc":[1,0,0,47,2], -"classop_1_1_hand_extractor.html#a7ec55995554e5f617b56145c8c432558":[1,0,0,47,0], -"classop_1_1_hand_extractor.html#aa5592a468cfdcfdd687d6f9d465d3eda":[1,0,0,47,3], +"classop_1_1_hand_extractor.html#aa5592a468cfdcfdd687d6f9d465d3eda":[1,0,0,47,4], +"classop_1_1_hand_extractor.html#af5ce8cd602820921de3ec3f676aacf0d":[1,0,0,47,3], "classop_1_1_hand_gpu_renderer.html":[1,0,0,48], "classop_1_1_hand_gpu_renderer.html#a0489f10ddc9e37e87084ebf9a5138f3a":[1,0,0,48,2], "classop_1_1_hand_gpu_renderer.html#a0d2f742b995a6f34e414f9731db847d5":[1,0,0,48,0], @@ -247,7 +249,5 @@ var NAVTREEINDEX0 = "classop_1_1_producer.html#ac72a751759ae8b5a0a99552580f7fbad":[1,0,0,65,10], "classop_1_1_producer.html#adc348105fca58f18e39aa3439e2d627b":[1,0,0,65,7], "classop_1_1_producer.html#afad3eadd16cca0de2c2be8b083c0d56d":[1,0,0,65,12], -"classop_1_1_profiler.html":[1,0,0,89], -"classop_1_1_queue.html":[1,0,0,71], -"classop_1_1_queue.html#ab28fa9f713d05e55e5ba1510b34d57f0":[1,0,0,71,1] +"classop_1_1_profiler.html":[1,0,0,89] }; diff --git a/html/navtreeindex1.js b/html/navtreeindex1.js index 0d3f2f9a..e8c25140 100644 --- a/html/navtreeindex1.js +++ b/html/navtreeindex1.js @@ -1,5 +1,7 @@ var NAVTREEINDEX1 = { +"classop_1_1_queue.html":[1,0,0,71], +"classop_1_1_queue.html#ab28fa9f713d05e55e5ba1510b34d57f0":[1,0,0,71,1], "classop_1_1_queue.html#ae2b845322940bfc89b6342137d8ac372":[1,0,0,71,0], "classop_1_1_queue_base.html":[1,0,0,72], "classop_1_1_queue_base.html#a04f7160c199f90b8f8e91ddfd40e92fb":[1,0,0,72,27], @@ -247,7 +249,5 @@ var NAVTREEINDEX1 = "classop_1_1_worker.html#a6ebe180098e00ac062a1bb31d462df60":[1,0,0,81,1], "classop_1_1_worker.html#a9acadd6df7af03b31b9e354ae815f781":[1,0,0,81,7], "classop_1_1_worker.html#aa5be4df9d4d8302728c653870e7d2a23":[1,0,0,81,3], -"classop_1_1_worker.html#ad689b232d68f3b3e0b41f9e219b01134":[1,0,0,81,6], -"classop_1_1_worker.html#ae45ac828f6e8f6055203c224e50f145b":[1,0,0,81,5], -"classop_1_1_worker_consumer.html":[1,0,0,82] +"classop_1_1_worker.html#ad689b232d68f3b3e0b41f9e219b01134":[1,0,0,81,6] }; diff --git a/html/navtreeindex2.js b/html/navtreeindex2.js index a775a8b1..2d04ff04 100644 --- a/html/navtreeindex2.js +++ b/html/navtreeindex2.js @@ -1,5 +1,7 @@ var NAVTREEINDEX2 = { +"classop_1_1_worker.html#ae45ac828f6e8f6055203c224e50f145b":[1,0,0,81,5], +"classop_1_1_worker_consumer.html":[1,0,0,82], "classop_1_1_worker_consumer.html#a26cf5c40df363d94d603fce92a5b69eb":[1,0,0,82,2], "classop_1_1_worker_consumer.html#a7383747b3bdc6ac79e6f9afbf2c28d27":[1,0,0,82,1], "classop_1_1_worker_consumer.html#a9aaa75f194df6b3ed4994c8e95aa0ab5":[1,0,0,82,0], @@ -247,7 +249,5 @@ var NAVTREEINDEX2 = "gui_info_adder_8hpp_source.html":[2,0,0,0,4,3], "hand_2headers_8hpp.html":[2,0,0,0,5,7], "hand_2headers_8hpp_source.html":[2,0,0,0,5,7], -"hand_cpu_renderer_8hpp.html":[2,0,0,0,5,0], -"hand_cpu_renderer_8hpp_source.html":[2,0,0,0,5,0], -"hand_detector_8hpp.html":[2,0,0,0,5,1] +"hand_cpu_renderer_8hpp.html":[2,0,0,0,5,0] }; diff --git a/html/navtreeindex3.js b/html/navtreeindex3.js index 01fc32af..6e22787b 100644 --- a/html/navtreeindex3.js +++ b/html/navtreeindex3.js @@ -1,5 +1,7 @@ var NAVTREEINDEX3 = { +"hand_cpu_renderer_8hpp_source.html":[2,0,0,0,5,0], +"hand_detector_8hpp.html":[2,0,0,0,5,1], "hand_detector_8hpp_source.html":[2,0,0,0,5,1], "hand_detector_from_txt_8hpp.html":[2,0,0,0,5,2], "hand_detector_from_txt_8hpp_source.html":[2,0,0,0,5,2], @@ -101,8 +103,8 @@ var NAVTREEINDEX3 = "namespacemembers_x.html":[0,1,0,21], "namespacemembers_y.html":[0,1,0,22], "namespacemembers_z.html":[0,1,0,23], -"namespaceop.html":[1,0,0], "namespaceop.html":[0,0,0], +"namespaceop.html":[1,0,0], "namespaces.html":[0,0], "net_8hpp.html":[2,0,0,0,0,12], "net_8hpp_source.html":[2,0,0,0,0,12], @@ -247,7 +249,5 @@ var NAVTREEINDEX3 = "profiler_8hpp_source.html":[2,0,0,0,9,11], "queue_8hpp.html":[2,0,0,0,8,3], "queue_8hpp.html#aa7f93261bd6d87f86c45e933607a0678":[2,0,0,0,8,3,1], -"queue_8hpp_source.html":[2,0,0,0,8,3], -"queue_base_8hpp.html":[2,0,0,0,8,4], -"queue_base_8hpp_source.html":[2,0,0,0,8,4] +"queue_8hpp_source.html":[2,0,0,0,8,3] }; diff --git a/html/navtreeindex4.js b/html/navtreeindex4.js index e19091da..7de58002 100644 --- a/html/navtreeindex4.js +++ b/html/navtreeindex4.js @@ -1,5 +1,7 @@ var NAVTREEINDEX4 = { +"queue_base_8hpp.html":[2,0,0,0,8,4], +"queue_base_8hpp_source.html":[2,0,0,0,8,4], "rectangle_8hpp.html":[2,0,0,0,0,18], "rectangle_8hpp.html#a7cd131c9ddd8f3987508e89e0881b9e0":[2,0,0,0,0,18,1], "rectangle_8hpp_source.html":[2,0,0,0,0,18], @@ -35,25 +37,25 @@ var NAVTREEINDEX4 = "string_8hpp.html#ae80a103d8a4308bc435342b3d31404c8":[2,0,0,0,9,12,1], "string_8hpp_source.html":[2,0,0,0,9,12], "structop_1_1_datum.html":[1,0,0,3], -"structop_1_1_datum.html#a0b105b52ce12f2689c7aa26708117254":[1,0,0,3,21], +"structop_1_1_datum.html#a0b105b52ce12f2689c7aa26708117254":[1,0,0,3,23], "structop_1_1_datum.html#a0b2c8ccac37be088524cc7c24a502c7b":[1,0,0,3,13], -"structop_1_1_datum.html#a0b2f6955a1751fc79b107789272effad":[1,0,0,3,17], +"structop_1_1_datum.html#a0b2f6955a1751fc79b107789272effad":[1,0,0,3,18], "structop_1_1_datum.html#a0d1f1c3d3494386e2d652268f6e17b5a":[1,0,0,3,14], "structop_1_1_datum.html#a16b968aec06e9b904751216402972e74":[1,0,0,3,3], "structop_1_1_datum.html#a24f3bfcb0ffffeb5742eb1530bc9e367":[1,0,0,3,9], "structop_1_1_datum.html#a2d4940d8cb12d95b8588cd0280f6524c":[1,0,0,3,2], -"structop_1_1_datum.html#a2db6ffa73c5cc87a277a6d7a1bac33e2":[1,0,0,3,28], +"structop_1_1_datum.html#a2db6ffa73c5cc87a277a6d7a1bac33e2":[1,0,0,3,30], "structop_1_1_datum.html#a32ad4b55b76a6eadf5cbd07f644f656c":[1,0,0,3,7], "structop_1_1_datum.html#a35212700ef2a2ac290a6666e2993a192":[1,0,0,3,15], -"structop_1_1_datum.html#a42b953c082f479eddc527da9a3a4cc75":[1,0,0,3,23], +"structop_1_1_datum.html#a42b953c082f479eddc527da9a3a4cc75":[1,0,0,3,25], "structop_1_1_datum.html#a42f9aef848c6335c5a81cad374319f0b":[1,0,0,3,1], -"structop_1_1_datum.html#a4eec45a7f4b8bc017736b41096327043":[1,0,0,3,27], -"structop_1_1_datum.html#a52d75e3273490624414f0602785bb608":[1,0,0,3,19], -"structop_1_1_datum.html#a5429e97e0ab9b0e2209a3947af668381":[1,0,0,3,24], -"structop_1_1_datum.html#a59d455dbddc50d700809c5e102c40d4e":[1,0,0,3,18], -"structop_1_1_datum.html#a6546c11ca264fdeab4a5f21104f8a8b2":[1,0,0,3,26], -"structop_1_1_datum.html#a65deddd49d0fbca81f367198fc600015":[1,0,0,3,20], -"structop_1_1_datum.html#a6d629b1f6f7b958fe4cf2ef4cdf57c5b":[1,0,0,3,25], +"structop_1_1_datum.html#a4eec45a7f4b8bc017736b41096327043":[1,0,0,3,29], +"structop_1_1_datum.html#a52d75e3273490624414f0602785bb608":[1,0,0,3,21], +"structop_1_1_datum.html#a5429e97e0ab9b0e2209a3947af668381":[1,0,0,3,26], +"structop_1_1_datum.html#a59d455dbddc50d700809c5e102c40d4e":[1,0,0,3,20], +"structop_1_1_datum.html#a6546c11ca264fdeab4a5f21104f8a8b2":[1,0,0,3,28], +"structop_1_1_datum.html#a65deddd49d0fbca81f367198fc600015":[1,0,0,3,22], +"structop_1_1_datum.html#a6d629b1f6f7b958fe4cf2ef4cdf57c5b":[1,0,0,3,27], "structop_1_1_datum.html#a72c75834671aebe44705738fb5efc3c5":[1,0,0,3,0], "structop_1_1_datum.html#a72ee10bf507aea368cfd3dba3dd38cb5":[1,0,0,3,8], "structop_1_1_datum.html#a731a7179ac03f831019441981455282e":[1,0,0,3,10], @@ -61,8 +63,10 @@ var NAVTREEINDEX4 = "structop_1_1_datum.html#aab9997004b6b761267f8ce312b8048e9":[1,0,0,3,5], "structop_1_1_datum.html#aae900e3c8101ab5acce9fc5e4d50830a":[1,0,0,3,6], "structop_1_1_datum.html#acdf94a3ee6504d8b70afffa997d52d4b":[1,0,0,3,11], -"structop_1_1_datum.html#ae6adcdacea12a9cfa445cf0cac1985b0":[1,0,0,3,22], -"structop_1_1_datum.html#aebd19bf50725a5cd87de1efd96f6ebfe":[1,0,0,3,16], +"structop_1_1_datum.html#ae0c0f33a6b75c7f47e11112dd33f23c1":[1,0,0,3,16], +"structop_1_1_datum.html#ae6adcdacea12a9cfa445cf0cac1985b0":[1,0,0,3,24], +"structop_1_1_datum.html#aebd19bf50725a5cd87de1efd96f6ebfe":[1,0,0,3,17], +"structop_1_1_datum.html#aef6c478313691ab5101664c1df55aa58":[1,0,0,3,19], "structop_1_1_datum.html#afcdbf1d87e08761d952d19ef6a8ace10":[1,0,0,3,12], "structop_1_1_point.html":[1,0,0,8], "structop_1_1_point.html#a0374ab7bcd19af664a6c01328346d238":[1,0,0,8,24], @@ -245,9 +249,5 @@ var NAVTREEINDEX4 = "w_face_extractor_8hpp.html#ac610051ddb4703c80e6ee73f77f6df8a":[2,0,0,0,2,9,1], "w_face_extractor_8hpp_source.html":[2,0,0,0,2,9], "w_face_renderer_8hpp.html":[2,0,0,0,2,10], -"w_face_renderer_8hpp.html#af42afa53c725d556c14928b2603883e3":[2,0,0,0,2,10,1], -"w_face_renderer_8hpp_source.html":[2,0,0,0,2,10], -"w_face_saver_8hpp.html":[2,0,0,0,3,12], -"w_face_saver_8hpp.html#a57c4f3ada0db4882a4106d4dedf08012":[2,0,0,0,3,12,1], -"w_face_saver_8hpp_source.html":[2,0,0,0,3,12] +"w_face_renderer_8hpp.html#af42afa53c725d556c14928b2603883e3":[2,0,0,0,2,10,1] }; diff --git a/html/navtreeindex5.js b/html/navtreeindex5.js index 06f7abfe..a0bcd964 100644 --- a/html/navtreeindex5.js +++ b/html/navtreeindex5.js @@ -1,5 +1,9 @@ var NAVTREEINDEX5 = { +"w_face_renderer_8hpp_source.html":[2,0,0,0,2,10], +"w_face_saver_8hpp.html":[2,0,0,0,3,12], +"w_face_saver_8hpp.html#a57c4f3ada0db4882a4106d4dedf08012":[2,0,0,0,3,12,1], +"w_face_saver_8hpp_source.html":[2,0,0,0,3,12], "w_gui_8hpp.html":[2,0,0,0,4,5], "w_gui_8hpp.html#ade3b2e4b105242a3cf41def3def1691d":[2,0,0,0,4,5,1], "w_gui_8hpp_source.html":[2,0,0,0,4,5], diff --git a/html/search/all_5.js b/html/search/all_5.js index bc85bde6..2f594585 100644 --- a/html/search/all_5.js +++ b/html/search/all_5.js @@ -11,18 +11,19 @@ var searchData= ['face_5fpairs_5frender_5fgpu',['FACE_PAIRS_RENDER_GPU',['../face_parameters_8hpp.html#a7e2f64c1349d6a881c6ceb49757e099a',1,'faceParameters.hpp']]], ['face_5fprototxt',['FACE_PROTOTXT',['../namespaceop.html#a4d07868d77fb11253b413ed579e04c22',1,'op']]], ['face_5ftrained_5fmodel',['FACE_TRAINED_MODEL',['../namespaceop.html#abd0ef2306478c3295283e7f1b59e3aff',1,'op']]], - ['facecpurenderer',['FaceCpuRenderer',['../classop_1_1_face_cpu_renderer.html',1,'op']]], ['facecpurenderer',['FaceCpuRenderer',['../classop_1_1_face_cpu_renderer.html#afb0dcfff75c4a89d5971d7b0bbd0b51b',1,'op::FaceCpuRenderer']]], + ['facecpurenderer',['FaceCpuRenderer',['../classop_1_1_face_cpu_renderer.html',1,'op']]], ['facecpurenderer_2ehpp',['faceCpuRenderer.hpp',['../face_cpu_renderer_8hpp.html',1,'']]], ['facedetector',['FaceDetector',['../classop_1_1_face_detector.html',1,'op']]], ['facedetector',['FaceDetector',['../classop_1_1_face_detector.html#adfeab6977c93b7bef66c1dfbcf6f8150',1,'op::FaceDetector']]], ['facedetector_2ehpp',['faceDetector.hpp',['../face_detector_8hpp.html',1,'']]], - ['faceextractor',['FaceExtractor',['../classop_1_1_face_extractor.html#aa2c31df663d2bb2e4d965833bb8270a8',1,'op::FaceExtractor']]], + ['faceextractor',['FaceExtractor',['../classop_1_1_face_extractor.html#a04b4cd08bc5cbba132be73368890af02',1,'op::FaceExtractor']]], ['faceextractor',['FaceExtractor',['../classop_1_1_face_extractor.html',1,'op']]], ['faceextractor_2ehpp',['faceExtractor.hpp',['../face_extractor_8hpp.html',1,'']]], ['facegpurenderer',['FaceGpuRenderer',['../classop_1_1_face_gpu_renderer.html',1,'op']]], ['facegpurenderer',['FaceGpuRenderer',['../classop_1_1_face_gpu_renderer.html#a344b4f1d256d6ad805273eb8ba29cde1',1,'op::FaceGpuRenderer']]], ['facegpurenderer_2ehpp',['faceGpuRenderer.hpp',['../face_gpu_renderer_8hpp.html',1,'']]], + ['faceheatmaps',['faceHeatMaps',['../structop_1_1_datum.html#ae0c0f33a6b75c7f47e11112dd33f23c1',1,'op::Datum']]], ['facekeypoints',['faceKeypoints',['../structop_1_1_datum.html#aebd19bf50725a5cd87de1efd96f6ebfe',1,'op::Datum']]], ['faceparameters_2ehpp',['faceParameters.hpp',['../face_parameters_8hpp.html',1,'']]], ['facerectangles',['faceRectangles',['../structop_1_1_datum.html#a0b2f6955a1751fc79b107789272effad',1,'op::Datum']]], @@ -55,8 +56,8 @@ var searchData= ['formatasdirectory',['formatAsDirectory',['../namespaceop.html#ab38ea91ef7b7dad700d8e4a4654d48f5',1,'op']]], ['formattocvmat',['formatToCvMat',['../classop_1_1_op_output_to_cv_mat.html#a478daa5915f60a6a962f29fcb64aaac5',1,'op::OpOutputToCvMat']]], ['forwardpass',['forwardPass',['../classop_1_1_net.html#ac8edfe73a20fd3d5e548160dffbd0b71',1,'op::Net::forwardPass()'],['../classop_1_1_face_extractor.html#a557850c549e3972916e833f9ffea99e1',1,'op::FaceExtractor::forwardPass()'],['../classop_1_1_hand_extractor.html#a0f76c1b4cf6770bbb889259204510877',1,'op::HandExtractor::forwardPass()'],['../classop_1_1_pose_extractor.html#af14676f867643ca2ccc666d8757d694c',1,'op::PoseExtractor::forwardPass()']]], - ['framedisplayer',['FrameDisplayer',['../classop_1_1_frame_displayer.html#a3b81422440197c14b6ae58e40a95b4ec',1,'op::FrameDisplayer']]], ['framedisplayer',['FrameDisplayer',['../classop_1_1_frame_displayer.html',1,'op']]], + ['framedisplayer',['FrameDisplayer',['../classop_1_1_frame_displayer.html#a3b81422440197c14b6ae58e40a95b4ec',1,'op::FrameDisplayer']]], ['framedisplayer_2ehpp',['frameDisplayer.hpp',['../frame_displayer_8hpp.html',1,'']]], ['framefirst',['frameFirst',['../structop_1_1_wrapper_struct_input.html#acc72b8efe09ec3888823ed5680a19fe4',1,'op::WrapperStructInput']]], ['frameflip',['frameFlip',['../structop_1_1_wrapper_struct_input.html#a5ee9722814fe2b5a695511cabd12b613',1,'op::WrapperStructInput']]], diff --git a/html/search/all_6.js b/html/search/all_6.js index 4b9c67b9..0769b459 100644 --- a/html/search/all_6.js +++ b/html/search/all_6.js @@ -22,7 +22,7 @@ var searchData= ['gethandkeypoints',['getHandKeypoints',['../classop_1_1_hand_extractor.html#a322a1c3a0ab7abaf0c697246af9309cc',1,'op::HandExtractor']]], ['getheatmapcpuconstptr',['getHeatMapCpuConstPtr',['../classop_1_1_pose_extractor.html#a0bb5cf37e5b93e347e355be126d22ead',1,'op::PoseExtractor']]], ['getheatmapgpuconstptr',['getHeatMapGpuConstPtr',['../classop_1_1_pose_extractor.html#a0b895e3e582bd504b531ba525ed77430',1,'op::PoseExtractor']]], - ['getheatmaps',['getHeatMaps',['../classop_1_1_pose_extractor.html#a1f91723c5d541a2872637a1510da76e6',1,'op::PoseExtractor']]], + ['getheatmaps',['getHeatMaps',['../classop_1_1_face_extractor.html#af326457ed8977781fe48f1086ac5efee',1,'op::FaceExtractor::getHeatMaps()'],['../classop_1_1_hand_extractor.html#af5ce8cd602820921de3ec3f676aacf0d',1,'op::HandExtractor::getHeatMaps()'],['../classop_1_1_pose_extractor.html#a1f91723c5d541a2872637a1510da76e6',1,'op::PoseExtractor::getHeatMaps()']]], ['getinputdatacpuptr',['getInputDataCpuPtr',['../classop_1_1_net.html#a042324a660661408830caf85cfe17603',1,'op::Net']]], ['getinputdatagpuptr',['getInputDataGpuPtr',['../classop_1_1_net.html#a6e39824e84be05c9942523e48e7cff55',1,'op::Net']]], ['getisrunningsharedptr',['getIsRunningSharedPtr',['../classop_1_1_thread_manager.html#a48ea53b3de4d09c84db18e2c31ce1be1',1,'op::ThreadManager']]], diff --git a/html/search/all_7.js b/html/search/all_7.js index a0a6b6ee..c3c615f3 100644 --- a/html/search/all_7.js +++ b/html/search/all_7.js @@ -21,31 +21,32 @@ var searchData= ['handdetectorfromtxt',['HandDetectorFromTxt',['../classop_1_1_hand_detector_from_txt.html#a94ef5e925c5d25b181c56ae79bb1eed2',1,'op::HandDetectorFromTxt']]], ['handdetectorfromtxt_2ehpp',['handDetectorFromTxt.hpp',['../hand_detector_from_txt_8hpp.html',1,'']]], ['handextractor',['HandExtractor',['../classop_1_1_hand_extractor.html',1,'op']]], - ['handextractor',['HandExtractor',['../classop_1_1_hand_extractor.html#a7ec55995554e5f617b56145c8c432558',1,'op::HandExtractor']]], + ['handextractor',['HandExtractor',['../classop_1_1_hand_extractor.html#a0a86a06bdf506b28497c8b7f7469bb31',1,'op::HandExtractor']]], ['handextractor_2ehpp',['handExtractor.hpp',['../hand_extractor_8hpp.html',1,'']]], ['handgpurenderer',['HandGpuRenderer',['../classop_1_1_hand_gpu_renderer.html#a0d2f742b995a6f34e414f9731db847d5',1,'op::HandGpuRenderer']]], ['handgpurenderer',['HandGpuRenderer',['../classop_1_1_hand_gpu_renderer.html',1,'op']]], ['handgpurenderer_2ehpp',['handGpuRenderer.hpp',['../hand_gpu_renderer_8hpp.html',1,'']]], + ['handheatmaps',['handHeatMaps',['../structop_1_1_datum.html#aef6c478313691ab5101664c1df55aa58',1,'op::Datum']]], ['handkeypoints',['handKeypoints',['../structop_1_1_datum.html#a59d455dbddc50d700809c5e102c40d4e',1,'op::Datum']]], ['handparameters_2ehpp',['handParameters.hpp',['../hand_parameters_8hpp.html',1,'']]], ['handrectangles',['handRectangles',['../structop_1_1_datum.html#a52d75e3273490624414f0602785bb608',1,'op::Datum']]], ['handrenderer',['HandRenderer',['../classop_1_1_hand_renderer.html',1,'op']]], ['handrenderer_2ehpp',['handRenderer.hpp',['../hand_renderer_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../experimental_2producer_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../pose_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../core_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../experimental_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../thread_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../utilities_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../producer_2headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../headers_8hpp.html',1,'']]], - ['headers_2ehpp',['headers.hpp',['../wrapper_2headers_8hpp.html',1,'']]], ['headers_2ehpp',['headers.hpp',['../filestream_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../pose_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../producer_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../experimental_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../utilities_2headers_8hpp.html',1,'']]], ['headers_2ehpp',['headers.hpp',['../face_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../experimental_2producer_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../core_2headers_8hpp.html',1,'']]], ['headers_2ehpp',['headers.hpp',['../gui_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../wrapper_2headers_8hpp.html',1,'']]], + ['headers_2ehpp',['headers.hpp',['../thread_2headers_8hpp.html',1,'']]], ['headers_2ehpp',['headers.hpp',['../hand_2headers_8hpp.html',1,'']]], - ['heatmapsaver',['HeatMapSaver',['../classop_1_1_heat_map_saver.html#aa6a339b70a9535a018584b93c932b12d',1,'op::HeatMapSaver']]], ['heatmapsaver',['HeatMapSaver',['../classop_1_1_heat_map_saver.html',1,'op']]], + ['heatmapsaver',['HeatMapSaver',['../classop_1_1_heat_map_saver.html#aa6a339b70a9535a018584b93c932b12d',1,'op::HeatMapSaver']]], ['heatmapsaver_2ehpp',['heatMapSaver.hpp',['../heat_map_saver_8hpp.html',1,'']]], ['heatmapscale',['heatMapScale',['../structop_1_1_wrapper_struct_pose.html#abeb9ae450a7b37e76075c8dca64b3617',1,'op::WrapperStructPose']]], ['heatmaptype',['HeatMapType',['../namespaceop.html#a1c3dbc214e7552f7ef9cc753ee97226b',1,'op']]], diff --git a/html/search/functions_5.js b/html/search/functions_5.js index 1493b219..18e43aa7 100644 --- a/html/search/functions_5.js +++ b/html/search/functions_5.js @@ -2,7 +2,7 @@ var searchData= [ ['facecpurenderer',['FaceCpuRenderer',['../classop_1_1_face_cpu_renderer.html#afb0dcfff75c4a89d5971d7b0bbd0b51b',1,'op::FaceCpuRenderer']]], ['facedetector',['FaceDetector',['../classop_1_1_face_detector.html#adfeab6977c93b7bef66c1dfbcf6f8150',1,'op::FaceDetector']]], - ['faceextractor',['FaceExtractor',['../classop_1_1_face_extractor.html#aa2c31df663d2bb2e4d965833bb8270a8',1,'op::FaceExtractor']]], + ['faceextractor',['FaceExtractor',['../classop_1_1_face_extractor.html#a04b4cd08bc5cbba132be73368890af02',1,'op::FaceExtractor']]], ['facegpurenderer',['FaceGpuRenderer',['../classop_1_1_face_gpu_renderer.html#a344b4f1d256d6ad805273eb8ba29cde1',1,'op::FaceGpuRenderer']]], ['fastmax',['fastMax',['../namespaceop.html#a9f4b99449c0c73e2c89ee1a1eff007c7',1,'op']]], ['fastmin',['fastMin',['../namespaceop.html#a6e1d1f90ef06cc7af576fdaad4b4e320',1,'op']]], diff --git a/html/search/functions_6.js b/html/search/functions_6.js index e15643f9..3fc03a9f 100644 --- a/html/search/functions_6.js +++ b/html/search/functions_6.js @@ -22,7 +22,7 @@ var searchData= ['gethandkeypoints',['getHandKeypoints',['../classop_1_1_hand_extractor.html#a322a1c3a0ab7abaf0c697246af9309cc',1,'op::HandExtractor']]], ['getheatmapcpuconstptr',['getHeatMapCpuConstPtr',['../classop_1_1_pose_extractor.html#a0bb5cf37e5b93e347e355be126d22ead',1,'op::PoseExtractor']]], ['getheatmapgpuconstptr',['getHeatMapGpuConstPtr',['../classop_1_1_pose_extractor.html#a0b895e3e582bd504b531ba525ed77430',1,'op::PoseExtractor']]], - ['getheatmaps',['getHeatMaps',['../classop_1_1_pose_extractor.html#a1f91723c5d541a2872637a1510da76e6',1,'op::PoseExtractor']]], + ['getheatmaps',['getHeatMaps',['../classop_1_1_face_extractor.html#af326457ed8977781fe48f1086ac5efee',1,'op::FaceExtractor::getHeatMaps()'],['../classop_1_1_hand_extractor.html#af5ce8cd602820921de3ec3f676aacf0d',1,'op::HandExtractor::getHeatMaps()'],['../classop_1_1_pose_extractor.html#a1f91723c5d541a2872637a1510da76e6',1,'op::PoseExtractor::getHeatMaps()']]], ['getinputdatacpuptr',['getInputDataCpuPtr',['../classop_1_1_net.html#a042324a660661408830caf85cfe17603',1,'op::Net']]], ['getinputdatagpuptr',['getInputDataGpuPtr',['../classop_1_1_net.html#a6e39824e84be05c9942523e48e7cff55',1,'op::Net']]], ['getisrunningsharedptr',['getIsRunningSharedPtr',['../classop_1_1_thread_manager.html#a48ea53b3de4d09c84db18e2c31ce1be1',1,'op::ThreadManager']]], diff --git a/html/search/functions_7.js b/html/search/functions_7.js index f0ccfd63..646a24a7 100644 --- a/html/search/functions_7.js +++ b/html/search/functions_7.js @@ -3,7 +3,7 @@ var searchData= ['handcpurenderer',['HandCpuRenderer',['../classop_1_1_hand_cpu_renderer.html#a3145d482c0378288e7ba3e42091a56c2',1,'op::HandCpuRenderer']]], ['handdetector',['HandDetector',['../classop_1_1_hand_detector.html#a20b127dd7b51afcd336d1f16b40ee0b1',1,'op::HandDetector']]], ['handdetectorfromtxt',['HandDetectorFromTxt',['../classop_1_1_hand_detector_from_txt.html#a94ef5e925c5d25b181c56ae79bb1eed2',1,'op::HandDetectorFromTxt']]], - ['handextractor',['HandExtractor',['../classop_1_1_hand_extractor.html#a7ec55995554e5f617b56145c8c432558',1,'op::HandExtractor']]], + ['handextractor',['HandExtractor',['../classop_1_1_hand_extractor.html#a0a86a06bdf506b28497c8b7f7469bb31',1,'op::HandExtractor']]], ['handgpurenderer',['HandGpuRenderer',['../classop_1_1_hand_gpu_renderer.html#a0d2f742b995a6f34e414f9731db847d5',1,'op::HandGpuRenderer']]], ['heatmapsaver',['HeatMapSaver',['../classop_1_1_heat_map_saver.html#aa6a339b70a9535a018584b93c932b12d',1,'op::HeatMapSaver']]] ]; diff --git a/html/search/variables_5.js b/html/search/variables_5.js index da2e0005..eb984d5e 100644 --- a/html/search/variables_5.js +++ b/html/search/variables_5.js @@ -9,6 +9,7 @@ var searchData= ['face_5fpairs_5frender',['FACE_PAIRS_RENDER',['../namespaceop.html#a1245f62cf98c4ee7591dfc8807ef355d',1,'op']]], ['face_5fprototxt',['FACE_PROTOTXT',['../namespaceop.html#a4d07868d77fb11253b413ed579e04c22',1,'op']]], ['face_5ftrained_5fmodel',['FACE_TRAINED_MODEL',['../namespaceop.html#abd0ef2306478c3295283e7f1b59e3aff',1,'op']]], + ['faceheatmaps',['faceHeatMaps',['../structop_1_1_datum.html#ae0c0f33a6b75c7f47e11112dd33f23c1',1,'op::Datum']]], ['facekeypoints',['faceKeypoints',['../structop_1_1_datum.html#aebd19bf50725a5cd87de1efd96f6ebfe',1,'op::Datum']]], ['facerectangles',['faceRectangles',['../structop_1_1_datum.html#a0b2f6955a1751fc79b107789272effad',1,'op::Datum']]], ['framefirst',['frameFirst',['../structop_1_1_wrapper_struct_input.html#acc72b8efe09ec3888823ed5680a19fe4',1,'op::WrapperStructInput']]], diff --git a/html/search/variables_7.js b/html/search/variables_7.js index 3052cfc4..4a41c1b9 100644 --- a/html/search/variables_7.js +++ b/html/search/variables_7.js @@ -9,6 +9,7 @@ var searchData= ['hand_5fpairs_5frender',['HAND_PAIRS_RENDER',['../namespaceop.html#a335d707e98d311d39d9a9dab0e325391',1,'op']]], ['hand_5fprototxt',['HAND_PROTOTXT',['../namespaceop.html#a3fe70bd1eacdd78aef3344c83533ffc7',1,'op']]], ['hand_5ftrained_5fmodel',['HAND_TRAINED_MODEL',['../namespaceop.html#ac13af59538bcb8a1709f20010681d1c7',1,'op']]], + ['handheatmaps',['handHeatMaps',['../structop_1_1_datum.html#aef6c478313691ab5101664c1df55aa58',1,'op::Datum']]], ['handkeypoints',['handKeypoints',['../structop_1_1_datum.html#a59d455dbddc50d700809c5e102c40d4e',1,'op::Datum']]], ['handrectangles',['handRectangles',['../structop_1_1_datum.html#a52d75e3273490624414f0602785bb608',1,'op::Datum']]], ['heatmapscale',['heatMapScale',['../structop_1_1_wrapper_struct_pose.html#abeb9ae450a7b37e76075c8dca64b3617',1,'op::WrapperStructPose']]], diff --git a/html/structop_1_1_datum-members.html b/html/structop_1_1_datum-members.html index 17088617..57e1fd2f 100644 --- a/html/structop_1_1_datum-members.html +++ b/html/structop_1_1_datum-members.html @@ -119,8 +119,10 @@ $(document).ready(function(){initNavTree('structop_1_1_datum.html','');}); Datum(const Datum &datum)op::Datum Datum(Datum &&datum)op::Datum elementRenderedop::Datum - faceKeypointsop::Datum - faceRectanglesop::Datum + faceHeatMapsop::Datum + faceKeypointsop::Datum + faceRectanglesop::Datum + handHeatMapsop::Datum handKeypointsop::Datum handRectanglesop::Datum idop::Datum diff --git a/html/structop_1_1_datum.html b/html/structop_1_1_datum.html index 9c84fcc8..5007108b 100644 --- a/html/structop_1_1_datum.html +++ b/html/structop_1_1_datum.html @@ -167,11 +167,15 @@ Public Attributes   Array< float > faceKeypoints   +Array< float > faceHeatMaps +  std::vector< std::array
    < Rectangle< float >, 2 > > handRectangles   std::array< Array< float >, 2 > handKeypoints   +std::array< Array< float >, 2 > handHeatMaps +  float scaleInputToOutput   float scaleNetToOutput @@ -574,6 +578,19 @@ Public Attributes

    Pair with the element key id POSE_BODY_PART_MAPPING on pose/poseParameters.hpp and its mapped value (e.g. 1 and "Neck").

    +
    + + +
    +
    + + + + +
    Array<float> op::Datum::faceHeatMaps
    +
    +

    Face pose heatmaps (face parts and/or background) for the whole image. Analogous of bodyHeatMaps applied to face. However, there is no PAFs and the size is different. Size: #people x #face parts (70) x output_net_height x output_net_width

    +
    @@ -600,6 +617,19 @@ Public Attributes

    Face detection locations (x,y,width,height) for each person in the image. It is resized to cvInputData.size(). Size: #people

    +
    + + +
    +
    + + + + +
    std::array<Array<float>, 2> op::Datum::handHeatMaps
    +
    +

    Face pose heatmaps (hand parts and/or background) for the whole image. Analogous of faceHeatMaps applied to face. Size each Array: #people x #hand parts (21) x output_net_height x output_net_width

    +
    @@ -611,7 +641,7 @@ Public Attributes
    -

    Hand keypoints (x,y,score) locations for each person in the image. It has been resized to the same resolution as poseKeypoints. handKeypoints[0] corresponds to left hands, and handKeypoints[1] to right ones. Size: #people x #hand parts (21) x 3 ((x,y) coordinates + score)

    +

    Hand keypoints (x,y,score) locations for each person in the image. It has been resized to the same resolution as poseKeypoints. handKeypoints[0] corresponds to left hands, and handKeypoints[1] to right ones. Size each Array: #people x #hand parts (21) x 3 ((x,y) coordinates + score)

    diff --git a/html/structop_1_1_datum.js b/html/structop_1_1_datum.js index f0755845..f8ec076e 100644 --- a/html/structop_1_1_datum.js +++ b/html/structop_1_1_datum.js @@ -16,8 +16,10 @@ var structop_1_1_datum = [ "cvInputData", "structop_1_1_datum.html#a0b2c8ccac37be088524cc7c24a502c7b", null ], [ "cvOutputData", "structop_1_1_datum.html#a0d1f1c3d3494386e2d652268f6e17b5a", null ], [ "elementRendered", "structop_1_1_datum.html#a35212700ef2a2ac290a6666e2993a192", null ], + [ "faceHeatMaps", "structop_1_1_datum.html#ae0c0f33a6b75c7f47e11112dd33f23c1", null ], [ "faceKeypoints", "structop_1_1_datum.html#aebd19bf50725a5cd87de1efd96f6ebfe", null ], [ "faceRectangles", "structop_1_1_datum.html#a0b2f6955a1751fc79b107789272effad", null ], + [ "handHeatMaps", "structop_1_1_datum.html#aef6c478313691ab5101664c1df55aa58", null ], [ "handKeypoints", "structop_1_1_datum.html#a59d455dbddc50d700809c5e102c40d4e", null ], [ "handRectangles", "structop_1_1_datum.html#a52d75e3273490624414f0602785bb608", null ], [ "id", "structop_1_1_datum.html#a65deddd49d0fbca81f367198fc600015", null ], diff --git a/html/w_face_extractor_8hpp_source.html b/html/w_face_extractor_8hpp_source.html index c01753f0..c177b088 100644 --- a/html/w_face_extractor_8hpp_source.html +++ b/html/w_face_extractor_8hpp_source.html @@ -168,27 +168,28 @@ $(document).ready(function(){initNavTree('w_face_extractor_8hpp_source.html','')
    59  for (auto& tDatum : *tDatums)
    60  {
    61  spFaceExtractor->forwardPass(tDatum.faceRectangles, tDatum.cvInputData, tDatum.scaleInputToOutput);
    -
    62  tDatum.faceKeypoints = spFaceExtractor->getFaceKeypoints();
    -
    63  }
    -
    64  // Profiling speed
    -
    65  Profiler::timerEnd(profilerKey);
    -
    66  Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__, Profiler::DEFAULT_X);
    -
    67  // Debugging log
    -
    68  dLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    -
    69  }
    -
    70  }
    -
    71  catch (const std::exception& e)
    -
    72  {
    -
    73  this->stop();
    -
    74  tDatums = nullptr;
    -
    75  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    76  }
    -
    77  }
    -
    78 
    -
    79  COMPILE_TEMPLATE_DATUM(WFaceExtractor);
    -
    80 }
    -
    81 
    -
    82 #endif // OPENPOSE_FACE_W_FACE_DETECTOR_HPP
    +
    62  tDatum.faceHeatMaps = spFaceExtractor->getHeatMaps().clone();
    +
    63  tDatum.faceKeypoints = spFaceExtractor->getFaceKeypoints().clone();
    +
    64  }
    +
    65  // Profiling speed
    +
    66  Profiler::timerEnd(profilerKey);
    +
    67  Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__, Profiler::DEFAULT_X);
    +
    68  // Debugging log
    +
    69  dLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    +
    70  }
    +
    71  }
    +
    72  catch (const std::exception& e)
    +
    73  {
    +
    74  this->stop();
    +
    75  tDatums = nullptr;
    +
    76  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    77  }
    +
    78  }
    +
    79 
    +
    80  COMPILE_TEMPLATE_DATUM(WFaceExtractor);
    +
    81 }
    +
    82 
    +
    83 #endif // OPENPOSE_FACE_W_FACE_DETECTOR_HPP
    Definition: worker.hpp:9
    diff --git a/html/w_hand_extractor_8hpp_source.html b/html/w_hand_extractor_8hpp_source.html index d9cbfd0b..59f61251 100644 --- a/html/w_hand_extractor_8hpp_source.html +++ b/html/w_hand_extractor_8hpp_source.html @@ -168,27 +168,31 @@ $(document).ready(function(){initNavTree('w_hand_extractor_8hpp_source.html','')
    59  for (auto& tDatum : *tDatums)
    60  {
    61  spHandExtractor->forwardPass(tDatum.handRectangles, tDatum.cvInputData, tDatum.scaleInputToOutput);
    -
    62  tDatum.handKeypoints = spHandExtractor->getHandKeypoints();
    -
    63  }
    -
    64  // Profiling speed
    -
    65  Profiler::timerEnd(profilerKey);
    -
    66  Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__, Profiler::DEFAULT_X);
    -
    67  // Debugging log
    -
    68  dLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    -
    69  }
    -
    70  }
    -
    71  catch (const std::exception& e)
    -
    72  {
    -
    73  this->stop();
    -
    74  tDatums = nullptr;
    -
    75  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    76  }
    -
    77  }
    -
    78 
    -
    79  COMPILE_TEMPLATE_DATUM(WHandExtractor);
    -
    80 }
    -
    81 
    -
    82 #endif // OPENPOSE_HAND_W_HAND_EXTRACTOR_HPP
    +
    62  for (auto hand = 0 ; hand < 2 ; hand++)
    +
    63  {
    +
    64  tDatum.handHeatMaps[hand] = spHandExtractor->getHeatMaps()[hand].clone();
    +
    65  tDatum.handKeypoints[hand] = spHandExtractor->getHandKeypoints()[hand].clone();
    +
    66  }
    +
    67  }
    +
    68  // Profiling speed
    +
    69  Profiler::timerEnd(profilerKey);
    +
    70  Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__, Profiler::DEFAULT_X);
    +
    71  // Debugging log
    +
    72  dLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    +
    73  }
    +
    74  }
    +
    75  catch (const std::exception& e)
    +
    76  {
    +
    77  this->stop();
    +
    78  tDatums = nullptr;
    +
    79  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    80  }
    +
    81  }
    +
    82 
    +
    83  COMPILE_TEMPLATE_DATUM(WHandExtractor);
    +
    84 }
    +
    85 
    +
    86 #endif // OPENPOSE_HAND_W_HAND_EXTRACTOR_HPP
    Definition: worker.hpp:9
    WHandExtractor(const std::shared_ptr< HandExtractor > &handExtractor)
    Definition: wHandExtractor.hpp:36
    diff --git a/html/w_heat_map_saver_8hpp_source.html b/html/w_heat_map_saver_8hpp_source.html index 5f4917da..6d5971b9 100644 --- a/html/w_heat_map_saver_8hpp_source.html +++ b/html/w_heat_map_saver_8hpp_source.html @@ -165,30 +165,32 @@ $(document).ready(function(){initNavTree('w_heat_map_saver_8hpp_source.html','')
    56  const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__);
    57  // T* to T
    58  auto& tDatumsNoPtr = *tDatums;
    -
    59  // Record image(s) on disk
    +
    59  // Record pose heatmap image(s) on disk
    60  std::vector<Array<float>> poseHeatMaps(tDatumsNoPtr.size());
    61  for (auto i = 0u; i < tDatumsNoPtr.size(); i++)
    62  poseHeatMaps[i] = tDatumsNoPtr[i].poseHeatMaps;
    -
    63  const auto fileName = (!tDatumsNoPtr[0].name.empty() ? tDatumsNoPtr[0].name : std::to_string(tDatumsNoPtr[0].id));
    -
    64  spHeatMapSaver->saveHeatMaps(poseHeatMaps, fileName);
    -
    65  // Profiling speed
    -
    66  Profiler::timerEnd(profilerKey);
    -
    67  Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__, Profiler::DEFAULT_X);
    -
    68  // Debugging log
    -
    69  dLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    -
    70  }
    -
    71  }
    -
    72  catch (const std::exception& e)
    -
    73  {
    -
    74  this->stop();
    -
    75  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    76  }
    -
    77  }
    -
    78 
    -
    79  COMPILE_TEMPLATE_DATUM(WHeatMapSaver);
    -
    80 }
    -
    81 
    -
    82 #endif // OPENPOSE_FILESTREAM_W_HEAT_MAP_SAVER_HPP
    +
    63  const auto fileName = (!tDatumsNoPtr[0].name.empty()
    +
    64  ? tDatumsNoPtr[0].name : std::to_string(tDatumsNoPtr[0].id)) + "_pose_heatmaps";
    +
    65  spHeatMapSaver->saveHeatMaps(poseHeatMaps, fileName);
    +
    66  // Profiling speed
    +
    67  Profiler::timerEnd(profilerKey);
    +
    68  Profiler::printAveragedTimeMsOnIterationX(profilerKey,
    +
    69  __LINE__, __FUNCTION__, __FILE__, Profiler::DEFAULT_X);
    +
    70  // Debugging log
    +
    71  dLog("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    +
    72  }
    +
    73  }
    +
    74  catch (const std::exception& e)
    +
    75  {
    +
    76  this->stop();
    +
    77  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    78  }
    +
    79  }
    +
    80 
    +
    81  COMPILE_TEMPLATE_DATUM(WHeatMapSaver);
    +
    82 }
    +
    83 
    +
    84 #endif // OPENPOSE_FILESTREAM_W_HEAT_MAP_SAVER_HPP
    Definition: workerConsumer.hpp:10
    void initializationOnThread()
    Definition: wHeatMapSaver.hpp:42
    diff --git a/html/w_pose_extractor_8hpp_source.html b/html/w_pose_extractor_8hpp_source.html index 98f982e8..220277ac 100644 --- a/html/w_pose_extractor_8hpp_source.html +++ b/html/w_pose_extractor_8hpp_source.html @@ -168,8 +168,8 @@ $(document).ready(function(){initNavTree('w_pose_extractor_8hpp_source.html','')
    59  for (auto& tDatum : *tDatums)
    60  {
    61  spPoseExtractor->forwardPass(tDatum.inputNetData, Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows}, tDatum.scaleRatios);
    -
    62  tDatum.poseHeatMaps = spPoseExtractor->getHeatMaps();
    -
    63  tDatum.poseKeypoints = spPoseExtractor->getPoseKeypoints();
    +
    62  tDatum.poseHeatMaps = spPoseExtractor->getHeatMaps().clone();
    +
    63  tDatum.poseKeypoints = spPoseExtractor->getPoseKeypoints().clone();
    64  tDatum.scaleNetToOutput = spPoseExtractor->getScaleNetToOutput();
    65  }
    66  // Profiling speed
    diff --git a/html/wrapper_8hpp_source.html b/html/wrapper_8hpp_source.html index 5f2dfcaf..25a5ebb5 100644 --- a/html/wrapper_8hpp_source.html +++ b/html/wrapper_8hpp_source.html @@ -632,7 +632,7 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    666  const auto netOutputSize = wrapperStructFace.netInputSize;
    667  const auto faceExtractor = std::make_shared<FaceExtractor>(
    668  wrapperStructFace.netInputSize, netOutputSize, wrapperStructPose.modelFolder,
    -
    669  gpu + gpuNumberStart
    +
    669  gpu + gpuNumberStart, wrapperStructPose.heatMapTypes, wrapperStructPose.heatMapScale
    670  );
    671  spWPoses.at(gpu).emplace_back(std::make_shared<WFaceExtractor<TDatumsPtr>>(faceExtractor));
    672  }
    @@ -657,581 +657,582 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    691  const auto netOutputSize = wrapperStructHand.netInputSize;
    692  const auto handExtractor = std::make_shared<HandExtractor>(
    693  wrapperStructHand.netInputSize, netOutputSize, wrapperStructPose.modelFolder,
    -
    694  gpu + gpuNumberStart, wrapperStructHand.scalesNumber, wrapperStructHand.scaleRange
    -
    695  );
    -
    696  spWPoses.at(gpu).emplace_back(std::make_shared<WHandExtractor<TDatumsPtr>>(handExtractor));
    -
    697  // If tracking
    -
    698  if (wrapperStructHand.tracking)
    -
    699  spWPoses.at(gpu).emplace_back(std::make_shared<WHandDetectorUpdate<TDatumsPtr>>(handDetector));
    -
    700  }
    -
    701  }
    -
    702 
    -
    703  // Pose renderer(s)
    -
    704  if (!poseGpuRenderers.empty())
    -
    705  for (auto i = 0u; i < spWPoses.size(); i++)
    -
    706  spWPoses.at(i).emplace_back(std::make_shared<WPoseRenderer<TDatumsPtr>>(poseGpuRenderers.at(i)));
    -
    707 
    -
    708  // Face renderer(s)
    -
    709  if (renderFace)
    -
    710  {
    -
    711  // CPU rendering
    -
    712  if (wrapperStructFace.renderMode == RenderMode::Cpu)
    -
    713  {
    -
    714  // Construct face renderer
    -
    715  const auto faceRenderer = std::make_shared<FaceCpuRenderer>(wrapperStructFace.renderThreshold,
    -
    716  wrapperStructFace.alphaKeypoint,
    -
    717  wrapperStructFace.alphaHeatMap);
    -
    718  // Add worker
    -
    719  cpuRenderers.emplace_back(std::make_shared<WFaceRenderer<TDatumsPtr>>(faceRenderer));
    -
    720  }
    -
    721  // GPU rendering
    -
    722  else if (wrapperStructFace.renderMode == RenderMode::Gpu)
    -
    723  {
    -
    724  for (auto i = 0u; i < spWPoses.size(); i++)
    -
    725  {
    -
    726  // Construct face renderer
    -
    727  const auto faceRenderer = std::make_shared<FaceGpuRenderer>(wrapperStructFace.renderThreshold,
    -
    728  wrapperStructFace.alphaKeypoint,
    -
    729  wrapperStructFace.alphaHeatMap);
    -
    730  // Performance boost -> share spGpuMemory for all renderers
    -
    731  if (!poseGpuRenderers.empty())
    -
    732  {
    -
    733  const bool isLastRenderer = !renderHandGpu;
    -
    734  const auto renderer = std::static_pointer_cast<PoseGpuRenderer>(poseGpuRenderers.at(i));
    -
    735  faceRenderer->setSharedParametersAndIfLast(renderer->getSharedParameters(),
    -
    736  isLastRenderer);
    -
    737  }
    -
    738  // Add worker
    -
    739  spWPoses.at(i).emplace_back(std::make_shared<WFaceRenderer<TDatumsPtr>>(faceRenderer));
    -
    740  }
    -
    741  }
    -
    742  else
    -
    743  error("Unknown RenderMode.", __LINE__, __FUNCTION__, __FILE__);
    -
    744  }
    -
    745 
    -
    746  // Hand renderer(s)
    -
    747  if (renderHand)
    -
    748  {
    -
    749  // CPU rendering
    -
    750  if (wrapperStructHand.renderMode == RenderMode::Cpu)
    -
    751  {
    -
    752  // Construct hand renderer
    -
    753  const auto handRenderer = std::make_shared<HandCpuRenderer>(wrapperStructHand.renderThreshold,
    -
    754  wrapperStructHand.alphaKeypoint,
    -
    755  wrapperStructHand.alphaHeatMap);
    -
    756  // Add worker
    -
    757  cpuRenderers.emplace_back(std::make_shared<WHandRenderer<TDatumsPtr>>(handRenderer));
    -
    758  }
    -
    759  // GPU rendering
    -
    760  else if (wrapperStructHand.renderMode == RenderMode::Gpu)
    -
    761  {
    -
    762  for (auto i = 0u; i < spWPoses.size(); i++)
    -
    763  {
    -
    764  // Construct hands renderer
    -
    765  const auto handRenderer = std::make_shared<HandGpuRenderer>(wrapperStructHand.renderThreshold,
    -
    766  wrapperStructHand.alphaKeypoint,
    -
    767  wrapperStructHand.alphaHeatMap);
    -
    768  // Performance boost -> share spGpuMemory for all renderers
    -
    769  if (!poseGpuRenderers.empty())
    -
    770  {
    -
    771  const bool isLastRenderer = true;
    -
    772  const auto renderer = std::static_pointer_cast<PoseGpuRenderer>(poseGpuRenderers.at(i));
    -
    773  handRenderer->setSharedParametersAndIfLast(renderer->getSharedParameters(),
    -
    774  isLastRenderer);
    -
    775  }
    -
    776  // Add worker
    -
    777  spWPoses.at(i).emplace_back(std::make_shared<WHandRenderer<TDatumsPtr>>(handRenderer));
    -
    778  }
    -
    779  }
    -
    780  else
    -
    781  error("Unknown RenderMode.", __LINE__, __FUNCTION__, __FILE__);
    -
    782  }
    -
    783 
    -
    784  // Itermediate workers (e.g. OpenPose format to cv::Mat, json & frames recorder, ...)
    -
    785  mPostProcessingWs.clear();
    -
    786  // Frame buffer and ordering
    -
    787  if (spWPoses.size() > 1u)
    -
    788  mPostProcessingWs.emplace_back(std::make_shared<WQueueOrderer<TDatumsPtr>>());
    -
    789  // Frames processor (OpenPose format -> cv::Mat format)
    -
    790  if (renderOutput)
    -
    791  {
    -
    792  mPostProcessingWs = mergeWorkers(mPostProcessingWs, cpuRenderers);
    -
    793  const auto opOutputToCvMat = std::make_shared<OpOutputToCvMat>();
    -
    794  mPostProcessingWs.emplace_back(std::make_shared<WOpOutputToCvMat<TDatumsPtr>>(opOutputToCvMat));
    -
    795  }
    -
    796  // Re-scale pose if desired
    -
    797  // If desired scale is not the current output
    -
    798  if (wrapperStructPose.keypointScale != ScaleMode::OutputResolution
    -
    799  // and desired scale is not input when size(output) = size(input)
    -
    800  && !(wrapperStructPose.keypointScale == ScaleMode::InputResolution &&
    -
    801  (finalOutputSize == producerSize || finalOutputSize.x <= 0 || finalOutputSize.y <= 0))
    -
    802  // and desired scale is not net output when size(output) = size(net output)
    -
    803  && !(wrapperStructPose.keypointScale == ScaleMode::NetOutputResolution
    -
    804  && finalOutputSize == poseNetOutputSize))
    -
    805  {
    -
    806  // Then we must rescale the keypoints
    -
    807  auto keypointScaler = std::make_shared<KeypointScaler>(wrapperStructPose.keypointScale);
    -
    808  mPostProcessingWs.emplace_back(std::make_shared<WKeypointScaler<TDatumsPtr>>(keypointScaler));
    -
    809  }
    -
    810 
    -
    811  mOutputWs.clear();
    -
    812  // Write people pose data on disk (json for OpenCV >= 3, xml, yml...)
    -
    813  if (!writeKeypointCleaned.empty())
    -
    814  {
    -
    815  const auto keypointSaver = std::make_shared<KeypointSaver>(writeKeypointCleaned,
    -
    816  wrapperStructOutput.writeKeypointFormat);
    -
    817  mOutputWs.emplace_back(std::make_shared<WPoseSaver<TDatumsPtr>>(keypointSaver));
    -
    818  if (wrapperStructFace.enable)
    -
    819  mOutputWs.emplace_back(std::make_shared<WFaceSaver<TDatumsPtr>>(keypointSaver));
    -
    820  if (wrapperStructHand.enable)
    -
    821  mOutputWs.emplace_back(std::make_shared<WHandSaver<TDatumsPtr>>(keypointSaver));
    -
    822  }
    -
    823  // Write people pose data on disk (json format)
    -
    824  if (!writeKeypointJsonCleaned.empty())
    -
    825  {
    -
    826  const auto keypointJsonSaver = std::make_shared<KeypointJsonSaver>(writeKeypointJsonCleaned);
    -
    827  mOutputWs.emplace_back(std::make_shared<WKeypointJsonSaver<TDatumsPtr>>(keypointJsonSaver));
    -
    828  }
    -
    829  // Write people pose data on disk (COCO validation json format)
    -
    830  if (!wrapperStructOutput.writeCocoJson.empty())
    -
    831  {
    -
    832  // If humanFormat: bigger size (& maybe slower to process), but easier for user to read it
    -
    833  const auto humanFormat = true;
    -
    834  const auto cocoJsonSaver = std::make_shared<CocoJsonSaver>(wrapperStructOutput.writeCocoJson,
    -
    835  humanFormat);
    -
    836  mOutputWs.emplace_back(std::make_shared<WCocoJsonSaver<TDatumsPtr>>(cocoJsonSaver));
    -
    837  }
    -
    838  // Write frames as desired image format on hard disk
    -
    839  if (!writeImagesCleaned.empty())
    -
    840  {
    -
    841  const auto imageSaver = std::make_shared<ImageSaver>(writeImagesCleaned,
    -
    842  wrapperStructOutput.writeImagesFormat);
    -
    843  mOutputWs.emplace_back(std::make_shared<WImageSaver<TDatumsPtr>>(imageSaver));
    -
    844  }
    -
    845  // Write frames as *.avi video on hard disk
    -
    846  if (!wrapperStructOutput.writeVideo.empty() && wrapperStructInput.producerSharedPtr != nullptr)
    -
    847  {
    -
    848  if (finalOutputSize.x <= 0 || finalOutputSize.y <= 0)
    -
    849  error("Video can only be recorded if outputSize is known.", __LINE__, __FUNCTION__, __FILE__);
    -
    850  const auto originalVideoFps = (wrapperStructInput.producerSharedPtr->get(CV_CAP_PROP_FPS) > 0.
    -
    851  ? wrapperStructInput.producerSharedPtr->get(CV_CAP_PROP_FPS) : 30.);
    -
    852  const auto videoSaver = std::make_shared<VideoSaver>(
    -
    853  wrapperStructOutput.writeVideo, CV_FOURCC('M','J','P','G'), originalVideoFps, finalOutputSize
    -
    854  );
    -
    855  mOutputWs.emplace_back(std::make_shared<WVideoSaver<TDatumsPtr>>(videoSaver));
    -
    856  }
    -
    857  // Write heat maps as desired image format on hard disk
    -
    858  if (!writeHeatMapsCleaned.empty())
    -
    859  {
    -
    860  const auto heatMapSaver = std::make_shared<HeatMapSaver>(writeHeatMapsCleaned,
    -
    861  wrapperStructOutput.writeHeatMapsFormat);
    -
    862  mOutputWs.emplace_back(std::make_shared<WHeatMapSaver<TDatumsPtr>>(heatMapSaver));
    -
    863  }
    -
    864  // Add frame information for GUI
    -
    865  // If this WGuiInfoAdder instance is placed before the WImageSaver or WVideoSaver, then the resulting
    -
    866  // recorded frames will look exactly as the final displayed image by the GUI
    -
    867  if (wrapperStructOutput.guiVerbose && (wrapperStructOutput.displayGui || !mUserOutputWs.empty()
    -
    868  || mThreadManagerMode == ThreadManagerMode::Asynchronous
    -
    869  || mThreadManagerMode == ThreadManagerMode::AsynchronousOut))
    -
    870  {
    -
    871  const auto guiInfoAdder = std::make_shared<GuiInfoAdder>(gpuNumber, wrapperStructOutput.displayGui);
    -
    872  mOutputWs.emplace_back(std::make_shared<WGuiInfoAdder<TDatumsPtr>>(guiInfoAdder));
    -
    873  }
    -
    874  // Minimal graphical user interface (GUI)
    -
    875  spWGui = nullptr;
    -
    876  if (wrapperStructOutput.displayGui)
    -
    877  {
    -
    878  // PoseRenderers to Renderers
    -
    879  std::vector<std::shared_ptr<Renderer>> renderers;
    -
    880  if (wrapperStructPose.renderMode == RenderMode::Cpu)
    -
    881  renderers.emplace_back(std::static_pointer_cast<Renderer>(poseCpuRenderer));
    -
    882  else
    -
    883  for (const auto& poseGpuRenderer : poseGpuRenderers)
    -
    884  renderers.emplace_back(std::static_pointer_cast<Renderer>(poseGpuRenderer));
    -
    885  // Gui
    -
    886  const auto gui = std::make_shared<Gui>(
    -
    887  finalOutputSize, wrapperStructOutput.fullScreen, mThreadManager.getIsRunningSharedPtr(),
    -
    888  spVideoSeek, poseExtractors, renderers
    -
    889  );
    -
    890  // WGui
    -
    891  spWGui = {std::make_shared<WGui<TDatumsPtr>>(gui)};
    -
    892  }
    -
    893  log("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    -
    894  }
    -
    895  catch (const std::exception& e)
    -
    896  {
    -
    897  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    898  }
    -
    899  }
    -
    900 
    -
    901  template<typename TDatums, typename TWorker, typename TQueue>
    -
    902  void Wrapper<TDatums, TWorker, TQueue>::exec()
    -
    903  {
    -
    904  try
    -
    905  {
    -
    906  configureThreadManager();
    -
    907  mThreadManager.exec();
    -
    908  }
    -
    909  catch (const std::exception& e)
    -
    910  {
    -
    911  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    912  }
    -
    913  }
    -
    914 
    -
    915  template<typename TDatums, typename TWorker, typename TQueue>
    -
    916  void Wrapper<TDatums, TWorker, TQueue>::start()
    -
    917  {
    -
    918  try
    -
    919  {
    -
    920  configureThreadManager();
    -
    921  mThreadManager.start();
    -
    922  }
    -
    923  catch (const std::exception& e)
    -
    924  {
    -
    925  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    926  }
    -
    927  }
    -
    928 
    -
    929  template<typename TDatums, typename TWorker, typename TQueue>
    -
    930  void Wrapper<TDatums, TWorker, TQueue>::stop()
    -
    931  {
    -
    932  try
    -
    933  {
    -
    934  mThreadManager.stop();
    -
    935  }
    -
    936  catch (const std::exception& e)
    -
    937  {
    -
    938  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    939  }
    -
    940  }
    -
    941 
    -
    942  template<typename TDatums, typename TWorker, typename TQueue>
    -
    943  bool Wrapper<TDatums, TWorker, TQueue>::isRunning() const
    -
    944  {
    -
    945  try
    -
    946  {
    -
    947  return mThreadManager.isRunning();
    -
    948  }
    -
    949  catch (const std::exception& e)
    -
    950  {
    -
    951  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    952  return false;
    -
    953  }
    -
    954  }
    -
    955 
    -
    956  template<typename TDatums, typename TWorker, typename TQueue>
    -
    957  bool Wrapper<TDatums, TWorker, TQueue>::tryEmplace(std::shared_ptr<TDatums>& tDatums)
    -
    958  {
    -
    959  try
    -
    960  {
    -
    961  if (!mUserInputWs.empty())
    -
    962  error("Emplace cannot be called if an input worker was already selected.",
    -
    963  __LINE__, __FUNCTION__, __FILE__);
    -
    964  return mThreadManager.tryEmplace(tDatums);
    -
    965  }
    -
    966  catch (const std::exception& e)
    -
    967  {
    -
    968  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    969  return false;
    -
    970  }
    -
    971  }
    -
    972 
    -
    973  template<typename TDatums, typename TWorker, typename TQueue>
    -
    974  bool Wrapper<TDatums, TWorker, TQueue>::waitAndEmplace(std::shared_ptr<TDatums>& tDatums)
    -
    975  {
    -
    976  try
    -
    977  {
    -
    978  if (!mUserInputWs.empty())
    -
    979  error("Emplace cannot be called if an input worker was already selected.",
    -
    980  __LINE__, __FUNCTION__, __FILE__);
    -
    981  return mThreadManager.waitAndEmplace(tDatums);
    -
    982  }
    -
    983  catch (const std::exception& e)
    -
    984  {
    -
    985  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    986  return false;
    -
    987  }
    -
    988  }
    -
    989 
    -
    990  template<typename TDatums, typename TWorker, typename TQueue>
    -
    991  bool Wrapper<TDatums, TWorker, TQueue>::tryPush(const std::shared_ptr<TDatums>& tDatums)
    -
    992  {
    -
    993  try
    -
    994  {
    -
    995  if (!mUserInputWs.empty())
    -
    996  error("Push cannot be called if an input worker was already selected.",
    -
    997  __LINE__, __FUNCTION__, __FILE__);
    -
    998  return mThreadManager.tryPush(tDatums);
    -
    999  }
    -
    1000  catch (const std::exception& e)
    -
    1001  {
    -
    1002  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1003  return false;
    -
    1004  }
    -
    1005  }
    -
    1006 
    -
    1007  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1008  bool Wrapper<TDatums, TWorker, TQueue>::waitAndPush(const std::shared_ptr<TDatums>& tDatums)
    -
    1009  {
    -
    1010  try
    -
    1011  {
    -
    1012  if (!mUserInputWs.empty())
    -
    1013  error("Push cannot be called if an input worker was already selected.",
    -
    1014  __LINE__, __FUNCTION__, __FILE__);
    -
    1015  return mThreadManager.waitAndPush(tDatums);
    -
    1016  }
    -
    1017  catch (const std::exception& e)
    -
    1018  {
    -
    1019  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1020  return false;
    -
    1021  }
    -
    1022  }
    -
    1023 
    -
    1024  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1025  bool Wrapper<TDatums, TWorker, TQueue>::tryPop(std::shared_ptr<TDatums>& tDatums)
    -
    1026  {
    -
    1027  try
    -
    1028  {
    -
    1029  if (!mUserOutputWs.empty())
    -
    1030  error("Pop cannot be called if an output worker was already selected.",
    -
    1031  __LINE__, __FUNCTION__, __FILE__);
    -
    1032  return mThreadManager.tryPop(tDatums);
    -
    1033  }
    -
    1034  catch (const std::exception& e)
    -
    1035  {
    -
    1036  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1037  return false;
    -
    1038  }
    -
    1039  }
    -
    1040 
    -
    1041  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1042  bool Wrapper<TDatums, TWorker, TQueue>::waitAndPop(std::shared_ptr<TDatums>& tDatums)
    -
    1043  {
    -
    1044  try
    -
    1045  {
    -
    1046  if (!mUserOutputWs.empty())
    -
    1047  error("Pop cannot be called if an output worker was already selected.",
    -
    1048  __LINE__, __FUNCTION__, __FILE__);
    -
    1049  return mThreadManager.waitAndPop(tDatums);
    -
    1050  }
    -
    1051  catch (const std::exception& e)
    -
    1052  {
    -
    1053  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1054  return false;
    -
    1055  }
    -
    1056  }
    -
    1057 
    -
    1058  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1059  void Wrapper<TDatums, TWorker, TQueue>::reset()
    -
    1060  {
    -
    1061  try
    -
    1062  {
    -
    1063  mThreadManager.reset();
    -
    1064  mThreadId = 0ull;
    -
    1065  // Reset
    -
    1066  mUserInputWs.clear();
    -
    1067  wDatumProducer = nullptr;
    -
    1068  spWCvMatToOpInput = nullptr;
    -
    1069  spWCvMatToOpOutput = nullptr;
    -
    1070  spWPoses.clear();
    -
    1071  mPostProcessingWs.clear();
    -
    1072  mUserPostProcessingWs.clear();
    -
    1073  mOutputWs.clear();
    -
    1074  spWGui = nullptr;
    -
    1075  mUserOutputWs.clear();
    -
    1076  }
    -
    1077  catch (const std::exception& e)
    -
    1078  {
    -
    1079  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1080  }
    -
    1081  }
    -
    1082 
    -
    1083  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1084  void Wrapper<TDatums, TWorker, TQueue>::configureThreadManager()
    -
    1085  {
    -
    1086  try
    -
    1087  {
    -
    1088  // The less number of queues -> the less lag
    -
    1089 
    -
    1090  // Security checks
    -
    1091  if (spWCvMatToOpInput == nullptr || spWCvMatToOpOutput == nullptr)
    -
    1092  error("Configure the Wrapper class before calling `start()`.", __LINE__, __FUNCTION__, __FILE__);
    -
    1093  if ((wDatumProducer == nullptr) == (mUserInputWs.empty())
    -
    1094  && mThreadManagerMode != ThreadManagerMode::Asynchronous
    -
    1095  && mThreadManagerMode != ThreadManagerMode::AsynchronousIn)
    -
    1096  {
    -
    1097  const auto message = "You need to have 1 and only 1 producer selected. You can introduce your own"
    -
    1098  " producer by using setWorkerInput() or use the OpenPose default producer by"
    -
    1099  " configuring it in the configure function) or use the"
    -
    1100  " ThreadManagerMode::Asynchronous(In) mode.";
    -
    1101  error(message, __LINE__, __FUNCTION__, __FILE__);
    -
    1102  }
    -
    1103  if (mOutputWs.empty() && mUserOutputWs.empty() && spWGui == nullptr
    -
    1104  && mThreadManagerMode != ThreadManagerMode::Asynchronous
    -
    1105  && mThreadManagerMode != ThreadManagerMode::AsynchronousOut)
    -
    1106  {
    -
    1107  error("No output selected.", __LINE__, __FUNCTION__, __FILE__);
    -
    1108  }
    -
    1109 
    -
    1110  // Thread Manager:
    -
    1111  // Clean previous thread manager (avoid configure to crash the program if used more than once)
    -
    1112  mThreadManager.reset();
    -
    1113  mThreadId = 0ull;
    -
    1114  auto queueIn = 0ull;
    -
    1115  auto queueOut = 1ull;
    -
    1116  // If custom user Worker and uses its own thread
    -
    1117  spWIdGenerator = std::make_shared<WIdGenerator<std::shared_ptr<TDatums>>>();
    -
    1118  if (!mUserInputWs.empty() && mUserInputWsOnNewThread)
    -
    1119  {
    -
    1120  // Thread 0, queues 0 -> 1
    -
    1121  mThreadManager.add(mThreadId, mUserInputWs, queueIn++, queueOut++);
    -
    1122  threadIdPP();
    -
    1123  // Thread 1, queues 1 -> 2
    -
    1124  mThreadManager.add(mThreadId, {spWIdGenerator, spWCvMatToOpInput, spWCvMatToOpOutput}, queueIn++,
    -
    1125  queueOut++);
    -
    1126  }
    -
    1127  // If custom user Worker in same thread or producer on same thread
    -
    1128  else
    -
    1129  {
    -
    1130  std::vector<TWorker> workersAux;
    -
    1131  // Custom user Worker
    -
    1132  if (!mUserInputWs.empty())
    -
    1133  workersAux = mergeWorkers(workersAux, mUserInputWs);
    -
    1134  // OpenPose producer
    -
    1135  else if (wDatumProducer != nullptr)
    -
    1136  workersAux = mergeWorkers(workersAux, {wDatumProducer});
    -
    1137  // Otherwise
    -
    1138  else if (mThreadManagerMode != ThreadManagerMode::Asynchronous
    -
    1139  && mThreadManagerMode != ThreadManagerMode::AsynchronousIn)
    -
    1140  error("No input selected.", __LINE__, __FUNCTION__, __FILE__);
    -
    1141 
    -
    1142  workersAux = mergeWorkers(workersAux, {spWIdGenerator, spWCvMatToOpInput, spWCvMatToOpOutput});
    -
    1143  // Thread 0 or 1, queues 0 -> 1
    -
    1144  mThreadManager.add(mThreadId, workersAux, queueIn++, queueOut++);
    -
    1145  }
    -
    1146  threadIdPP();
    -
    1147  // Pose estimation & rendering
    -
    1148  // Thread 1 or 2...X, queues 1 -> 2, X = 2 + #GPUs
    -
    1149  if (!spWPoses.empty())
    -
    1150  {
    -
    1151  if (mMultiThreadEnabled)
    -
    1152  {
    -
    1153  for (auto& wPose : spWPoses)
    -
    1154  {
    -
    1155  mThreadManager.add(mThreadId, wPose, queueIn, queueOut);
    -
    1156  threadIdPP();
    -
    1157  }
    -
    1158  }
    -
    1159  else
    -
    1160  {
    -
    1161  log("Multi-threading disabled, only 1 thread running. All GPUs have been disabled but the first"
    -
    1162  " one, which is defined by gpuNumberStart (in the demo, it is set with the `num_gpu_start`"
    -
    1163  " flag.");
    -
    1164  mThreadManager.add(mThreadId, spWPoses.at(0), queueIn, queueOut);
    -
    1165  }
    -
    1166  queueIn++;
    -
    1167  queueOut++;
    -
    1168  }
    -
    1169  // If custom user Worker and uses its own thread
    -
    1170  if (!mUserPostProcessingWs.empty() && mUserPostProcessingWsOnNewThread)
    -
    1171  {
    -
    1172  // Post processing workers
    -
    1173  if (!mPostProcessingWs.empty())
    -
    1174  {
    -
    1175  // Thread 2 or 3, queues 2 -> 3
    -
    1176  mThreadManager.add(mThreadId, mPostProcessingWs, queueIn++, queueOut++);
    -
    1177  threadIdPP();
    -
    1178  }
    -
    1179  // User processing workers
    -
    1180  // Thread 3 or 4, queues 3 -> 4
    -
    1181  mThreadManager.add(mThreadId, mUserPostProcessingWs, queueIn++, queueOut++);
    -
    1182  threadIdPP();
    -
    1183  // Output workers
    -
    1184  if (!mOutputWs.empty())
    -
    1185  {
    -
    1186  // Thread 4 or 5, queues 4 -> 5
    -
    1187  mThreadManager.add(mThreadId, mOutputWs, queueIn++, queueOut++);
    -
    1188  threadIdPP();
    -
    1189  }
    -
    1190  }
    -
    1191  // If custom user Worker in same thread or producer on same thread
    -
    1192  else
    -
    1193  {
    -
    1194  // Post processing workers + User post processing workers + Output workers
    -
    1195  auto workersAux = mergeWorkers(mPostProcessingWs, mUserPostProcessingWs);
    -
    1196  workersAux = mergeWorkers(workersAux, mOutputWs);
    -
    1197  if (!workersAux.empty())
    -
    1198  {
    -
    1199  // Thread 2 or 3, queues 2 -> 3
    -
    1200  mThreadManager.add(mThreadId, workersAux, queueIn++, queueOut++);
    -
    1201  threadIdPP();
    -
    1202  }
    -
    1203  }
    -
    1204  // User output worker
    -
    1205  // Thread Y, queues Q -> Q+1
    -
    1206  if (!mUserOutputWs.empty())
    -
    1207  {
    -
    1208  if (mUserOutputWsOnNewThread)
    -
    1209  {
    -
    1210  mThreadManager.add(mThreadId, mUserOutputWs, queueIn++, queueOut++);
    -
    1211  threadIdPP();
    -
    1212  }
    -
    1213  else
    -
    1214  mThreadManager.add(mThreadId-1, mUserOutputWs, queueIn++, queueOut++);
    -
    1215  }
    -
    1216  // OpenPose GUI
    -
    1217  if (spWGui != nullptr)
    -
    1218  {
    -
    1219  // Thread Y+1, queues Q+1 -> Q+2
    -
    1220  mThreadManager.add(mThreadId, spWGui, queueIn++, queueOut++);
    -
    1221  threadIdPP();
    -
    1222  }
    -
    1223  log("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    -
    1224  }
    -
    1225  catch (const std::exception& e)
    -
    1226  {
    -
    1227  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1228  }
    -
    1229  }
    -
    1230 
    -
    1231  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1232  unsigned long long Wrapper<TDatums, TWorker, TQueue>::threadIdPP()
    -
    1233  {
    -
    1234  try
    -
    1235  {
    -
    1236  if (mMultiThreadEnabled)
    -
    1237  mThreadId++;
    -
    1238  return mThreadId;
    -
    1239  }
    -
    1240  catch (const std::exception& e)
    -
    1241  {
    -
    1242  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1243  return 0ull;
    -
    1244  }
    -
    1245  }
    -
    1246 
    -
    1247  template<typename TDatums, typename TWorker, typename TQueue>
    -
    1248  std::vector<TWorker> Wrapper<TDatums, TWorker, TQueue>::mergeWorkers(const std::vector<TWorker>& workersA,
    -
    1249  const std::vector<TWorker>& workersB)
    -
    1250  {
    -
    1251  try
    -
    1252  {
    -
    1253  auto workersToReturn(workersA);
    -
    1254  for (auto& worker : workersB)
    -
    1255  workersToReturn.emplace_back(worker);
    -
    1256  return workersToReturn;
    -
    1257  }
    -
    1258  catch (const std::exception& e)
    -
    1259  {
    -
    1260  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    -
    1261  return std::vector<TWorker>{};
    -
    1262  }
    -
    1263  }
    -
    1264 
    -
    1265  extern template class Wrapper<DATUM_BASE_NO_PTR>;
    -
    1266 }
    -
    1267 
    -
    1268 #endif // OPENPOSE_WRAPPER_WRAPPER_HPP
    +
    694  gpu + gpuNumberStart, wrapperStructHand.scalesNumber, wrapperStructHand.scaleRange,
    +
    695  wrapperStructPose.heatMapTypes, wrapperStructPose.heatMapScale
    +
    696  );
    +
    697  spWPoses.at(gpu).emplace_back(std::make_shared<WHandExtractor<TDatumsPtr>>(handExtractor));
    +
    698  // If tracking
    +
    699  if (wrapperStructHand.tracking)
    +
    700  spWPoses.at(gpu).emplace_back(std::make_shared<WHandDetectorUpdate<TDatumsPtr>>(handDetector));
    +
    701  }
    +
    702  }
    +
    703 
    +
    704  // Pose renderer(s)
    +
    705  if (!poseGpuRenderers.empty())
    +
    706  for (auto i = 0u; i < spWPoses.size(); i++)
    +
    707  spWPoses.at(i).emplace_back(std::make_shared<WPoseRenderer<TDatumsPtr>>(poseGpuRenderers.at(i)));
    +
    708 
    +
    709  // Face renderer(s)
    +
    710  if (renderFace)
    +
    711  {
    +
    712  // CPU rendering
    +
    713  if (wrapperStructFace.renderMode == RenderMode::Cpu)
    +
    714  {
    +
    715  // Construct face renderer
    +
    716  const auto faceRenderer = std::make_shared<FaceCpuRenderer>(wrapperStructFace.renderThreshold,
    +
    717  wrapperStructFace.alphaKeypoint,
    +
    718  wrapperStructFace.alphaHeatMap);
    +
    719  // Add worker
    +
    720  cpuRenderers.emplace_back(std::make_shared<WFaceRenderer<TDatumsPtr>>(faceRenderer));
    +
    721  }
    +
    722  // GPU rendering
    +
    723  else if (wrapperStructFace.renderMode == RenderMode::Gpu)
    +
    724  {
    +
    725  for (auto i = 0u; i < spWPoses.size(); i++)
    +
    726  {
    +
    727  // Construct face renderer
    +
    728  const auto faceRenderer = std::make_shared<FaceGpuRenderer>(wrapperStructFace.renderThreshold,
    +
    729  wrapperStructFace.alphaKeypoint,
    +
    730  wrapperStructFace.alphaHeatMap);
    +
    731  // Performance boost -> share spGpuMemory for all renderers
    +
    732  if (!poseGpuRenderers.empty())
    +
    733  {
    +
    734  const bool isLastRenderer = !renderHandGpu;
    +
    735  const auto renderer = std::static_pointer_cast<PoseGpuRenderer>(poseGpuRenderers.at(i));
    +
    736  faceRenderer->setSharedParametersAndIfLast(renderer->getSharedParameters(),
    +
    737  isLastRenderer);
    +
    738  }
    +
    739  // Add worker
    +
    740  spWPoses.at(i).emplace_back(std::make_shared<WFaceRenderer<TDatumsPtr>>(faceRenderer));
    +
    741  }
    +
    742  }
    +
    743  else
    +
    744  error("Unknown RenderMode.", __LINE__, __FUNCTION__, __FILE__);
    +
    745  }
    +
    746 
    +
    747  // Hand renderer(s)
    +
    748  if (renderHand)
    +
    749  {
    +
    750  // CPU rendering
    +
    751  if (wrapperStructHand.renderMode == RenderMode::Cpu)
    +
    752  {
    +
    753  // Construct hand renderer
    +
    754  const auto handRenderer = std::make_shared<HandCpuRenderer>(wrapperStructHand.renderThreshold,
    +
    755  wrapperStructHand.alphaKeypoint,
    +
    756  wrapperStructHand.alphaHeatMap);
    +
    757  // Add worker
    +
    758  cpuRenderers.emplace_back(std::make_shared<WHandRenderer<TDatumsPtr>>(handRenderer));
    +
    759  }
    +
    760  // GPU rendering
    +
    761  else if (wrapperStructHand.renderMode == RenderMode::Gpu)
    +
    762  {
    +
    763  for (auto i = 0u; i < spWPoses.size(); i++)
    +
    764  {
    +
    765  // Construct hands renderer
    +
    766  const auto handRenderer = std::make_shared<HandGpuRenderer>(wrapperStructHand.renderThreshold,
    +
    767  wrapperStructHand.alphaKeypoint,
    +
    768  wrapperStructHand.alphaHeatMap);
    +
    769  // Performance boost -> share spGpuMemory for all renderers
    +
    770  if (!poseGpuRenderers.empty())
    +
    771  {
    +
    772  const bool isLastRenderer = true;
    +
    773  const auto renderer = std::static_pointer_cast<PoseGpuRenderer>(poseGpuRenderers.at(i));
    +
    774  handRenderer->setSharedParametersAndIfLast(renderer->getSharedParameters(),
    +
    775  isLastRenderer);
    +
    776  }
    +
    777  // Add worker
    +
    778  spWPoses.at(i).emplace_back(std::make_shared<WHandRenderer<TDatumsPtr>>(handRenderer));
    +
    779  }
    +
    780  }
    +
    781  else
    +
    782  error("Unknown RenderMode.", __LINE__, __FUNCTION__, __FILE__);
    +
    783  }
    +
    784 
    +
    785  // Itermediate workers (e.g. OpenPose format to cv::Mat, json & frames recorder, ...)
    +
    786  mPostProcessingWs.clear();
    +
    787  // Frame buffer and ordering
    +
    788  if (spWPoses.size() > 1u)
    +
    789  mPostProcessingWs.emplace_back(std::make_shared<WQueueOrderer<TDatumsPtr>>());
    +
    790  // Frames processor (OpenPose format -> cv::Mat format)
    +
    791  if (renderOutput)
    +
    792  {
    +
    793  mPostProcessingWs = mergeWorkers(mPostProcessingWs, cpuRenderers);
    +
    794  const auto opOutputToCvMat = std::make_shared<OpOutputToCvMat>();
    +
    795  mPostProcessingWs.emplace_back(std::make_shared<WOpOutputToCvMat<TDatumsPtr>>(opOutputToCvMat));
    +
    796  }
    +
    797  // Re-scale pose if desired
    +
    798  // If desired scale is not the current output
    +
    799  if (wrapperStructPose.keypointScale != ScaleMode::OutputResolution
    +
    800  // and desired scale is not input when size(output) = size(input)
    +
    801  && !(wrapperStructPose.keypointScale == ScaleMode::InputResolution &&
    +
    802  (finalOutputSize == producerSize || finalOutputSize.x <= 0 || finalOutputSize.y <= 0))
    +
    803  // and desired scale is not net output when size(output) = size(net output)
    +
    804  && !(wrapperStructPose.keypointScale == ScaleMode::NetOutputResolution
    +
    805  && finalOutputSize == poseNetOutputSize))
    +
    806  {
    +
    807  // Then we must rescale the keypoints
    +
    808  auto keypointScaler = std::make_shared<KeypointScaler>(wrapperStructPose.keypointScale);
    +
    809  mPostProcessingWs.emplace_back(std::make_shared<WKeypointScaler<TDatumsPtr>>(keypointScaler));
    +
    810  }
    +
    811 
    +
    812  mOutputWs.clear();
    +
    813  // Write people pose data on disk (json for OpenCV >= 3, xml, yml...)
    +
    814  if (!writeKeypointCleaned.empty())
    +
    815  {
    +
    816  const auto keypointSaver = std::make_shared<KeypointSaver>(writeKeypointCleaned,
    +
    817  wrapperStructOutput.writeKeypointFormat);
    +
    818  mOutputWs.emplace_back(std::make_shared<WPoseSaver<TDatumsPtr>>(keypointSaver));
    +
    819  if (wrapperStructFace.enable)
    +
    820  mOutputWs.emplace_back(std::make_shared<WFaceSaver<TDatumsPtr>>(keypointSaver));
    +
    821  if (wrapperStructHand.enable)
    +
    822  mOutputWs.emplace_back(std::make_shared<WHandSaver<TDatumsPtr>>(keypointSaver));
    +
    823  }
    +
    824  // Write people pose data on disk (json format)
    +
    825  if (!writeKeypointJsonCleaned.empty())
    +
    826  {
    +
    827  const auto keypointJsonSaver = std::make_shared<KeypointJsonSaver>(writeKeypointJsonCleaned);
    +
    828  mOutputWs.emplace_back(std::make_shared<WKeypointJsonSaver<TDatumsPtr>>(keypointJsonSaver));
    +
    829  }
    +
    830  // Write people pose data on disk (COCO validation json format)
    +
    831  if (!wrapperStructOutput.writeCocoJson.empty())
    +
    832  {
    +
    833  // If humanFormat: bigger size (& maybe slower to process), but easier for user to read it
    +
    834  const auto humanFormat = true;
    +
    835  const auto cocoJsonSaver = std::make_shared<CocoJsonSaver>(wrapperStructOutput.writeCocoJson,
    +
    836  humanFormat);
    +
    837  mOutputWs.emplace_back(std::make_shared<WCocoJsonSaver<TDatumsPtr>>(cocoJsonSaver));
    +
    838  }
    +
    839  // Write frames as desired image format on hard disk
    +
    840  if (!writeImagesCleaned.empty())
    +
    841  {
    +
    842  const auto imageSaver = std::make_shared<ImageSaver>(writeImagesCleaned,
    +
    843  wrapperStructOutput.writeImagesFormat);
    +
    844  mOutputWs.emplace_back(std::make_shared<WImageSaver<TDatumsPtr>>(imageSaver));
    +
    845  }
    +
    846  // Write frames as *.avi video on hard disk
    +
    847  if (!wrapperStructOutput.writeVideo.empty() && wrapperStructInput.producerSharedPtr != nullptr)
    +
    848  {
    +
    849  if (finalOutputSize.x <= 0 || finalOutputSize.y <= 0)
    +
    850  error("Video can only be recorded if outputSize is known.", __LINE__, __FUNCTION__, __FILE__);
    +
    851  const auto originalVideoFps = (wrapperStructInput.producerSharedPtr->get(CV_CAP_PROP_FPS) > 0.
    +
    852  ? wrapperStructInput.producerSharedPtr->get(CV_CAP_PROP_FPS) : 30.);
    +
    853  const auto videoSaver = std::make_shared<VideoSaver>(
    +
    854  wrapperStructOutput.writeVideo, CV_FOURCC('M','J','P','G'), originalVideoFps, finalOutputSize
    +
    855  );
    +
    856  mOutputWs.emplace_back(std::make_shared<WVideoSaver<TDatumsPtr>>(videoSaver));
    +
    857  }
    +
    858  // Write heat maps as desired image format on hard disk
    +
    859  if (!writeHeatMapsCleaned.empty())
    +
    860  {
    +
    861  const auto heatMapSaver = std::make_shared<HeatMapSaver>(writeHeatMapsCleaned,
    +
    862  wrapperStructOutput.writeHeatMapsFormat);
    +
    863  mOutputWs.emplace_back(std::make_shared<WHeatMapSaver<TDatumsPtr>>(heatMapSaver));
    +
    864  }
    +
    865  // Add frame information for GUI
    +
    866  // If this WGuiInfoAdder instance is placed before the WImageSaver or WVideoSaver, then the resulting
    +
    867  // recorded frames will look exactly as the final displayed image by the GUI
    +
    868  if (wrapperStructOutput.guiVerbose && (wrapperStructOutput.displayGui || !mUserOutputWs.empty()
    +
    869  || mThreadManagerMode == ThreadManagerMode::Asynchronous
    +
    870  || mThreadManagerMode == ThreadManagerMode::AsynchronousOut))
    +
    871  {
    +
    872  const auto guiInfoAdder = std::make_shared<GuiInfoAdder>(gpuNumber, wrapperStructOutput.displayGui);
    +
    873  mOutputWs.emplace_back(std::make_shared<WGuiInfoAdder<TDatumsPtr>>(guiInfoAdder));
    +
    874  }
    +
    875  // Minimal graphical user interface (GUI)
    +
    876  spWGui = nullptr;
    +
    877  if (wrapperStructOutput.displayGui)
    +
    878  {
    +
    879  // PoseRenderers to Renderers
    +
    880  std::vector<std::shared_ptr<Renderer>> renderers;
    +
    881  if (wrapperStructPose.renderMode == RenderMode::Cpu)
    +
    882  renderers.emplace_back(std::static_pointer_cast<Renderer>(poseCpuRenderer));
    +
    883  else
    +
    884  for (const auto& poseGpuRenderer : poseGpuRenderers)
    +
    885  renderers.emplace_back(std::static_pointer_cast<Renderer>(poseGpuRenderer));
    +
    886  // Gui
    +
    887  const auto gui = std::make_shared<Gui>(
    +
    888  finalOutputSize, wrapperStructOutput.fullScreen, mThreadManager.getIsRunningSharedPtr(),
    +
    889  spVideoSeek, poseExtractors, renderers
    +
    890  );
    +
    891  // WGui
    +
    892  spWGui = {std::make_shared<WGui<TDatumsPtr>>(gui)};
    +
    893  }
    +
    894  log("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    +
    895  }
    +
    896  catch (const std::exception& e)
    +
    897  {
    +
    898  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    899  }
    +
    900  }
    +
    901 
    +
    902  template<typename TDatums, typename TWorker, typename TQueue>
    +
    903  void Wrapper<TDatums, TWorker, TQueue>::exec()
    +
    904  {
    +
    905  try
    +
    906  {
    +
    907  configureThreadManager();
    +
    908  mThreadManager.exec();
    +
    909  }
    +
    910  catch (const std::exception& e)
    +
    911  {
    +
    912  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    913  }
    +
    914  }
    +
    915 
    +
    916  template<typename TDatums, typename TWorker, typename TQueue>
    +
    917  void Wrapper<TDatums, TWorker, TQueue>::start()
    +
    918  {
    +
    919  try
    +
    920  {
    +
    921  configureThreadManager();
    +
    922  mThreadManager.start();
    +
    923  }
    +
    924  catch (const std::exception& e)
    +
    925  {
    +
    926  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    927  }
    +
    928  }
    +
    929 
    +
    930  template<typename TDatums, typename TWorker, typename TQueue>
    +
    931  void Wrapper<TDatums, TWorker, TQueue>::stop()
    +
    932  {
    +
    933  try
    +
    934  {
    +
    935  mThreadManager.stop();
    +
    936  }
    +
    937  catch (const std::exception& e)
    +
    938  {
    +
    939  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    940  }
    +
    941  }
    +
    942 
    +
    943  template<typename TDatums, typename TWorker, typename TQueue>
    +
    944  bool Wrapper<TDatums, TWorker, TQueue>::isRunning() const
    +
    945  {
    +
    946  try
    +
    947  {
    +
    948  return mThreadManager.isRunning();
    +
    949  }
    +
    950  catch (const std::exception& e)
    +
    951  {
    +
    952  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    953  return false;
    +
    954  }
    +
    955  }
    +
    956 
    +
    957  template<typename TDatums, typename TWorker, typename TQueue>
    +
    958  bool Wrapper<TDatums, TWorker, TQueue>::tryEmplace(std::shared_ptr<TDatums>& tDatums)
    +
    959  {
    +
    960  try
    +
    961  {
    +
    962  if (!mUserInputWs.empty())
    +
    963  error("Emplace cannot be called if an input worker was already selected.",
    +
    964  __LINE__, __FUNCTION__, __FILE__);
    +
    965  return mThreadManager.tryEmplace(tDatums);
    +
    966  }
    +
    967  catch (const std::exception& e)
    +
    968  {
    +
    969  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    970  return false;
    +
    971  }
    +
    972  }
    +
    973 
    +
    974  template<typename TDatums, typename TWorker, typename TQueue>
    +
    975  bool Wrapper<TDatums, TWorker, TQueue>::waitAndEmplace(std::shared_ptr<TDatums>& tDatums)
    +
    976  {
    +
    977  try
    +
    978  {
    +
    979  if (!mUserInputWs.empty())
    +
    980  error("Emplace cannot be called if an input worker was already selected.",
    +
    981  __LINE__, __FUNCTION__, __FILE__);
    +
    982  return mThreadManager.waitAndEmplace(tDatums);
    +
    983  }
    +
    984  catch (const std::exception& e)
    +
    985  {
    +
    986  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    987  return false;
    +
    988  }
    +
    989  }
    +
    990 
    +
    991  template<typename TDatums, typename TWorker, typename TQueue>
    +
    992  bool Wrapper<TDatums, TWorker, TQueue>::tryPush(const std::shared_ptr<TDatums>& tDatums)
    +
    993  {
    +
    994  try
    +
    995  {
    +
    996  if (!mUserInputWs.empty())
    +
    997  error("Push cannot be called if an input worker was already selected.",
    +
    998  __LINE__, __FUNCTION__, __FILE__);
    +
    999  return mThreadManager.tryPush(tDatums);
    +
    1000  }
    +
    1001  catch (const std::exception& e)
    +
    1002  {
    +
    1003  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1004  return false;
    +
    1005  }
    +
    1006  }
    +
    1007 
    +
    1008  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1009  bool Wrapper<TDatums, TWorker, TQueue>::waitAndPush(const std::shared_ptr<TDatums>& tDatums)
    +
    1010  {
    +
    1011  try
    +
    1012  {
    +
    1013  if (!mUserInputWs.empty())
    +
    1014  error("Push cannot be called if an input worker was already selected.",
    +
    1015  __LINE__, __FUNCTION__, __FILE__);
    +
    1016  return mThreadManager.waitAndPush(tDatums);
    +
    1017  }
    +
    1018  catch (const std::exception& e)
    +
    1019  {
    +
    1020  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1021  return false;
    +
    1022  }
    +
    1023  }
    +
    1024 
    +
    1025  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1026  bool Wrapper<TDatums, TWorker, TQueue>::tryPop(std::shared_ptr<TDatums>& tDatums)
    +
    1027  {
    +
    1028  try
    +
    1029  {
    +
    1030  if (!mUserOutputWs.empty())
    +
    1031  error("Pop cannot be called if an output worker was already selected.",
    +
    1032  __LINE__, __FUNCTION__, __FILE__);
    +
    1033  return mThreadManager.tryPop(tDatums);
    +
    1034  }
    +
    1035  catch (const std::exception& e)
    +
    1036  {
    +
    1037  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1038  return false;
    +
    1039  }
    +
    1040  }
    +
    1041 
    +
    1042  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1043  bool Wrapper<TDatums, TWorker, TQueue>::waitAndPop(std::shared_ptr<TDatums>& tDatums)
    +
    1044  {
    +
    1045  try
    +
    1046  {
    +
    1047  if (!mUserOutputWs.empty())
    +
    1048  error("Pop cannot be called if an output worker was already selected.",
    +
    1049  __LINE__, __FUNCTION__, __FILE__);
    +
    1050  return mThreadManager.waitAndPop(tDatums);
    +
    1051  }
    +
    1052  catch (const std::exception& e)
    +
    1053  {
    +
    1054  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1055  return false;
    +
    1056  }
    +
    1057  }
    +
    1058 
    +
    1059  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1060  void Wrapper<TDatums, TWorker, TQueue>::reset()
    +
    1061  {
    +
    1062  try
    +
    1063  {
    +
    1064  mThreadManager.reset();
    +
    1065  mThreadId = 0ull;
    +
    1066  // Reset
    +
    1067  mUserInputWs.clear();
    +
    1068  wDatumProducer = nullptr;
    +
    1069  spWCvMatToOpInput = nullptr;
    +
    1070  spWCvMatToOpOutput = nullptr;
    +
    1071  spWPoses.clear();
    +
    1072  mPostProcessingWs.clear();
    +
    1073  mUserPostProcessingWs.clear();
    +
    1074  mOutputWs.clear();
    +
    1075  spWGui = nullptr;
    +
    1076  mUserOutputWs.clear();
    +
    1077  }
    +
    1078  catch (const std::exception& e)
    +
    1079  {
    +
    1080  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1081  }
    +
    1082  }
    +
    1083 
    +
    1084  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1085  void Wrapper<TDatums, TWorker, TQueue>::configureThreadManager()
    +
    1086  {
    +
    1087  try
    +
    1088  {
    +
    1089  // The less number of queues -> the less lag
    +
    1090 
    +
    1091  // Security checks
    +
    1092  if (spWCvMatToOpInput == nullptr || spWCvMatToOpOutput == nullptr)
    +
    1093  error("Configure the Wrapper class before calling `start()`.", __LINE__, __FUNCTION__, __FILE__);
    +
    1094  if ((wDatumProducer == nullptr) == (mUserInputWs.empty())
    +
    1095  && mThreadManagerMode != ThreadManagerMode::Asynchronous
    +
    1096  && mThreadManagerMode != ThreadManagerMode::AsynchronousIn)
    +
    1097  {
    +
    1098  const auto message = "You need to have 1 and only 1 producer selected. You can introduce your own"
    +
    1099  " producer by using setWorkerInput() or use the OpenPose default producer by"
    +
    1100  " configuring it in the configure function) or use the"
    +
    1101  " ThreadManagerMode::Asynchronous(In) mode.";
    +
    1102  error(message, __LINE__, __FUNCTION__, __FILE__);
    +
    1103  }
    +
    1104  if (mOutputWs.empty() && mUserOutputWs.empty() && spWGui == nullptr
    +
    1105  && mThreadManagerMode != ThreadManagerMode::Asynchronous
    +
    1106  && mThreadManagerMode != ThreadManagerMode::AsynchronousOut)
    +
    1107  {
    +
    1108  error("No output selected.", __LINE__, __FUNCTION__, __FILE__);
    +
    1109  }
    +
    1110 
    +
    1111  // Thread Manager:
    +
    1112  // Clean previous thread manager (avoid configure to crash the program if used more than once)
    +
    1113  mThreadManager.reset();
    +
    1114  mThreadId = 0ull;
    +
    1115  auto queueIn = 0ull;
    +
    1116  auto queueOut = 1ull;
    +
    1117  // If custom user Worker and uses its own thread
    +
    1118  spWIdGenerator = std::make_shared<WIdGenerator<std::shared_ptr<TDatums>>>();
    +
    1119  if (!mUserInputWs.empty() && mUserInputWsOnNewThread)
    +
    1120  {
    +
    1121  // Thread 0, queues 0 -> 1
    +
    1122  mThreadManager.add(mThreadId, mUserInputWs, queueIn++, queueOut++);
    +
    1123  threadIdPP();
    +
    1124  // Thread 1, queues 1 -> 2
    +
    1125  mThreadManager.add(mThreadId, {spWIdGenerator, spWCvMatToOpInput, spWCvMatToOpOutput}, queueIn++,
    +
    1126  queueOut++);
    +
    1127  }
    +
    1128  // If custom user Worker in same thread or producer on same thread
    +
    1129  else
    +
    1130  {
    +
    1131  std::vector<TWorker> workersAux;
    +
    1132  // Custom user Worker
    +
    1133  if (!mUserInputWs.empty())
    +
    1134  workersAux = mergeWorkers(workersAux, mUserInputWs);
    +
    1135  // OpenPose producer
    +
    1136  else if (wDatumProducer != nullptr)
    +
    1137  workersAux = mergeWorkers(workersAux, {wDatumProducer});
    +
    1138  // Otherwise
    +
    1139  else if (mThreadManagerMode != ThreadManagerMode::Asynchronous
    +
    1140  && mThreadManagerMode != ThreadManagerMode::AsynchronousIn)
    +
    1141  error("No input selected.", __LINE__, __FUNCTION__, __FILE__);
    +
    1142 
    +
    1143  workersAux = mergeWorkers(workersAux, {spWIdGenerator, spWCvMatToOpInput, spWCvMatToOpOutput});
    +
    1144  // Thread 0 or 1, queues 0 -> 1
    +
    1145  mThreadManager.add(mThreadId, workersAux, queueIn++, queueOut++);
    +
    1146  }
    +
    1147  threadIdPP();
    +
    1148  // Pose estimation & rendering
    +
    1149  // Thread 1 or 2...X, queues 1 -> 2, X = 2 + #GPUs
    +
    1150  if (!spWPoses.empty())
    +
    1151  {
    +
    1152  if (mMultiThreadEnabled)
    +
    1153  {
    +
    1154  for (auto& wPose : spWPoses)
    +
    1155  {
    +
    1156  mThreadManager.add(mThreadId, wPose, queueIn, queueOut);
    +
    1157  threadIdPP();
    +
    1158  }
    +
    1159  }
    +
    1160  else
    +
    1161  {
    +
    1162  log("Multi-threading disabled, only 1 thread running. All GPUs have been disabled but the first"
    +
    1163  " one, which is defined by gpuNumberStart (in the demo, it is set with the `num_gpu_start`"
    +
    1164  " flag.");
    +
    1165  mThreadManager.add(mThreadId, spWPoses.at(0), queueIn, queueOut);
    +
    1166  }
    +
    1167  queueIn++;
    +
    1168  queueOut++;
    +
    1169  }
    +
    1170  // If custom user Worker and uses its own thread
    +
    1171  if (!mUserPostProcessingWs.empty() && mUserPostProcessingWsOnNewThread)
    +
    1172  {
    +
    1173  // Post processing workers
    +
    1174  if (!mPostProcessingWs.empty())
    +
    1175  {
    +
    1176  // Thread 2 or 3, queues 2 -> 3
    +
    1177  mThreadManager.add(mThreadId, mPostProcessingWs, queueIn++, queueOut++);
    +
    1178  threadIdPP();
    +
    1179  }
    +
    1180  // User processing workers
    +
    1181  // Thread 3 or 4, queues 3 -> 4
    +
    1182  mThreadManager.add(mThreadId, mUserPostProcessingWs, queueIn++, queueOut++);
    +
    1183  threadIdPP();
    +
    1184  // Output workers
    +
    1185  if (!mOutputWs.empty())
    +
    1186  {
    +
    1187  // Thread 4 or 5, queues 4 -> 5
    +
    1188  mThreadManager.add(mThreadId, mOutputWs, queueIn++, queueOut++);
    +
    1189  threadIdPP();
    +
    1190  }
    +
    1191  }
    +
    1192  // If custom user Worker in same thread or producer on same thread
    +
    1193  else
    +
    1194  {
    +
    1195  // Post processing workers + User post processing workers + Output workers
    +
    1196  auto workersAux = mergeWorkers(mPostProcessingWs, mUserPostProcessingWs);
    +
    1197  workersAux = mergeWorkers(workersAux, mOutputWs);
    +
    1198  if (!workersAux.empty())
    +
    1199  {
    +
    1200  // Thread 2 or 3, queues 2 -> 3
    +
    1201  mThreadManager.add(mThreadId, workersAux, queueIn++, queueOut++);
    +
    1202  threadIdPP();
    +
    1203  }
    +
    1204  }
    +
    1205  // User output worker
    +
    1206  // Thread Y, queues Q -> Q+1
    +
    1207  if (!mUserOutputWs.empty())
    +
    1208  {
    +
    1209  if (mUserOutputWsOnNewThread)
    +
    1210  {
    +
    1211  mThreadManager.add(mThreadId, mUserOutputWs, queueIn++, queueOut++);
    +
    1212  threadIdPP();
    +
    1213  }
    +
    1214  else
    +
    1215  mThreadManager.add(mThreadId-1, mUserOutputWs, queueIn++, queueOut++);
    +
    1216  }
    +
    1217  // OpenPose GUI
    +
    1218  if (spWGui != nullptr)
    +
    1219  {
    +
    1220  // Thread Y+1, queues Q+1 -> Q+2
    +
    1221  mThreadManager.add(mThreadId, spWGui, queueIn++, queueOut++);
    +
    1222  threadIdPP();
    +
    1223  }
    +
    1224  log("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
    +
    1225  }
    +
    1226  catch (const std::exception& e)
    +
    1227  {
    +
    1228  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1229  }
    +
    1230  }
    +
    1231 
    +
    1232  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1233  unsigned long long Wrapper<TDatums, TWorker, TQueue>::threadIdPP()
    +
    1234  {
    +
    1235  try
    +
    1236  {
    +
    1237  if (mMultiThreadEnabled)
    +
    1238  mThreadId++;
    +
    1239  return mThreadId;
    +
    1240  }
    +
    1241  catch (const std::exception& e)
    +
    1242  {
    +
    1243  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1244  return 0ull;
    +
    1245  }
    +
    1246  }
    +
    1247 
    +
    1248  template<typename TDatums, typename TWorker, typename TQueue>
    +
    1249  std::vector<TWorker> Wrapper<TDatums, TWorker, TQueue>::mergeWorkers(const std::vector<TWorker>& workersA,
    +
    1250  const std::vector<TWorker>& workersB)
    +
    1251  {
    +
    1252  try
    +
    1253  {
    +
    1254  auto workersToReturn(workersA);
    +
    1255  for (auto& worker : workersB)
    +
    1256  workersToReturn.emplace_back(worker);
    +
    1257  return workersToReturn;
    +
    1258  }
    +
    1259  catch (const std::exception& e)
    +
    1260  {
    +
    1261  error(e.what(), __LINE__, __FUNCTION__, __FILE__);
    +
    1262  return std::vector<TWorker>{};
    +
    1263  }
    +
    1264  }
    +
    1265 
    +
    1266  extern template class Wrapper<DATUM_BASE_NO_PTR>;
    +
    1267 }
    +
    1268 
    +
    1269 #endif // OPENPOSE_WRAPPER_WRAPPER_HPP
    PoseModel poseModel
    Definition: wrapperStructPose.hpp:76
    Point< int > netInputSize
    Definition: wrapperStructPose.hpp:23
    @@ -1249,7 +1250,7 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    std::vector< HeatMapType > heatMapTypes
    Definition: wrapperStructPose.hpp:112
    std::string writeHeatMapsFormat
    Definition: wrapperStructOutput.hpp:89
    Definition: wPoseSaver.hpp:12
    -
    bool tryPush(const std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:991
    +
    bool tryPush(const std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:992
    Definition: wrapperStructPose.hpp:16
    std::string writeKeypoint
    Definition: wrapperStructOutput.hpp:36
    float alphaKeypoint
    Definition: wrapperStructFace.hpp:39
    @@ -1257,10 +1258,10 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    bool frameFlip
    Definition: wrapperStructInput.hpp:41
    Definition: wFaceSaver.hpp:12
    T y
    Definition: point.hpp:12
    -
    void stop()
    Definition: wrapper.hpp:930
    +
    void stop()
    Definition: wrapper.hpp:931
    float alphaKeypoint
    Definition: wrapperStructHand.hpp:59
    -
    bool tryPop(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:1025
    -
    void exec()
    Definition: wrapper.hpp:902
    +
    bool tryPop(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:1026
    +
    void exec()
    Definition: wrapper.hpp:903
    @@ -1291,9 +1292,9 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    float scaleGap
    Definition: wrapperStructPose.hpp:63
    RenderMode renderMode
    Definition: wrapperStructPose.hpp:69
    -
    bool waitAndEmplace(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:974
    +
    bool waitAndEmplace(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:975
    Definition: wrapper.hpp:32
    -
    bool tryEmplace(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:957
    +
    bool tryEmplace(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:958
    float scaleRange
    Definition: wrapperStructHand.hpp:40
    int gpuNumberStart
    Definition: wrapperStructPose.hpp:50
    RenderMode renderMode
    Definition: wrapperStructFace.hpp:33
    @@ -1303,8 +1304,8 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    Definition: wVideoSaver.hpp:11
    Definition: wOpOutputToCvMat.hpp:11
    -
    bool waitAndPush(const std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:1008
    -
    void start()
    Definition: wrapper.hpp:916
    +
    bool waitAndPush(const std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:1009
    +
    void start()
    Definition: wrapper.hpp:917
    bool realTimeProcessing
    Definition: wrapperStructInput.hpp:36
    OP_API std::string formatAsDirectory(const std::string &directoryPathString)
    @@ -1320,7 +1321,7 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    Definition: wFaceRenderer.hpp:11
    -
    bool waitAndPop(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:1042
    +
    bool waitAndPop(std::shared_ptr< TDatums > &tDatums)
    Definition: wrapper.hpp:1043
    std::shared_ptr< Producer > producerSharedPtr
    Definition: wrapperStructInput.hpp:19
    Definition: threadManager.hpp:16
    Definition: wPoseRenderer.hpp:11
    @@ -1354,7 +1355,7 @@ $(document).ready(function(){initNavTree('wrapper_8hpp_source.html','');});
    ThreadManagerMode
    Definition: enumClasses.hpp:9
    int intRound(const T a)
    Definition: fastMath.hpp:24
    int gpuNumber
    Definition: wrapperStructPose.hpp:44
    -
    bool isRunning() const
    Definition: wrapper.hpp:943
    +
    bool isRunning() const
    Definition: wrapper.hpp:944
    T x
    Definition: point.hpp:11
    void setWorkerInput(const TWorker &worker, const bool workerOnNewThread=true)
    Definition: wrapper.hpp:329
    float renderThreshold
    Definition: wrapperStructFace.hpp:52