feat: replace AI matting with chroma-based checkerboard detection

The transparency-fixer now directly detects the baked-in checkerboard
pattern using per-pixel chroma analysis instead of BiRefNet AI matting.
Achromatic pixels in the gray range are classified as background
(transparent), chromatic pixels as foreground (opaque), with smooth
transitions at anti-aliased edges.

- No longer requires Python sidecar or background-removal bundle
- Watermark removal uses Sharp median(5) filter pre-processing
- Moved tool from "ai" to "utilities" category
- Removed from PYTHON_SIDECAR_TOOLS and background-removal enablesTools
- Near-instant processing (pure Sharp, no model inference)
This commit is contained in:
SnapOtter
2026-05-13 17:16:02 +08:00
parent 443e9a4ffa
commit f1a4c94375
3 changed files with 71 additions and 77 deletions
+6 -7
View File
@@ -250,18 +250,18 @@ export const TOOLS: Tool[] = [
route: "/content-aware-resize",
},
{
id: "content-aware-crop",
name: "Content-Aware Crop",
description: "Extend canvas beyond image bounds with AI-powered fill",
id: "ai-canvas-expand",
name: "AI Canvas Expand",
description: "Expand canvas beyond image bounds with AI-powered fill",
category: "ai",
icon: "Expand",
route: "/content-aware-crop",
route: "/ai-canvas-expand",
},
{
id: "transparency-fixer",
name: "PNG Transparency Fixer",
description: "Fix fake transparent PNGs in one click",
category: "ai",
category: "utilities",
icon: "ShieldCheck",
route: "/transparency-fixer",
},
@@ -1247,6 +1247,5 @@ export const PYTHON_SIDECAR_TOOLS = [
"red-eye-removal",
"restore-photo",
"passport-photo",
"transparency-fixer",
"content-aware-crop",
"ai-canvas-expand",
] as const;