From abd9036f024a77d22b47a108bc88b27b9732e3c5 Mon Sep 17 00:00:00 2001 From: zhangjixing <775834166@qq.com> Date: 星期二, 15 一月 2019 17:27:27 +0800 Subject: [PATCH] --- QiaoJiaSystem/YoloServer/YoloDetectServerI.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/QiaoJiaSystem/YoloServer/YoloDetectServerI.cpp b/QiaoJiaSystem/YoloServer/YoloDetectServerI.cpp index cb0e612..a806136 100644 --- a/QiaoJiaSystem/YoloServer/YoloDetectServerI.cpp +++ b/QiaoJiaSystem/YoloServer/YoloDetectServerI.cpp @@ -35,6 +35,9 @@ //printf("Predicted in %f seconds.\n", what_time_is_it_now()-attime); int nboxes = 0; detection *dets = get_network_boxes(m_net, im.w, im.h, m_thresh, m_hier_thresh, 0, 1, &nboxes); + if (nboxes > 30) { + return objInfos; + } if (m_nms) do_nms_sort(dets, nboxes, l.classes, m_nms); // draw_detections(im, dets, nboxes, m_thresh, names, alphabet, l.classes); for (int i = 0; i < nboxes; i++) { -- Gitblit v1.8.0