"docs/git@developer.sourcefind.cn:orangecat/ollama.git" did not exist on "55ea963c9e9033d01c7c20a54c5ede5babb6878e"
Commit eb45a0e8 authored by myhloli's avatar myhloli
Browse files

feat(ocr): filter out low confidence ocr results

- Add confidence score threshold to filter out low confidence OCR results
- Improve OCR accuracy by ignoring less certain detections
parent 160624bd
......@@ -214,6 +214,9 @@ def get_ocr_result_list(ocr_res, useful_list):
if len(box_ocr_res) == 2:
p1, p2, p3, p4 = box_ocr_res[0]
text, score = box_ocr_res[1]
# logger.info(f"text: {text}, score: {score}")
if score < 0.6: # 过滤低置信度的结果
continue
else:
p1, p2, p3, p4 = box_ocr_res
text, score = "", 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment