YCG09 / chinese_ocr

CTPN + DenseNet + CTC based end-to-end Chinese OCR implemented using tensorflow and keras

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

text_dect.py中函数draw_boxes过滤条件是否有误

peterluck3 opened this issue · comments

在text_dect.py文件里有个draw_boxes函数。
draw_boxes里for循环中的判断条件:
if np.linalg.norm(box[0] - box[1]) < 5 or np.linalg.norm(box[3] - box[0]) < 5:
continue
中第二个条件np.linalg.norm(box[3] - box[0]) < 5 是不是应该改成:
np.sqrt((box[6] - box[0])**2 + (box[7] - box[1])**2) < 5
你想表达的逻辑是,对角线长度小于5吧。