Add Set-of-Marks overlay for VLM element grounding#230
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 41 |
| Duplication | 2 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Round-7 follow-up, batch 12 — the standard Set-of-Marks VLM-grounding format, wired through all five layers (facade,
AC_*, MCP, Script Builder) with headless tests + EN/Zh v22 docs + README sections.Feature (
utils/set_of_marks)mark_elements(assign 1..N + centre/role/text),render_marks(draw numbered red boxes on a PNG, Pillow),resolve_mark(number -> element). Pure + unit-testable with synthetic elements.mark_screen(app_name?, render_path?)numbers the live a11y tree (caches marks, optional overlay screenshot);mark_click(n)resolves a number from the cache and clicks the element centre.AC_mark_screen/AC_mark_click+ac_*.Why
Top queued modality item across the research rounds: Set-of-Marks is the de-facto input format for modern GUI agents (UI-TARS/OmniParser/VisualWebArena) and turns the existing VLM locator into a reliable "pick a number" loop. Pure-stdlib + Pillow (already a dep), no model needed.
Verification
test/unit_test/headless/test_set_of_marks_batch.py— 6 tests pass (numbering/skip-invalid, resolve, PNG render, click via supplied marks + monkeypatched mouse, wiring).globalstatement via in-place list mutation); radon no CC≥C; bandit clean;import je_auto_controlPySide6-free.