Phase 4: Background Removal (Transformers.js)

- Added @xenova/transformers dependency
- useBackgroundRemoval hook with RMBG-1.4 model
- Client-side background removal with progress indicator
- Background removal button in properties panel (image elements only)
- ~170MB model cached after first download

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Khalid A
2026-04-21 01:19:03 -05:00
parent 2acf674aaa
commit 4a735e2f2e
5 changed files with 226 additions and 1 deletions

View File

@@ -14,7 +14,8 @@
"react-dom": "^19.2.5",
"react-konva": "^18.2.10",
"konva": "^9.3.18",
"use-image": "^1.1.1"
"use-image": "^1.1.1",
"@xenova/transformers": "^2.17.2"
},
"devDependencies": {
"@eslint/js": "^9.39.4",