提交 1930a235 编写于 作者: _白鹭先生_'s avatar _白鹭先生_

修改显示

上级 a4aed57f
......@@ -148,9 +148,9 @@ class EvalCallback():
top_label = np.array(results[0][:, 7], dtype = 'int32')
top_conf = results[0][:, 5] * results[0][:, 6]
top_rboxes = results[0][:, :5]
top_rboxes[:, [0, 2]] *= image_shape[1]
top_rboxes[:, [1, 3]] *= image_shape[0]
top_polys = rbox2poly(top_rboxes)
top_polys[:, 0::2] *= image_shape[1]
top_polys[:, 1::2] *= image_shape[0]
top_hbbs = poly2hbb(top_polys)
top_100 = np.argsort(top_conf)[::-1][:self.max_boxes]
top_hbbs = top_hbbs[top_100]
......
......@@ -157,9 +157,9 @@ class YOLO(object):
top_label = np.array(results[0][:, 7], dtype = 'int32')
top_conf = results[0][:, 5] * results[0][:, 6]
top_rboxes = results[0][:, :5]
top_rboxes[:, [0, 2]] *= image_shape[1]
top_rboxes[:, [1, 3]] *= image_shape[0]
top_polys = rbox2poly(top_rboxes)
top_polys[:, 0::2] *= image_shape[1]
top_polys[:, 1::2] *= image_shape[0]
#---------------------------------------------------------#
# 设置字体与边框厚度
#---------------------------------------------------------#
......@@ -378,9 +378,9 @@ class YOLO(object):
top_label = np.array(results[0][:, 7], dtype = 'int32')
top_conf = results[0][:, 5] * results[0][:, 6]
top_rboxes = results[0][:, :5]
top_rboxes[:, [0, 2]] *= image_shape[1]
top_rboxes[:, [1, 3]] *= image_shape[0]
top_polys = rbox2poly(top_rboxes)
top_polys[:, 0::2] *= image_shape[1]
top_polys[:, 1::2] *= image_shape[0]
top_hbbs = poly2hbb(top_polys)
for i, c in list(enumerate(top_label)):
predicted_class = self.class_names[int(c)]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册