feemag's picture
Add U-2-Net, PP-OCRv6 small and Whisper base models for Feemag Tools
0f8696f verified
|
Raw History Blame Contribute Delete
1.8 kB

Browser background remover

U-2-Net FP32 ONNX, Apache-2.0, from BritishWerewolf/U-2-Net at pinned revision c08042b462485d8597c89d3ce831d00be8582c5c. Upstream model: https://github.com/xuebinqin/U-2-Net Converted weights: https://huggingface.co/BritishWerewolf/U-2-Net

One model, ~176 MB decimal, served from Hugging Face in production (see ../README.md) and split into content-addressed 50 MiB parts. u2net.json records SHA-256 hashes. Build verifies each part and the whole model; runtime verifies parts before inference. Cache Storage is best-effort. ONNX Runtime 1.24.3 uses matching same-origin WASM assets, with one thread in a worker. Its MIT license/third-party notices are retained in public/ocr.

Preprocessing follows rembg: 320x320 RGB, RGB maximum rescaling and ImageNet means/std. Output mask uses min/max normalization and scales to original image dimensions. Existing alpha is multiplied, not replaced. No input is uploaded. This is foreground segmentation, not full foreground-color matting: fine hair, fur, glass and low contrast remain difficult. No perfect-quality claim.

One worker/session runs at a time. Cancellation terminates it; idle release is 60 seconds. Bounds: 30 MiB input, 24 MP, 8192 per side, 240-second timeout. Browser decoding precedes our dimension guard. This does not protect against every malformed decoder input. File names and pixels are not logged/uploaded.

BiRefNet_lite was evaluated but not shipped: WASM ran out of memory, and the experimental GPU path fell back after runtime failure. A Concat adaptation was also evaluated without establishing a reliable detailed-model path. Evaluation files remain outside the application. Do not call this model the best available or claim benchmark superiority. Release choice prioritizes verified operation.