feat: add AI-assisted red-eye correction - #1469
Open
dimafa wants to merge 3 commits into
Open
Conversation
dimafa
marked this pull request as ready for review
August 4, 2026 07:11
# Conflicts: # src/components/panel/right/MasksPanel.tsx
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
-100to the generated Red Eye maskWhy
RapidRAW does not have a dedicated red-eye workflow. Manually creating and positioning radial masks for every affected pupil is repetitive, especially across event and family photo collections.
YuNet provides face and eye landmarks, while the pixel refinement step limits corrections to strongly red, coherent pupil regions. The additional landmark geometry, region-size, and color checks reject corrected pupils, neutral eyes, warm skin, and unreliable profile-face landmarks.
User impact
The new eye button in the Masking panel detects red pupils and creates an editable Red Eye group containing standard radial masks. Running detection again is idempotent: existing overlapping pupils are skipped, and missing pupils are appended to the existing group.
The model is downloaded only when the feature is first used and is verified with a pinned SHA-256 checksum.
Validation
cargo fmt --manifest-path src-tauri/Cargo.toml -- --checkcargo check --manifest-path src-tauri/Cargo.tomlcargo test --manifest-path src-tauri/Cargo.toml red_ -- --nocapture— 10 passednpm run buildnpm run i18n:runtime-check— 952 plural resolutions across 12 localesnpx tauri build --debug --bundles appIMG_1762-5.JPG: expected 0, detected 0_MG_3246.JPG: expected 2, detected 2IMG_2201.JPG: expected 2, detected 2IMG_1686-5.JPG: expected 2, detected 2IMG_6647.JPG: expected 2, detected 2Repository-wide
npm run typecheck,npm run lint,npm run format:check, and the extraction phase ofnpm run i18n:checkstill report unrelated pre-existing failures on currentupstream/main. The changed frontend and locale files pass targeted formatting, the production Vite build passes, and the i18n runtime validation passes.Screenshots