"tests/vscode:/vscode.git/clone" did not exist on "f2d7513561eb72f6b9c5188b5a227ecb7b05a2ee"
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