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);
20 void work(TDatums& tDatums);
23 std::shared_ptr<PoseExtractorNet> spPoseExtractorNet;
37 template<
typename TDatums>
39 spPoseExtractorNet{poseExtractorSharedPtr}
43 template<
typename TDatums>
48 template<
typename TDatums>
53 spPoseExtractorNet->initializationOnThread();
55 catch (
const std::exception& e)
57 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
61 template<
typename TDatums>
73 for (
auto& tDatum : *tDatums)
75 spPoseExtractorNet->forwardPass(tDatum.inputNetData,
76 Point<int>{tDatum.cvInputData.cols, tDatum.cvInputData.rows},
77 tDatum.scaleInputToNetInputs);
78 tDatum.poseCandidates = spPoseExtractorNet->getCandidatesCopy();
79 tDatum.poseHeatMaps = spPoseExtractorNet->getHeatMapsCopy();
80 tDatum.poseKeypoints = spPoseExtractorNet->getPoseKeypoints().clone();
81 tDatum.poseScores = spPoseExtractorNet->getPoseScores().clone();
82 tDatum.scaleNetToOutput = spPoseExtractorNet->getScaleNetToOutput();
91 catch (
const std::exception& e)
95 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
102 #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)