Enhance image text comparison functionality with detailed logging

- Added logging for OCR results and text matching outcomes in compare_image_text function.
- Updated JSON examples to support multiple expected results and improved structure for evaluator functions.
- Enhanced handling of expected text rules to include multiple variations for better matching accuracy.
This commit is contained in:
yuanmengqi
2025-07-10 22:32:53 +00:00
parent 4e3446d6fe
commit 6897e5320d
4 changed files with 161 additions and 18 deletions

View File

@@ -44,19 +44,52 @@
"os"
],
"evaluator": {
"func": "compare_image_text",
"result": {
"type": "vm_file",
"path": "/home/user/Desktop/ls.png",
"dest": "ls.png"
},
"expected": {
"type": "rule",
"rules": {
"type": "text",
"text": "ls"
"func": [
"compare_image_text",
"compare_image_text",
"compare_image_text"
],
"conj": "or",
"result": [
{
"type": "vm_file",
"path": "/home/user/Desktop/ls.png",
"dest": "ls.png"
},
{
"type": "vm_file",
"path": "/home/user/Desktop/ls.png",
"dest": "ls.png"
},
{
"type": "vm_file",
"path": "/home/user/Desktop/ls.png",
"dest": "ls.png"
}
}
],
"expected": [
{
"type": "rule",
"rules": {
"type": "text",
"text": "ls"
}
},
{
"type": "rule",
"rules": {
"type": "text",
"text": "1s"
}
},
{
"type": "rule",
"rules": {
"type": "text",
"text": "1s"
}
}
]
},
"proxy": false
}