Skip to content

Commit 6ff07a5

Browse files
committed
fix: sync filtering of scores with word_results
Closes #608
1 parent c65d816 commit 6ff07a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/rapidocr/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ def build_final_output(
178178
rec_res.word_results = [
179179
v for i, v in enumerate(rec_res.word_results) if i not in empty_ids
180180
]
181+
rec_res.scores = [
182+
v for i, v in enumerate(rec_res.scores) if i not in empty_ids
183+
]
181184

182185
# 仅分类结果
183186
if (

0 commit comments

Comments
 (0)