未验证 提交 bc437a49 编写于 作者: Z zhiboniu 提交者: GitHub

infer deploy:fix trt keypointbatchsize; lite deploy: update total pipeline...

infer deploy:fix trt keypointbatchsize; lite deploy: update total pipeline time from per person to per image (#4339)
上级 34654225
......@@ -445,7 +445,7 @@ int main(int argc, char** argv) {
if (!FLAGS_model_dir_keypoint.empty())
{
keypoint = new PaddleDetection::KeyPointDetector(FLAGS_model_dir_keypoint, FLAGS_device, FLAGS_use_mkldnn,
FLAGS_cpu_threads, FLAGS_run_mode, FLAGS_batch_size,FLAGS_gpu_id,
FLAGS_cpu_threads, FLAGS_run_mode, FLAGS_batch_size_keypoint, FLAGS_gpu_id,
FLAGS_trt_min_shape, FLAGS_trt_max_shape, FLAGS_trt_opt_shape,
FLAGS_trt_calib_mode, FLAGS_use_dark);
}
......
......@@ -76,11 +76,11 @@ void PrintTotalIimeLog(double det_time,
double crop_time) {
std::cout << "----------------------- Time info ------------------------"
<< std::endl;
std::cout << "Total Pipeline time(ms): "
std::cout << "Total Pipeline time(ms) per image: "
<< det_time + keypoint_time + crop_time << std::endl;
std::cout << "average det time(ms): " << det_time
<< ", average keypoint time(ms): " << keypoint_time
<< ", average crop time(ms): " << crop_time << std::endl;
std::cout << "Average det time(ms) per image: " << det_time
<< ", average keypoint time(ms) per image: " << keypoint_time
<< ", average crop time(ms) per image: " << crop_time << std::endl;
}
static std::string DirName(const std::string& filepath) {
......@@ -287,10 +287,11 @@ void PredictImage(const std::vector<std::string> all_img_paths,
PrintBenchmarkLog(det_t, all_img_paths.size());
if (keypoint) {
PrintBenchmarkLog(keypoint_t, kpts_imgs);
}
PrintTotalIimeLog((det_t[0] + det_t[1] + det_t[2]) / all_img_paths.size(),
(keypoint_t[0] + keypoint_t[1] + keypoint_t[2]) / kpts_imgs,
(keypoint_t[0] + keypoint_t[1] + keypoint_t[2]) / all_img_paths.size(),
midtimecost / all_img_paths.size());
}
}
int main(int argc, char** argv) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册