Add change_localize: attribute a screen change to the element boxes that changed#447
Merged
Conversation
…hat changed Existing diffs return raw pixel regions or a11y-element diffs; the gap is 'given a frame diff and a list of element boxes, which of those changed?'. localize_changes diffs reference vs current and scores each element box by its mean per-pixel change; rank_changes is the pure ranker (changed when score >= threshold, sorted most-changed first). cv2/numpy lazy.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 27 |
| 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
Fifth feature of the ROUND-15 perception lane. Existing diffs return raw pixel regions (
motion_regions,perceptual_diff,ssim_changed_regions) or a11y-element diffs (element_diff); the gap is "given a frame diff and a list of element boxes, which of those changed?".utils/change_localize/:localize_changes(diffreferencevscurrent/screen, score each supplied element box by its mean per-pixel change 0..1, rank),rank_changes(pure ranker — flagschangedwhen score ≥threshold, sorts most-changed first). Pairs withset_of_marks/accessibility boxes for a per-element "what changed" feedback signal after a click. cv2/numpy imported lazily; loaders reusevisual_match.__all__;AC_localize_changes(device) +AC_rank_changes(pure) executor commands; matching read-onlyac_*MCP tools; Script Builder under Image.v218_features_doc.rst+WHATS_NEW.md.Test
test/unit_test/headless/test_change_localize_batch.py— pure rank (marks+sorts, tuple inputs, empty, threshold boundary), cv2localize_changesattributes a change to the right box (importorskip); wiring + facade run cv2-free. All 8 green;ruff+bandit+radonclean;pytest.approx(no float==); package stays Qt-free.