Skip to content

Commit e73ffd1

Browse files
authored
Miniwob zoom (#352)
* Set device scale factor to 1.0 in extract_screenshot for consistent rendering. This prevens screenshot sized to be affected by environments such as "retina" on macbook * add examples to the description * zoom miniwob 150% by default (doesn't change the viewport, just has a better usage of the viewport) * adjust version * Update extract_screenshot to use actual window dimensions for device metrics * Enhance zoom functionality in miniwob for better viewport usage and precision in visual agents * Enhance zoom_page docstring with detailed explanation of CSS transform scaling benefits * Adjust zoom factor in miniwob to improve viewport usage and precision for visual agents * adding type * Remap the coordinate actions based on the zoom factor * apply the zooming at the screenshot level * changing the zoom method * Fix viewport dimensions for consistency in Miniwob tasks
1 parent 9e4e07c commit e73ffd1

File tree

1 file changed

+1
-1
lines changed
  • browsergym/miniwob/src/browsergym/miniwob

1 file changed

+1
-1
lines changed

browsergym/miniwob/src/browsergym/miniwob/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(
3838
# Screenshot is scaled for this banchmark see `_bgym_scale_factor`
3939
# Keeping this aspect ratio and size works well with claude-3.5 so far.
4040
# But may not be optimal for other VLMs.
41-
self.viewport = {"width": 333, "height": 213}
41+
self.viewport = {"width": 332, "height": 214}
4242
self.slow_mo = 100 # ms
4343
self.timeout = 5000 # ms
4444

0 commit comments

Comments
 (0)