Skip to content

Add element_proposal: propose a clean element list from raw pixels#449

Merged
JE-Chen merged 1 commit into
devfrom
feat/element-proposal-batch
Jun 26, 2026
Merged

Add element_proposal: propose a clean element list from raw pixels#449
JE-Chen merged 1 commit into
devfrom
feat/element-proposal-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Seventh and final feature of the ROUND-15 perception lane (the top-of-funnel UIED-lite). Set-of-Marks, observation and the grounding helpers all assume you already have element boxes — but a game, a custom-drawn app or a remote desktop has no accessibility tree.

  • Headless core utils/element_proposal/: propose_elements (detect widget boxes = Canny + morphological-close + connected_boxes; text boxes = text_regions.find_text_regions; fuse via element_parse.fuse_elements — its ocr > icon priority is the "drop widget-that-is-really-text" cross-check; reading_order; tag text/widget), tag_kinds (pure labeller). Single screen grab shared across both detectors. cv2 imported lazily.
  • 5 layers wired: facade __all__; AC_propose_elements (device) + AC_tag_kinds (pure) executor commands; matching read-only ac_* MCP tools; Script Builder under Image.
  • Docs: EN + Zh v220_features_doc.rst + WHATS_NEW.md.

Test

test/unit_test/headless/test_element_proposal_batch.py — pure tag_kinds (source labelling, unknown→widget, empty); cv2 propose_elements finds ≥2 drawn widgets with sequential reading-order indices and no full-frame box, blank screen → empty; wiring + facade run cv2-free. All 8 green; ruff + bandit + radon clean; no float ==; package stays Qt-free.

Set-of-Marks/observation/grounding assume you already have element boxes,
but a game/custom-drawn app/remote desktop has no accessibility tree.
propose_elements builds the top-of-funnel list from pixels: widget blobs
(Canny+morphology+connected_boxes) + text regions, fused via element_parse
(ocr>icon priority is the drop-widget-that-is-really-text cross-check),
reading-ordered and tagged text/widget. tag_kinds is the pure labeller.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 25 complexity · 0 duplication

Metric Results
Complexity 25
Duplication 0

View in Codacy

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.

@JE-Chen JE-Chen merged commit bb1d31e into dev Jun 26, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/element-proposal-batch branch June 26, 2026 02:35
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant