Skip to content

Releases

v1.1.2 — Cross-Platform Swift 5.9 & ClojureScript Reference Modules

Choose a tag to compare

@utilvo utilvo released this 26 Nov 18:15
f94d462

Added

  • Swift 5.9 Package (Package.swift & Sources/BrowserAlphaMatting/BrowserAlphaMatting.swift): Pure Swift 5.9 reference module implementing cubic Hermite smoothstep alpha matting (3t^2 - 2t^3), BT.601 perceptual luma-weighted distance, foreground color-spill decontamination, and NEMA DICOM PS3.3 Section 10.7.1.3 anisotropic pixel-spacing Euclidean geometry across macOS, iOS, tvOS, and watchOS.
  • ClojureScript Reference Module: Cross-platform ClojureScript compatibility for client-side alpha-matting pipelines.

Interactive browser reference: https://utilvo.com/background-remover

v1.1.1 — Standardized publiccode.yml (v0.4) & CodeMeta 2.0 Archival Descriptors

Choose a tag to compare

@utilvo utilvo released this 25 Nov 21:45
650e6c4

What's New in v1.1.1

Standardized Public-Sector & Research Archival Metadata

  • publiccode.yml (v0.4): Added bilingual (en / de) European public-sector software descriptor detailing GDPR-compliant zero-egress client-side execution, input/output MIME types, platforms, and hybrid WebGPU/TypedArray capabilities.
  • codemeta.json (v2.0): Added CodeMeta 2.0 archival descriptor with ORCID (0009-0002-1503-5639) and Software Heritage / Zenodo archival metadata (10.5281/zenodo.22975427).
  • Manifest Version Alignment: Updated package.json (1.1.1), jsr.json (1.1.1), and CITATION.cff (cff-version: "1.1.1").

Live Demos

v1.1.0 — Modular SDK, CIE76 Lab Color-Keying, Joint Bilateral 4K Upsampler, BFS Counter Analyzer & Benchmarks

Choose a tag to compare

@utilvo utilvo released this 25 Nov 21:07
d565824

What's New in v1.1.0

Modular SDK Architecture (src/)

  • src/color-key.js: extractColorKeyAlpha (3D Euclidean sRGB), rgbToLab, and extractPerceptualLabAlpha (CIE76 ΔE perceptual L*a*b* color-keying for unevenly lit paper scans & shadowed sweeps).
  • src/hybrid-fusion.js: fuseHybridAlpha dual-engine neural + color-key combiner and detectEnclosedCounters non-recursive BFS flood-fill analyzer separating interior glyph holes (O, A, B, P) from border-connected backgrounds.
  • src/upsample.js: upsampleAlphaBilinear and upsampleAlphaJointBilateral (RGB-guided edge-preserving 4K proxy-mask upsampler refining transition pixels 8 < α < 247).
  • src/morphology.js: shiftAlphaBoundary, featherAlphaSeparable (O(W·H) sliding-accumulator tent blur), and computeAlphaBoundingBox.
  • src/decontaminate.js: decontaminateForegroundColors (8-connected foreground RGB propagation) and compositeNativeResolution.
  • src/worker/: createMattingWorkerBridge (Transferable ArrayBuffer zero-copy client) and rmbg-worker.mjs (briaai/RMBG-1.4 WebGPU / WASM reference worker).
  • Includes strict TypeScript & Deno/JSR support (src/index.d.ts, tsconfig.json, jsr.json, mod.ts), test/advanced-kernels.test.mjs, runnable examples/, and GitHub Actions CI (Node.js 20.x & 22.x).

1080p & 4K UHD Throughput Benchmarks (npm run bench, Node.js v22 Single Thread)

Kernel Stage 1080p (1920×1080) 4K UHD (3840×2160) Throughput
fuseHybridAlpha (neural-with-counters) 5.5 ms 21.8 ms ~376 MP/s
extractColorKeyAlpha (3D Euclidean sRGB) 11.9 ms 40.9 ms ~202 MP/s
upsampleAlphaBilinear (1024px -> native) 16.9 ms 59.1 ms ~140 MP/s
featherAlphaSeparable (radius = 3px) 35.1 ms 141.0 ms ~59 MP/s
decontaminateForegroundColors (2 rings) 72.9 ms 290.0 ms ~28 MP/s

Live Demos

v1.0.0 — Hybrid WebGPU Proxy + Euclidean RGB Color-Key Alpha Matting Kernel

Choose a tag to compare

@utilvo utilvo released this 25 Nov 20:05
02088d2

Initial public release of browser-alpha-matting (v1.0.0) — a zero-dependency JavaScript/TypeScript alpha-matting and mask-refinement kernel for 100% client-side browser background removal.

Exported Functions

  • extractColorKeyAlpha(rgba, width, height, options) — $O(W \cdot H)$ 3D Euclidean RGB distance color-keying with anti-aliased tolerance/softness ramp.
  • fuseHybridAlpha(neuralAlpha, colorKeyAlpha, options) — $O(W \cdot H)$ hybrid fusion preserving soft neural hair/fur contours while carving enclosed typographic counters (O, A, B, P).
  • upsampleAlphaBilinear(proxyAlpha, proxyW, proxyH, targetW, targetH) — Pure TypedArray bilinear upsampling from 1024px neural proxy masks back to native 4K dimensions.
  • shiftAlphaBoundary(alpha, width, height, shiftPx) — Two-pass separable 1D morphological erosion (shiftPx < 0) and dilation (shiftPx > 0).
  • featherAlphaSeparable(alpha, width, height, radiusPx) — $O(W \cdot H)$ two-pass sliding-accumulator tent feathering independent of radiusPx.
  • decontaminateForegroundColors(rgba, alpha, width, height, passes) — Propagates opaque foreground RGB outward into semi-transparent boundary pixels to eliminate edge halos.
  • compositeNativeResolution(rgba, width, height, alpha, backdropRgb) — Lossless 32-bit transparent RGBA export or solid RGB backdrop flattening.
  • createMattingWorkerBridge(workerUrl) — Zero-copy Transferable ArrayBuffer Web Worker IPC wrapper for off-main-thread WebGPU/WASM inference.

Live Production Sandbox

Test the full hybrid WebGPU + Color-Key pipeline in the browser at https://utilvo.com/background-remover