| 60 | |
| 61 | template<typename TDatums> |
| 62 | void WPoseRenderer<TDatums>::work(TDatums& tDatums) |
| 63 | { |
| 64 | try |
| 65 | { |
| 66 | if (checkNoNullNorEmpty(tDatums)) |
| 67 | { |
| 68 | // Debugging log |
| 69 | opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 70 | // Profiling speed |
| 71 | const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__); |
| 72 | // Render people pose |
| 73 | for (auto& tDatumPtr : *tDatums) |
| 74 | tDatumPtr->elementRendered = spPoseRenderer->renderPose( |
| 75 | tDatumPtr->outputData, tDatumPtr->poseKeypoints, (float)tDatumPtr->scaleInputToOutput, |
| 76 | (float)tDatumPtr->scaleNetToOutput); |
| 77 | // Profiling speed |
| 78 | Profiler::timerEnd(profilerKey); |
| 79 | Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__); |
| 80 | // Debugging log |
| 81 | opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 82 | } |
| 83 | } |
| 84 | catch (const std::exception& e) |
| 85 | { |
| 86 | this->stop(); |
| 87 | tDatums = nullptr; |
| 88 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | COMPILE_TEMPLATE_DATUM(WPoseRenderer); |
| 93 | } |
nothing calls this directly
no test coverage detected