From 6b828f184e73ea3629d8dc846e11c5a640b19360 Mon Sep 17 00:00:00 2001 From: Gabriel Bianconi Date: Sun, 31 Mar 2019 08:06:49 -0400 Subject: [PATCH] Fix None bug in detect.py (#177) --- detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect.py b/detect.py index 36e2138e..a308cd20 100644 --- a/detect.py +++ b/detect.py @@ -62,7 +62,7 @@ def detect( pred = model(img) detections = non_max_suppression(pred, conf_thres, nms_thres)[0] - if len(detections) > 0: + if detections is not None and len(detections) > 0: # Rescale boxes from 416 to true image size scale_coords(img_size, detections[:, :4], im0.shape).round()