Releases: MujahidAbbas/clearcut
Releases · MujahidAbbas/clearcut
v1.3.0 — Mask Post-Processing & Color Decontamination
What's New
Mask Post-Processing Pipeline
Added a research-backed post-processing pipeline for segmentation masks that follows BRIA's official recommendations:
- Min-max alpha normalization — preserves the model's soft alpha matte while using the full 0-255 dynamic range (replaces destructive sigmoid thresholding)
- Morphological opening (erode + dilate) — removes edge noise without permanently shrinking the mask boundary
- Gaussian blur — smooth anti-aliased edges at mask boundaries
Color Decontamination
Added Photoshop-style "Decontaminate Colors" at compositing time:
- Propagates clean foreground RGB into semi-transparent edge pixels
- Eliminates background color fringe (e.g. green/blue spill from colored backgrounds)
- Runs automatically at render time so brush tool edits are always decontaminated
Files Changed
src/lib/maskPostProcessing.ts(new) — post-processing algorithms + color decontaminationsrc/lib/segmentation.ts— integrated mask post-processing intorawImageToCanvas()src/lib/compositing.ts— integrated color decontamination intodrawMaskedForeground()
v1.2.0 - Refine Edges Feature
🎨 Refine Edges Feature
This release introduces a dedicated Refine Edges modal for precision mask editing, allowing users to fine-tune background removal results with professional-grade tools.
✨ New Features
Refine Edges Modal
- Eraser Tool - Remove leftover background artifacts the AI missed
- Restore Tool - Bring back accidentally removed details (hair edges, fingers, etc.)
- Zoom Controls - 1.0x to 4.0x zoom for precision work on fine details
- Pan Navigation - Hold Space + drag (desktop) or two-finger drag (mobile)
- Reset All Edits - Revert all refinements back to original state
Touch Support
- Pinch-to-zoom gesture
- Two-finger pan for navigation
- Single-finger draw for brush strokes
📁 New Components
RefineEdgesModal.tsx- Full-screen overlay with focus trap and exit CTAsRefineEdgesCanvas.tsx- Zoomable canvas with brush stroke handlingRefineEdgesControls.tsx- Tool toggle, sliders, reset button, keyboard shortcuts
🔧 Improvements
- Fixed preview not updating after mask changes in Edit Modal
- Fixed Results View slider not reflecting refinement changes
- Updated README with Edge Refinement documentation
Full Changelog: v1.1.0...v1.2.0
v1.1.0 - Image Editing Flow
What's New
Export Modal
- Download button now shows export modal with loading → success → download states
- Tracks original filename for meaningful download names
- Ko-fi support button integration
Image Editing Modal
- Background Options: 12 preset colors, custom color picker, photo upload
- Filters: Brightness, contrast, saturation, blur sliders (applies to background only)
- Transform: Rotate (90° increments), flip horizontal/vertical
- Aspect Ratio: Original, Free, 1:1, 4:3, 16:9, 9:16 with interactive crop tool
- Zoom & Pan: Mouse wheel zoom (toward cursor), drag to pan, slider control
- Interactive Crop: Draggable/resizable crop box with handles, aspect ratio locking
- Before/After Toggle: Compare edited vs original
- Unsaved Changes: Confirmation dialog on exit with unsaved edits
Technical Improvements
- Non-destructive editing pattern (state → render)
- CSS filters for hardware-accelerated performance
- Canvas save/restore pattern for transforms
Full Changelog: v1.0.0...v1.1.0
v1.0.0 - Initial stable release
Clearcut v1.0.0
Browser-based AI background removal tool. All ML inference happens client-side—no server processing required.
✨ Features
- Client-side ML inference using Transformers.js and RMBG-1.4 model
- WebGPU acceleration with automatic WASM fallback
- Three background modes: transparent, solid color, or custom image
- Brush tool for mask refinement with undo/redo support
- Before/after comparison slider for easy visualization
- Model caching in IndexedDB (~45MB)
🚀 Getting Started
npm install
npm run devVisit clearcut.app to try it online.