trainer.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:textboxes 作者: shinjayne 项目源码 文件源码
def draw_outputs(img, boxes, confidences, wait=1):
    I = img * 255.0

    #nms = non_max_suppression_fast(np.asarray(filtered_boxes), 1.00)
    picks = postprocess_boxes(boxes, confidences)

    for box, conf, top_label in picks:#[filtered[i] for i in picks]:
        if top_label != classes:
            #print("%f: %s %s" % (conf, coco.i2name[top_label], box))

            c = colorsys.hsv_to_rgb(((top_label * 17) % 255) / 255.0, 1.0, 1.0)
            c = tuple([255*c[i] for i in range(3)])

    I = cv2.cvtColor(I.astype(np.uint8), cv2.COLOR_RGB2BGR)
    cv2.imshow("outputs", I)
    cv2.waitKey(wait)
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号