feat(red-eye-removal): SOTA red eye removal with MediaPipe Face Mesh + OpenCV LAB correction (#60)

Uses MediaPipe Face Mesh (refine_landmarks=True) for precise iris localization
and OpenCV LAB color space for accurate red-eye detection and luminance-preserving
correction. Zero new dependencies - leverages existing MediaPipe + OpenCV stack.

- Sensitivity slider (LAB 'a' channel threshold)
- Correction strength slider (pupil darkening factor)
- Output format selector (Original/PNG/JPEG/WebP)
- Before/after preview, progress stages, batch processing
- Pipeline support via Controls/Settings split

Co-authored-by: stirling-image <stirling-image@users.noreply.github.com>
This commit is contained in:
stirling-image
2026-04-13 20:22:30 +08:00
committed by GitHub
co-authored by stirling-image
parent dfffc0a8cc
commit 9ddeac92b6
9 changed files with 705 additions and 0 deletions
+6
View File
@@ -254,6 +254,11 @@ const NoiseRemovalSettings = lazy(() =>
default: m.NoiseRemovalSettings,
})),
);
const RedEyeRemovalSettings = lazy(() =>
import("@/components/tools/red-eye-removal-settings").then((m) => ({
default: m.RedEyeRemovalSettings,
})),
);
// ── Color tool wrapper ─────────────────────────────────────────────
// Color tools share a single component but differ by toolId.
@@ -384,6 +389,7 @@ export const toolRegistry = new Map<string, ToolRegistryEntry>([
],
["colorize", { displayMode: "before-after", Settings: ColorizeSettings }],
["noise-removal", { displayMode: "before-after", Settings: NoiseRemovalSettings }],
["red-eye-removal", { displayMode: "before-after", Settings: RedEyeRemovalSettings }],
]);
export function getToolRegistryEntry(toolId: string): ToolRegistryEntry | undefined {