From 1e512b23089b23e91fa5ed6a617641d9286d1417 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Mon, 04 Jun 2018 19:11:05 +0000
Subject: [PATCH] Letter box is disabled in the darknet.py by defualt

---
 src/network.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/network.c b/src/network.c
index 6e50d54..1498a2a 100644
--- a/src/network.c
+++ b/src/network.c
@@ -582,7 +582,7 @@
 	box *boxes = calloc(l.w*l.h*l.n, sizeof(box));
 	float **probs = calloc(l.w*l.h*l.n, sizeof(float *));
 	int i, j;
-	for (j = 0; j < l.w*l.h*l.n; ++j) probs[j] = calloc(l.classes, sizeof(float *));
+	for (j = 0; j < l.w*l.h*l.n; ++j) probs[j] = calloc(l.classes, sizeof(float));
 	get_region_boxes(l, 1, 1, thresh, probs, boxes, 0, map);
 	for (j = 0; j < l.w*l.h*l.n; ++j) {
 		dets[j].classes = l.classes;
@@ -640,7 +640,8 @@
 
 float *network_predict_image(network *net, image im)
 {
-	image imr = letterbox_image(im, net->w, net->h);
+	//image imr = letterbox_image(im, net->w, net->h);
+	image imr = resize_image(im, net->w, net->h);
 	set_batch_network(net, 1);
 	float *p = network_predict(*net, imr.data);
 	free_image(imr);

--
Gitblit v1.10.0