Rid7 / Table-OCR

Recognize tables from images and restore them into word.
GNU General Public License v3.0
269 stars 70 forks source link

CRNN字符识别后定位单个字符的问题 #25

Open daeing opened 3 years ago

daeing commented 3 years ago

作者您好,我想请问一下,您在做完CRNN预测后,定位单个字符位置的思路是什么样的,可以介绍一下嘛

cut_index = 0 for i in range(length): if t[1][i][0][0] != 0 and (not (i > 0 and t[1][i - 1][0][0] == t[1][i][0][0])): if i == length - 1: point_list.append([int((i-int((i - cut_index)/2)) 4 scale), int((i+1) 4 scale)]) elif t[1][i + 1][0][0] == t[1][i][0][0]: point_list.append([int((i - int((i - cut_index)/2)) 4 scale), int((i + 3) 4 scale)]) else: point_list.append([int((i-int((i - cut_index)/2)) 4 scale), int((i+2) 4 scale)])