1 #ifndef OPENPOSE_POSE_W_POSE_EXTRACTOR_NET_HPP
2 #define OPENPOSE_POSE_W_POSE_EXTRACTOR_NET_HPP
10 template<
typename TDatums>
14 explicit WPoseExtractorNet(
const std::shared_ptr<PoseExtractorNet>& poseExtractorSharedPtr);
18 void work(TDatums& tDatums);
21 std::shared_ptr<PoseExtractorNet> spPoseExtractorNet;
35 template<
typename TDatums>
37 spPoseExtractorNet{poseExtractorSharedPtr}
41 template<
typename TDatums>
46 spPoseExtractorNet->initializationOnThread();
48 catch (
const std::exception& e)
50 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
54 template<
typename TDatums>
66 for (
auto& tDatum : *tDatums)
68 spPoseExtractorNet->forwardPass(tDatum.inputNetData,
69 Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows},
70 tDatum.scaleInputToNetInputs);
71 tDatum.poseCandidates = spPoseExtractorNet->getCandidatesCopy();
72 tDatum.poseHeatMaps = spPoseExtractorNet->getHeatMapsCopy();
73 tDatum.poseKeypoints = spPoseExtractorNet->getPoseKeypoints().clone();
74 tDatum.poseScores = spPoseExtractorNet->getPoseScores().clone();
75 tDatum.scaleNetToOutput = spPoseExtractorNet->getScaleNetToOutput();
84 catch (
const std::exception& e)
88 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
95 #endif // OPENPOSE_POSE_W_POSE_EXTRACTOR_NET_HPP
#define COMPILE_TEMPLATE_DATUM(templateName)
Definition: datum.hpp:390
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)