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
This commit is contained in:
Ivan Pusic 2018-03-04 21:14:53 +01:00 committed by GitHub
parent 80d9bec20f
commit bc20fd851c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,7 @@ void draw_detections(image im, int num, float thresh, box *boxes, float **probs,
} }
} }
if(class >= 0){ if(class >= 0){
int width = im.h * .006; int width = fmax(1, im.h * .006);
/* /*
if(0){ if(0){