| 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 | } |
nothing calls this directly
no test coverage detected