Skip to content

Filter flow gradients only between existing neighbors - #120

Open
sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix/flow-gradient-array-boundaries-20261005
Open

sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix/flow-gradient-array-boundaries-20261005

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Fixes #119.

Build the gradient rejection mask from actual adjacent samples rather than zero-padded differences. Constant translations no longer appear discontinuous at array edges. Both sides of genuine over-threshold differences remain rejected; the existing checked directions, missing-value comparisons, fallback priority, and connected-patch filter are preserved.

Validation

python -m pytest -q tests/flow_utils_test.py tests/flow_boundary_test.py

14 tests passed. Eleven new regressions all fail on unchanged upstream and pass with the fix. They cover constant translations, signed offsets, 2/3-channel fields, singleton spatial axes, exact thresholds, both sides of true discontinuities, missing values, fallback filling, and interaction with the connected-patch filter. All three existing flow utility tests pass. No image volumes or remote stores were downloaded.

Tested on macOS CPU using real module imports. New test formatting, scoped static checks, Python syntax and git diff --check pass. Full training, accelerator execution, and the full repository suite were not run. No dependency or workflow changes.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@sylvesterkaczmarek

sylvesterkaczmarek commented Oct 7, 2026 •

Copy link
Copy Markdown
Author

The check-changes job stopped in Set up job before checkout or code analysis. Its annotations report Failed to resolve action download info. and an HTTP request timeout after 00:01:40; the four downstream scanner jobs were skipped.

Could a maintainer rerun this failed job and review/import the flow-boundary fix? My account does not have permission to rerun upstream workflows.

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.

Flow gradient filtering rejects constant translations at array boundaries

1 participant