Enhance GIMP metrics evaluator with logging and transparency handling
- Replaced print statements with logging for better traceability in gimp.py. - Added handling for transparent images in structure checks and size evaluations. - Updated JSON examples to include delays in pyautogui commands for improved execution reliability. - Changed image URL in example to a more accessible source.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"dog_without_background\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"dog_without_background\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -73,7 +73,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"edited_colorful\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"edited_colorful\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -53,7 +53,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"berry_mirror\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"berry_mirror\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"green_background_with_object\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"green_background_with_object\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -53,7 +53,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"edited_darker\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"edited_darker\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"parameters": {
|
||||
"files": [
|
||||
{
|
||||
"url": "https://agent-files.deva.msh.team/osworld/benchmark_files/gimp/a746add2-cab0-4740-ac36-c3769d9bfb46_dog_with_background.png",
|
||||
"url": "https://huggingface.co/datasets/xlangai/ubuntu_osworld_file_cache/resolve/main/gimp/a746add2-cab0-4740-ac36-c3769d9bfb46/dog_with_background.png",
|
||||
"path": "/home/user/Desktop/dog_with_background.png"
|
||||
}
|
||||
]
|
||||
@@ -37,7 +37,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.press([\"esc\"]);pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
"import time; import pyautogui; pyautogui.press([\"esc\"]);time.sleep(1);pyautogui.hotkey([\"ctrl\", \"q\"]);time.sleep(1);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -47,7 +47,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.press([\"right\"]);pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; pyautogui.press([\"right\"]);time.sleep(1);pyautogui.press([\"enter\"])"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"ctrl\", \"q\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);time.sleep(1);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"resized\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; pyautogui.write(\"resized\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -88,11 +88,13 @@
|
||||
"check_image_size",
|
||||
"check_structure_sim_resized"
|
||||
],
|
||||
"conj": "and",
|
||||
"expected": [
|
||||
{
|
||||
"type": "rule",
|
||||
"rules": {
|
||||
"height": 512
|
||||
"height": 512,
|
||||
"ignore_transparent": true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"leftside_textbox\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; pyautogui.write(\"leftside_textbox\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"Triangle_In_The_Middle\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"Triangle_In_The_Middle\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -73,7 +73,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -53,7 +53,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.write(\"berries_contrast\");pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.write(\"berries_contrast\");time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -69,7 +69,7 @@
|
||||
"command": [
|
||||
"python3",
|
||||
"-c",
|
||||
"import pyautogui; pyautogui.press([\"enter\"]);"
|
||||
"import time; import pyautogui; time.sleep(1);pyautogui.press([\"enter\"]);"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user