vis.py 文件源码

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

项目:DeepTextSpotter 作者: MichalBusta 项目源码 文件源码
def draw_detections(img, detections, color = (0, 255, 0)):

    for i in range(0, detections.shape[2]):
        det_word = detections[0, 0, i]
        if (det_word[0] == 0 and det_word[1] == 0) or det_word[5] < 0.05:
            break


        box  = ((det_word[0], det_word[1]), (det_word[2], det_word[3]), det_word[4] * 180 / 3.14)
        box = cv2.boxPoints(box)
        box = np.array(box, dtype="int")

        draw_box_points(img, box, color)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号