fix postprocess config

triplemu/cpp-refine
triplemu 6 months ago
parent c4378eafeb
commit edcaf04a5c
  1. 9
      csrc/detect/normal/main.cpp

@ -76,6 +76,11 @@ int main(int argc, char** argv)
cv::Mat res, image;
cv::Size size = cv::Size{640, 640};
int num_labels = 80;
int topk = 100;
float score_thres = 0.25f;
float iou_thres = 0.65f;
std::vector<Object> objs;
cv::namedWindow("result", cv::WINDOW_AUTOSIZE);
@ -93,7 +98,7 @@ int main(int argc, char** argv)
auto start = std::chrono::system_clock::now();
yolov8->infer();
auto end = std::chrono::system_clock::now();
yolov8->postprocess(objs);
yolov8->postprocess(objs, score_thres, iou_thres, topk, num_labels);
yolov8->draw_objects(image, res, objs, CLASS_NAMES, COLORS);
auto tc = (double)std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() / 1000.;
printf("cost %2.4lf ms\n", tc);
@ -111,7 +116,7 @@ int main(int argc, char** argv)
auto start = std::chrono::system_clock::now();
yolov8->infer();
auto end = std::chrono::system_clock::now();
yolov8->postprocess(objs);
yolov8->postprocess(objs, score_thres, iou_thres, topk, num_labels);
yolov8->draw_objects(image, res, objs, CLASS_NAMES, COLORS);
auto tc = (double)std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() / 1000.;
printf("cost %2.4lf ms\n", tc);

Loading…
Cancel
Save