[PR #2] [MERGED] refactor: migrate background removal from @imgly to rmbg package #5

Closed
opened 2026-03-03 15:56:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mrgoonie/human-mcp/pull/2
Author: @mrgoonie
Created: 10/2/2025
Status: Merged
Merged: 10/2/2025
Merged by: @mrgoonie

Base: mainHead: dev


📝 Commits (3)

  • fda170e refactor: migrate background removal from @imgly to rmbg package
  • 3e04b15 fix(jimp): enhance image masking tool with proper grayscale alpha masking
  • 718d877 fix(hands): correct mask, bg removal

📊 Changes

19 files changed (+4411 additions, -215 deletions)

View changed files

📝 CLAUDE.md (+4 -2)
📝 bun.lock (+30 -41)
docs/research-jimp-rmbg-image-editing-tools.md (+1668 -0)
📝 package.json (+1 -2)
plans/251001-jimp-image-editing-tools-plan.md (+1975 -0)
📝 src/tools/hands/index.ts (+169 -81)
📝 src/tools/hands/processors/background-remover.ts (+63 -30)
📝 src/tools/hands/processors/jimp-processor.ts (+236 -36)
📝 src/tools/hands/schemas.ts (+2 -6)
📝 src/tools/hands/utils/jimp-helpers.ts (+13 -10)
📝 src/tools/hands/utils/validation.ts (+1 -7)
test-outputs/test-crop-center.png (+0 -0)
test-outputs/test-mask-overlay.png (+0 -0)
test-outputs/test-remove-bg.png (+0 -0)
test-outputs/test-report.md (+147 -0)
test-outputs/test-resize-400.png (+0 -0)
test-outputs/test-results.json (+102 -0)
test-outputs/test-rotate-45.png (+0 -0)
tests/data/cat.png (+0 -0)

📄 Description

  • Replace @imgly/background-removal with rmbg for AI background removal
  • Update quality settings to use rmbg models:
    • fast: U2netpModel (320px, lightweight)
    • balanced: ModnetModel (512px, default)
    • high: BriaaiModel (1024px, highest quality)
  • Simplify implementation by using rmbg's direct buffer API
  • Remove onnxruntime-web peer dependency
  • Add comprehensive test suite with QA validation
  • All tests passing with 100% success rate

Updated dependencies:

  • Added: rmbg@0.1.0
  • Removed: @imgly/background-removal, onnxruntime-web

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mrgoonie/human-mcp/pull/2 **Author:** [@mrgoonie](https://github.com/mrgoonie) **Created:** 10/2/2025 **Status:** ✅ Merged **Merged:** 10/2/2025 **Merged by:** [@mrgoonie](https://github.com/mrgoonie) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (3) - [`fda170e`](https://github.com/mrgoonie/human-mcp/commit/fda170e3a9210047df7eaf8ceb866cf467263cc9) refactor: migrate background removal from @imgly to rmbg package - [`3e04b15`](https://github.com/mrgoonie/human-mcp/commit/3e04b15c0ccd565847fae56222a8b71b1f21fe6f) fix(jimp): enhance image masking tool with proper grayscale alpha masking - [`718d877`](https://github.com/mrgoonie/human-mcp/commit/718d877ff358e5aea898606665ed01f7677c56e9) fix(hands): correct mask, bg removal ### 📊 Changes **19 files changed** (+4411 additions, -215 deletions) <details> <summary>View changed files</summary> 📝 `CLAUDE.md` (+4 -2) 📝 `bun.lock` (+30 -41) ➕ `docs/research-jimp-rmbg-image-editing-tools.md` (+1668 -0) 📝 `package.json` (+1 -2) ➕ `plans/251001-jimp-image-editing-tools-plan.md` (+1975 -0) 📝 `src/tools/hands/index.ts` (+169 -81) 📝 `src/tools/hands/processors/background-remover.ts` (+63 -30) 📝 `src/tools/hands/processors/jimp-processor.ts` (+236 -36) 📝 `src/tools/hands/schemas.ts` (+2 -6) 📝 `src/tools/hands/utils/jimp-helpers.ts` (+13 -10) 📝 `src/tools/hands/utils/validation.ts` (+1 -7) ➕ `test-outputs/test-crop-center.png` (+0 -0) ➕ `test-outputs/test-mask-overlay.png` (+0 -0) ➕ `test-outputs/test-remove-bg.png` (+0 -0) ➕ `test-outputs/test-report.md` (+147 -0) ➕ `test-outputs/test-resize-400.png` (+0 -0) ➕ `test-outputs/test-results.json` (+102 -0) ➕ `test-outputs/test-rotate-45.png` (+0 -0) ➕ `tests/data/cat.png` (+0 -0) </details> ### 📄 Description - Replace @imgly/background-removal with rmbg for AI background removal - Update quality settings to use rmbg models: - fast: U2netpModel (320px, lightweight) - balanced: ModnetModel (512px, default) - high: BriaaiModel (1024px, highest quality) - Simplify implementation by using rmbg's direct buffer API - Remove onnxruntime-web peer dependency - Add comprehensive test suite with QA validation - All tests passing with 100% success rate Updated dependencies: - Added: rmbg@0.1.0 - Removed: @imgly/background-removal, onnxruntime-web --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem closed this issue 2026-03-03 15:56:46 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/human-mcp#5
No description provided.