Commit f1a4b94b by Siju Committed by Tianqi Chen

[YOLO]Add the probability to the image (#1910)

parent a6f32bff
...@@ -160,7 +160,7 @@ def draw_detections(im, dets, thresh, names, classes): ...@@ -160,7 +160,7 @@ def draw_detections(im, dets, thresh, names, classes):
if det['prob'][j] > thresh: if det['prob'][j] > thresh:
if category == -1: if category == -1:
category = j category = j
labelstr.append(names[j]) labelstr.append(names[j] + " " + str(round(det['prob'][j], 4)))
if category > -1: if category > -1:
imc, imh, imw = im.shape imc, imh, imw = im.shape
width = int(imh * 0.006) width = int(imh * 0.006)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment