From bc20fd851c07eab5277059d90ef1b9d22005e341 Mon Sep 17 00:00:00 2001 From: Ivan Pusic Date: Sun, 4 Mar 2018 21:14:53 +0100 Subject: [PATCH] FIX bounding box not showing up in predictions.png If the image size is small (in my case 96px), bounding boxes won't render because `im.h * .006` is < 0, therefore loop in `draw_box_width` won't activate --- src/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index ac1b6296..fb674e83 100644 --- a/src/image.c +++ b/src/image.c @@ -255,7 +255,7 @@ void draw_detections(image im, int num, float thresh, box *boxes, float **probs, } } if(class >= 0){ - int width = im.h * .006; + int width = fmax(1, im.h * .006); /* if(0){