feat(smart-crop): overhaul with face detection, social presets, and 3 modes

Replace the confusing 2-mode smart crop with a clear 3-mode system:
- Subject Focus: Sharp attention/entropy saliency crop with social media presets
- Face Focus: MediaPipe face detection with headshot framing presets
- Auto Trim: Border removal with optional pad-to-square

Adds detectFaces() to AI package, face preset constants, backward
compatibility for old mode names, and comprehensive integration tests.
This commit is contained in:
Siddharth Kumar Sah
2026-04-13 00:47:53 +08:00
parent 29fafd0722
commit 92d4d2d9c6
9 changed files with 798 additions and 277 deletions
+5 -2
View File
@@ -58,7 +58,7 @@ export const en = {
description: "AI-powered background removal",
},
upscale: { name: "Image Upscaling", description: "AI super-resolution enhancement" },
"erase-object": { name: "Object Eraser", description: "Paint over unwanted elements" },
"erase-object": { name: "Object Eraser", description: "Remove unwanted objects with AI" },
ocr: {
name: "OCR / Text Extraction",
description: "Extract text from images with AI-powered accuracy",
@@ -67,7 +67,10 @@ export const en = {
name: "Face / PII Blur",
description: "Auto-detect and blur faces and sensitive info",
},
"smart-crop": { name: "Smart Crop", description: "AI detects subject and crops optimally" },
"smart-crop": {
name: "Smart Crop",
description: "Smart subject, face, or trim-based cropping",
},
"content-aware-resize": {
name: "Content-Aware Resize",
description: "Intelligently resize images while preserving important content",