From c7b10ceadb1a78e7480d281444a31ae2a7dc1b05 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 06 May 2016 23:25:16 +0000
Subject: [PATCH] so much need to commit
---
src/image.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/image.c b/src/image.c
index ef76d45..aff5f64 100644
--- a/src/image.c
+++ b/src/image.c
@@ -110,6 +110,7 @@
float prob = probs[i][class];
if(prob > thresh){
int width = pow(prob, 1./2.)*10+1;
+ width = 8;
printf("%s: %.2f\n", names[class], prob);
int offset = class*17 % classes;
float red = get_color(0,offset,classes);
@@ -511,6 +512,7 @@
w = (w * min) / h;
h = min;
}
+ if(w == im.w && h == im.h) return im;
image resized = resize_image(im, w, h);
return resized;
}
@@ -523,13 +525,7 @@
int dy = rand_int(0, resized.h - size);
image crop = crop_image(resized, dx, dy, size, size);
- /*
- show_image(im, "orig");
- show_image(crop, "cropped");
- cvWaitKey(0);
- */
-
- free_image(resized);
+ if(resized.data != im.data) free_image(resized);
return crop;
}
--
Gitblit v1.10.0