diff --git a/deploy/cpp/src/main_keypoint.cc b/deploy/cpp/src/main_keypoint.cc index 7c711211711c3f117af5851d489d44364df981df..facd787ddc6b99124af92e36a63434f94d665033 100644 --- a/deploy/cpp/src/main_keypoint.cc +++ b/deploy/cpp/src/main_keypoint.cc @@ -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); } diff --git a/deploy/lite/src/main.cc b/deploy/lite/src/main.cc index cf0651091ebc7fea1251d0b53600f8de16815d87..0e67b78ccc8c5eddc8edbeb32d976af16cd5e9f1 100644 --- a/deploy/lite/src/main.cc +++ b/deploy/lite/src/main.cc @@ -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 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, + PrintTotalIimeLog((det_t[0] + det_t[1] + det_t[2]) / all_img_paths.size(), + (keypoint_t[0] + keypoint_t[1] + keypoint_t[2]) / all_img_paths.size(), midtimecost / all_img_paths.size()); + } + } int main(int argc, char** argv) {