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

Method work

include/openpose/face/wFaceExtractorNet.hpp:55–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54 template<typename TDatums>
55 void WFaceExtractorNet<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 face
66 for (auto& tDatumPtr : *tDatums)
67 {
68 spFaceExtractorNet->forwardPass(tDatumPtr->faceRectangles, tDatumPtr->cvInputData);
69 tDatumPtr->faceHeatMaps = spFaceExtractorNet->getHeatMaps().clone();
70 tDatumPtr->faceKeypoints = spFaceExtractorNet->getFaceKeypoints().clone();
71 }
72 // Profiling speed
73 Profiler::timerEnd(profilerKey);
74 Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__);
75 // Debugging log
76 opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__);
77 }
78 }
79 catch (const std::exception& e)
80 {
81 this->stop();
82 tDatums = nullptr;
83 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
84 }
85 }
86
87 COMPILE_TEMPLATE_DATUM(WFaceExtractorNet);
88}

Callers

nothing calls this directly

Calls 9

checkNoNullNorEmptyFunction · 0.85
opLogIfDebugFunction · 0.85
getFaceKeypointsMethod · 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