Add element_proposal: propose a clean element list from raw pixels#449
Merged
Conversation
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.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 25 |
| Duplication | 0 |
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.



Summary
Seventh and final feature of the ROUND-15 perception lane (the top-of-funnel UIED-lite). Set-of-Marks,
observationand 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.utils/element_proposal/:propose_elements(detect widget boxes = Canny + morphological-close +connected_boxes; text boxes =text_regions.find_text_regions; fuse viaelement_parse.fuse_elements— itsocr > iconpriority is the "drop widget-that-is-really-text" cross-check;reading_order; tagtext/widget),tag_kinds(pure labeller). Single screen grab shared across both detectors. cv2 imported lazily.__all__;AC_propose_elements(device) +AC_tag_kinds(pure) executor commands; matching read-onlyac_*MCP tools; Script Builder under Image.v220_features_doc.rst+WHATS_NEW.md.Test
test/unit_test/headless/test_element_proposal_batch.py— puretag_kinds(source labelling, unknown→widget, empty); cv2propose_elementsfinds ≥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+radonclean; no float==; package stays Qt-free.