From d3bdf7cfdfd695f3e4aadac92e6721c340047dd4 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 12 Apr 2018 10:33:51 +0000
Subject: [PATCH] Fixed compile with DEBUG=1

---
 Makefile       |    4 +++-
 src/detector.c |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 9db41a8..d71e2bd 100644
--- a/Makefile
+++ b/Makefile
@@ -44,10 +44,12 @@
 OPTS=-Ofast
 LDFLAGS= -lm -pthread 
 COMMON= 
-CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -ffp-contract=fast -mavx
+CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas
 
 ifeq ($(DEBUG), 1) 
 OPTS=-O0 -g
+else
+OPTS=-ffp-contract=fast -mavx
 endif
 
 CFLAGS+=$(OPTS)
diff --git a/src/detector.c b/src/detector.c
index 6d7689e..06709c1 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -606,6 +606,7 @@
 			int letterbox = (args.type == LETTERBOX_DATA);
 			float hier_thresh = 0;
 			detection *dets = get_network_boxes(&net, 1, 1, thresh, hier_thresh, 0, 0, &nboxes, letterbox);
+			//detection *dets = get_network_boxes(&net, val[t].w, val[t].h, thresh, hier_thresh, 0, 1, &nboxes, letterbox); // for letterbox=1
 			if (nms) do_nms_sort_v3(dets, nboxes, l.classes, nms);
 
 			char labelpath[4096];

--
Gitblit v1.10.0