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

Function task

efficientdet/app_efficientdet.cpp:35–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void task(EfficientDet& efficient_det, const utils::InitParameter& param, std::vector<cv::Mat>& imgsBatch, const int& delayTime, const int& batchi,
36 const bool& isShow, const bool& isSave)
37{
38 efficient_det.copy(imgsBatch);
39 utils::DeviceTimer d_t1; efficient_det.preprocess(imgsBatch); float t1 = d_t1.getUsedTime();
40 utils::DeviceTimer d_t2; efficient_det.infer(); float t2 = d_t2.getUsedTime();
41 utils::DeviceTimer d_t3; efficient_det.postprocess(imgsBatch); float t3 = d_t3.getUsedTime();
42 sample::gLogInfo << "preprocess time = " << t1 / param.batch_size << "; "
43 "infer time = " << t2 / param.batch_size << "; "
44 "postprocess time = " << t3 / param.batch_size << std::endl;
45 if(isShow)
46 utils::show(efficient_det.getObjectss(), param.class_names, delayTime, imgsBatch);
47 if(isSave)
48 utils::save(efficient_det.getObjectss(), param.class_names, param.save_path, imgsBatch, param.batch_size, batchi);
49 efficient_det.reset();
50}
51
52int main(int argc, char** argv)
53{

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