1 #ifndef OPENPOSE_POSE_W_POSE_EXTRACTOR_HPP
2 #define OPENPOSE_POSE_W_POSE_EXTRACTOR_HPP
10 template<
typename TDatums>
14 explicit WPoseExtractor(
const std::shared_ptr<PoseExtractor>& poseExtractorSharedPtr);
18 void work(TDatums& tDatums);
21 std::shared_ptr<PoseExtractor> spPoseExtractor;
35 template<
typename TDatums>
37 spPoseExtractor{poseExtractorSharedPtr}
41 template<
typename TDatums>
44 spPoseExtractor->initializationOnThread();
47 template<
typename TDatums>
59 for (
auto& tDatum : *tDatums)
61 spPoseExtractor->forwardPass(tDatum.inputNetData,
62 Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows},
63 tDatum.scaleInputToNetInputs);
64 tDatum.poseCandidates = spPoseExtractor->getCandidatesCopy();
65 tDatum.poseHeatMaps = spPoseExtractor->getHeatMapsCopy();
66 tDatum.poseKeypoints = spPoseExtractor->getPoseKeypoints().clone();
67 tDatum.poseScores = spPoseExtractor->getPoseScores().clone();
68 tDatum.scaleNetToOutput = spPoseExtractor->getScaleNetToOutput();
77 catch (
const std::exception& e)
81 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
88 #endif // OPENPOSE_POSE_W_POSE_EXTRACTOR_HPP
#define COMPILE_TEMPLATE_DATUM(templateName)
Definition: datum.hpp:356
static const std::string timerInit(const int line, const std::string &function, const std::string &file)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void dLog(const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")
Definition: errorAndLog.hpp:53
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
Definition: pointerContainer.hpp:7
static void printAveragedTimeMsOnIterationX(const std::string &key, const int line, const std::string &function, const std::string &file, const unsigned long long x=DEFAULT_X)
static void timerEnd(const std::string &key)