MCPcopy Create free account
hub / github.com/FeiYull/TensorRT-Alpha / task

Function task

libfacedetection/app_libfacedetction.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void task(LibFaceDet& face_det, const utils::InitParameter& param, std::vector<cv::Mat>& imgsBatch, const int& delayTime, const int& batchi,
24 const bool& isShow, const bool& isSave)
25{
26 face_det.copy(imgsBatch);
27 utils::DeviceTimer d_t1; face_det.preprocess(imgsBatch); float t1 = d_t1.getUsedTime();
28 utils::DeviceTimer d_t2; face_det.infer(); float t2 = d_t2.getUsedTime();
29 utils::DeviceTimer d_t3; face_det.postprocess(imgsBatch); float t3 = d_t3.getUsedTime();
30 sample::gLogInfo << "preprocess time = " << t1 / param.batch_size << "; "
31 "infer time = " << t2 / param.batch_size << "; "
32 "postprocess time = " << t3 / param.batch_size << std::endl;
33 if(isShow)
34 utils::show(face_det.getObjectss(), param.class_names, delayTime, imgsBatch);
35 if(isSave)
36 utils::save(face_det.getObjectss(), param.class_names, param.save_path, imgsBatch, param.batch_size, batchi);
37 face_det.reset();
38}
39
40int main(int argc, char** argv)
41{

Callers 1

mainFunction · 0.70

Calls 7

getUsedTimeMethod · 0.80
copyMethod · 0.45
preprocessMethod · 0.45
inferMethod · 0.45
postprocessMethod · 0.45
getObjectssMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected