Skip to content

Commit

Permalink
Update utility.py (#11836)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NoExperienceCoder authored Mar 29, 2024
1 parent 0b91f4d commit 4865410
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppstructure/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 4865410

Please sign in to comment.