Update utility.py (#11836)
File "/usr/local/lib/python3.10/dist-packages/paddleocr/ppstructure/utility.py", line 230 g avg_char_width = (bbox_x_end - bbox_x_start) / len(rec_str) IndentationError: expected an indented block after 'else' statement on line 229 Unexpected character removedpull/11843/head
parent
0b91f4dd50
commit
4865410ebb
|
@ -227,7 +227,7 @@ def cal_ocr_word_box(rec_str, box, rec_word_info):
|
|||
if len(cn_width_list) != 0:
|
||||
avg_char_width = np.mean(cn_width_list)
|
||||
else:
|
||||
g avg_char_width = (bbox_x_end - bbox_x_start) / len(rec_str)
|
||||
avg_char_width = (bbox_x_end - bbox_x_start) / len(rec_str)
|
||||
for center_idx in cn_col_list:
|
||||
center_x = (center_idx + 0.5) * cell_width
|
||||
cell_x_start = max(int(center_x - avg_char_width / 2),
|
||||
|
|
Loading…
Reference in New Issue