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& tDatumPtr : *tDatums)
75 spPoseExtractorNet->forwardPass(
76 tDatumPtr->inputNetData,
Point<int>{tDatumPtr->cvInputData.cols(), tDatumPtr->cvInputData.rows()},
77 tDatumPtr->scaleInputToNetInputs, tDatumPtr->poseNetOutput);
78 tDatumPtr->poseCandidates = spPoseExtractorNet->getCandidatesCopy();
79 tDatumPtr->poseHeatMaps = spPoseExtractorNet->getHeatMapsCopy();
80 tDatumPtr->poseKeypoints = spPoseExtractorNet->getPoseKeypoints().clone();
81 tDatumPtr->poseScores = spPoseExtractorNet->getPoseScores().clone();
82 tDatumPtr->scaleNetToOutput = spPoseExtractorNet->getScaleNetToOutput();
91 catch (
const std::exception& e)
95 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
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 const std::string timerInit(const int line, const std::string &function, const std::string &file)
static void timerEnd(const std::string &key)
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void opLogIfDebug(const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")