{{ message }}
Repository navigation
fix(keypoints): preserve identities across repeated horizontal flips - #1569
Merged
Merged
Conversation
INo-xious
requested review from
Borda,
SkalskiP,
isaacrob and
probicheaux
as code owners
September 30, 2026 06:51
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The targeted implementation preserves fallback behavior and is comprehensively covered by deterministic tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes keypoint identity swapping by tracking horizontal-flip parity across Albumentations containers.
Changes:
- Records repeated transform executions and computes odd/even flip parity.
- Adds regression coverage for aliases, nested containers, and repeated selections.
- Documents the fix in the changelog.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…parity # Conflicts: # CHANGELOG.md
…,P1) Narrow PR-body H1 claim per maintainer decision (draft, no GitHub write); warn once when a container falls outside execution-log allowlisting and SomeOf(replace=True) repeats a draw (A1); tighten CHANGELOG wording for the same limitation; extract _resolve_keypoint_swap to bring _apply_geometric_transform back under the pre-PR complexity baseline (A2); rename _replay_contains_horizontal_flip -> _replay_horizontal_flip_parity to match its parity return value (A3); track the execution-log decision in self._uses_execution_log instead of re-reading a third-party attribute (A4); skip ReplayCompose deep-copy when the execution log already decides the swap (P1). [resolve group] PR roboflow#1569 — items 1 2 4 5 6 10 --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Cover nested Compose/RandomOrder as the execution-log allowlist's outer container for a repeating SomeOf(replace=True) (T1); verify from_config-built SomeOf(replace=True) matches the direct-constructor wrapper end-to-end (T3); unit-test _first_unlogged_container directly for empty, deeply-nested-allowlisted, and deeply-nested-offending container trees (T4). [resolve group] PR roboflow#1569 — items 3 8 9 --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Append PR link to the keypoint-flip Fixed bullet to match the sibling-bullet convention in the same section. [resolve group] PR roboflow#1569 — items 11 --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Borda
approved these changes
Sep 30, 2026
Borda
added a commit
that referenced
this pull request
Oct 3, 2026
…1569) * fix: preserve keypoint identities across repeated flips * sw-engineer: fix keypoint-flip parity review findings (H1,A1,A2,A3,A4,P1) * qa-specialist: add flip-parity test coverage (T1,T3,T4) * linting-expert: link keypoint-flip CHANGELOG bullet to PR (C1) --------- Co-authored-by: jirka <6035284+borda@users.noreply.github.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
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
Two horizontal flips restore image geometry but currently leave paired keypoint identities exchanged. Count applied flip parity in supported logging-container trees, including SomeOf(replace=True) executing one transform repeatedly, so identities and visibility remain aligned with the final coordinates. Programmatic containers without complete execution records retain replay handling.
Changes
Verification
uv run --no-sync pytest tests/datasets/test_augmentations.py tests/datasets/test__torchvision.py -n 1 --timeout=120 --color=no: 289 passed.Related issues
Follow-up correctness coverage for replay handling in #1164 and flip aliases in #1386 (both merged). No closed issue is claimed as fixed; #1523's coordinate conventions remain outside scope.