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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user