From f0abcfa02b2094396f955c743f7f11fcdb2e3d13 Mon Sep 17 00:00:00 2001
From: IlyaOvodov <b@ovdv.ru>
Date: Mon, 04 Jun 2018 15:57:15 +0000
Subject: [PATCH] Merge branch 'master' of https://github.com/AlexeyAB/darknet into Fix_get_color_depth

---
 src/yolo_v2_class.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/yolo_v2_class.cpp b/src/yolo_v2_class.cpp
index be1b4ee..faaf8d1 100644
--- a/src/yolo_v2_class.cpp
+++ b/src/yolo_v2_class.cpp
@@ -69,6 +69,7 @@
 	}
 	set_batch_network(&net, 1);
 	net.gpu_index = cur_gpu_id;
+	fuse_conv_batchnorm(net);
 
 	layer l = net.layers[net.n - 1];
 	int j;
@@ -118,6 +119,10 @@
 	detector_gpu_t &detector_gpu = *static_cast<detector_gpu_t *>(detector_gpu_ptr.get());
 	return detector_gpu.net.h;
 }
+YOLODLL_API int Detector::get_net_color_depth() const {
+	detector_gpu_t &detector_gpu = *static_cast<detector_gpu_t *>(detector_gpu_ptr.get());
+	return detector_gpu.net.c;
+}
 
 
 YOLODLL_API std::vector<bbox_t> Detector::detect(std::string image_filename, float thresh, bool use_mean)
@@ -221,7 +226,7 @@
 	int letterbox = 0;
 	float hier_thresh = 0.5;
 	detection *dets = get_network_boxes(&net, im.w, im.h, thresh, hier_thresh, 0, 1, &nboxes, letterbox);
-	if (nms) do_nms_sort_v3(dets, nboxes, l.classes, nms);
+	if (nms) do_nms_sort(dets, nboxes, l.classes, nms);
 
 	std::vector<bbox_t> bbox_vec;
 

--
Gitblit v1.10.0