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 removed
pull/11843/head
Nikunj Saini 2024-03-29 11:17:08 +05:30 committed by GitHub
parent 0b91f4dd50
commit 4865410ebb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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),