MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / work

Method work

include/openpose/hand/wHandExtractorNet.hpp:55–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54 template<typename TDatums>
55 void WHandExtractorNet<TDatums>::work(TDatums& tDatums)
56 {
57 try
58 {
59 if (checkNoNullNorEmpty(tDatums))
60 {
61 // Debugging log
62 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
63 // Profiling speed
64 const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__);
65 // Extract people hands
66 for (auto& tDatumPtr : *tDatums)
67 {
68 spHandExtractorNet->forwardPass(tDatumPtr->handRectangles, tDatumPtr->cvInputData);
69 for (auto hand = 0 ; hand < 2 ; hand++)
70 {
71 tDatumPtr->handHeatMaps[hand] = spHandExtractorNet->getHeatMaps()[hand].clone();
72 tDatumPtr->handKeypoints[hand] = spHandExtractorNet->getHandKeypoints()[hand].clone();
73 }
74 }
75 // Profiling speed
76 Profiler::timerEnd(profilerKey);
77 Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__);
78 // Debugging log
79 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
80 }
81 }
82 catch (const std::exception& e)
83 {
84 this->stop();
85 tDatums = nullptr;
86 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
87 }
88 }
89
90 COMPILE_TEMPLATE_DATUM(WHandExtractorNet);
91}

Callers

nothing calls this directly

Calls 9

checkNoNullNorEmptyFunction · 0.85
opLogIfDebugFunction · 0.85
getHandKeypointsMethod · 0.80
whatMethod · 0.80
errorFunction · 0.50
forwardPassMethod · 0.45
cloneMethod · 0.45
getHeatMapsMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected