yehudaaadev/RustMatte
À propos
Offline, privacy-first AI background remover with a Rust core and ONNX Runtime. Runs locally without cloud dependencies.
Sécurité et confidentialitéWhat you can do
- Quality Tier (birefnet_lite_512, 183 MB): 2,984.9 ms median inference / 3,070.9 ms median total across 12 fixtures (~3.68 s cold-start model load); 2,029.9 MB peak Working Set. Preserves fine hair and intricate silhouettes.
- Fast Tier (u2netp, 4.36 MB): 266.9 ms median inference / 332.3 ms median total across 12 fixtures (349.5 ms–454.6 ms average in 100-image batch); 333.3 MB peak Working Set. Best for people and products on clean backgrounds; may leave smears on fur or textured backgrounds.
- Glass Transparency: Glass, windows, and translucent containers are segmented as solid foreground objects.
- Supported Formats (v1.0.0 release): JPEG, PNG, WebP, BMP.
Progression mesurée des étoiles
- in 24h
- 0
- in 7 days
- Historique en cours
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalRustMatte
Offline, privacy-first AI background remover for desktop and CLI, built with a Rust core and ONNX Runtime.
Status
- ✅ Released:
v1.0.0(published 2026-11-26). Desktop app (Windows) and CLI, shipping the Fast (U-2-Netp) and Balanced (BiRefNet Lite 512) tiers only. Windows is the primary supported platform; macOS/Linux builds are paused in CI while v1.1 Windows stabilizes (re-enable in.github/workflows/ci.yml). - 🚧 In development on
main:v1.1.0— not released. Av1.1.0git tag exists, but no GitHub Release, installer, or binary has been published for it, sov1.1.0is not downloadable and is not a supported release. Code onmainadds Camera RAW/HEIC decoding, DirectML/CoreML execution providers, and a third Maximum tier that is hidden in the model manifest — it cannot be downloaded, imported, or selected until its download source is public and hash-verified (see MODELS.md and docs/V1.1_RELEASE_GATES.md).
Everything below marked v1.1.0 (unreleased) describes main, not the v1.0.0 release.
Built with Rust. Not affiliated with or endorsed by the Rust Foundation.
Overview
RustMatte removes image backgrounds locally on your device. No accounts, no cloud uploads, no analytics, and no telemetry. Once the AI model weights are downloaded (once, with explicit confirmation) or imported from a local .onnx file, RustMatte works 100% offline.
Screenshots and Demo
Live Demo:

Example Results:
| Input | Output (Quality tier) | Output (alternative) |
|---|---|---|
![]() |
![]() |
![]() |
Desktop Application (GUI)
RustMatte includes a native desktop application built with Tauri 2 and Svelte 5:
- Single-Screen Workflow: Drop photos or a folder (or browse), inspect a windowed thumbnail queue, pan/zoom the Before/After comparison slider on checkerboard or solid color preview, and export transparent or solid-background PNGs (
SaveorSave all). - First-Run & Offline Guarantee: Explains the one-time model download (file name, size, source host, license) with Download, Choose a file I already have (SHA-256 verified local
.onnximport), Cancel, Retry, and a Never use the network lock in Options. - Transparency & Accessibility: About & Licenses dialog reading shipped MODELS.md and THIRD_PARTY_LICENSES.md plus Copy diagnostic info (zero file paths); English and Indonesian; System / Light / Dark themes; keyboard shortcuts (
Ctrl+O,Ctrl+Enter,Ctrl+S,Ctrl+Shift+S,ArrowUp/Down,Esc).
Installation
Installers are published on GitHub Releases (no Rust or Node.js required on end-user machines). Model weights are not bundled in installers.
The current released version is v1.0.0 (published 2026-11-26). Asset sizes below are measured from the GitHub Release API asset metadata for that release.
Windows (x86_64)
- Download
RustMatte_1.0.0_x64-setup.exe(NSIS installer,9.78 MiB=10,256,926bytes measured). - WebView2: Bundles Microsoft's WebView2 bootstrapper (
embedBootstrapper); if Edge WebView2 Runtime is missing, the installer fetches it from Microsoft during setup. - SmartScreen Warning: Because executables are unsigned (
v1.0.0), Windows SmartScreen may show "Windows protected your PC". Verify the SHA-256 checksum first, then click More info -> Run anyway.
macOS (aarch64 Apple Silicon only — Experimental)
- Download
RustMatte_1.0.0_aarch64.dmg(12.64 MiB=13,255,900bytes measured), open it, and drag RustMatte.app to Applications. - Architecture Notice: Builds currently target Apple Silicon (
aarch64-apple-darwin) only. Intel (x86_64) Macs are not built inv1.0.0. - Gatekeeper Warning: Because the app is unsigned and not notarized, macOS will block opening it ("cannot be opened because the developer cannot be verified"). Verify the
.dmgchecksum first, then open System Settings -> Privacy & Security -> Open Anyway, or runxattr -dr com.apple.quarantine /Applications/RustMatte.app.
Linux (x86_64 — Experimental)
- AppImage: Download
RustMatte_1.0.0_amd64.AppImage(88.03 MiB=92,301,816bytes measured), runchmod +x RustMatte_*.AppImage, and launch. Built on Ubuntu 24.04 (glibc 2.39+required by prebuilt ONNX Runtime static binaries);libfuse2(sudo apt install libfuse2t64orlibfuse2) may be required for AppImage. - Debian / Ubuntu (
.deb): DownloadRustMatte_1.0.0_amd64.deb(14.44 MiB=15,140,874bytes measured) and install withsudo apt install ./RustMatte_*.deb(Ubuntu 24.04+ /glibc 2.39+). - Required Runtime Packages: System WebKitGTK/GTK packages (
libwebkit2gtk-4.1-0,libgtk-3-0,libayatana-appindicator3-1,librsvg2-2).
Verify Your Download
Always verify downloaded installers or CLI archives against SHA256SUMS.txt from the release page:
# Windows (PowerShell)
Get-FileHash .\RustMatte_1.0.0_x64-setup.exe -Algorithm SHA256
# macOS
shasum -a 256 -c SHA256SUMS.txt --ignore-missing
# Linux
sha256sum -c SHA256SUMS.txt --ignore-missing
Quick CLI Usage
# Single image (Quality tier default: BiRefNet Lite 512, ~3.0s median total on measured i5-10400 CPU)
rustmatte photo.jpg -o cutout.png
# Fast tier (U-2-Netp, ~0.33s median total across 12 fixtures on measured i5-10400 CPU)
rustmatte product.jpg -o cutout.png --tier fast
# Folder batch mode (outputs to ./rustmatte-output by default)
rustmatte ./photos/ --out ./photos-cutouts/ --recursive --skip-existing
# Early downscaling for very large images (saves RAM and post-processing time)
rustmatte large_photo.jpg -o cutout.png --max-side 1024
# Strictly offline execution (forbids network downloads)
rustmatte photo.jpg -o cutout.png --no-download
# Manage cached model weights
rustmatte models list
rustmatte models download --tier balanced --yes
rustmatte models verify
rustmatte models delete --tier fast --yes
CLI Exit Codes
0: All operations succeeded (processed or skipped cleanly).1: Total failure or invalid arguments.2: Partial failure (some images failed in batch mode while others succeeded or were skipped).
Data Storage and Uninstall
Uninstalling RustMatte removes only the application binary and never touches your photos or exported PNG folders.
| Data | Windows | macOS | Linux |
|---|---|---|---|
Settings (settings.json) |
%APPDATA%\io.github.yehudaaadev.rustmatte\ |
~/Library/Application Support/io.github.yehudaaadev.rustmatte/ |
~/.config/io.github.yehudaaadev.rustmatte/ |
| Preview cache (wiped on exit) | %LOCALAPPDATA%\io.github.yehudaaadev.rustmatte\previews\ |
~/Library/Caches/io.github.yehudaaadev.rustmatte/previews/ |
~/.cache/io.github.yehudaaadev.rustmatte/previews/ |
AI Model cache (.onnx) |
%LOCALAPPDATA%\RustMatte\models\ |
~/Library/Application Support/RustMatte/models/ |
~/.local/share/RustMatte/models/ |
- Windows: Uninstall via Settings -> Apps -> Installed apps -> RustMatte -> Uninstall (or
uninstall.exe). - macOS: Move
/Applications/RustMatte.appto Trash. - Linux: Delete the
.AppImageor runsudo apt remove rustmatte.
FAQ
- Does RustMatte work offline? Yes. Once the
.onnxmodel file is cached or imported, RustMatte runs 100% locally. You can also turn on "Never use the network" in the desktop Options panel or pass--no-downloadin the CLI. - Why does the first run ask to download a model? Bundling 183 MB+ of AI weights inside every installer bloats downloads and updates. Instead, RustMatte keeps the installer small (
9.78 MiBWindows installer, measured forv1.0.0) and asks permission before downloading weights once from GitHub Releases (github.com, withhuggingface.cofallback), verified by SHA-256. - What licenses apply to the code and AI models? The RustMatte application is licensed under GPL-3.0-or-later (LICENSE). Balanced/Quality tier (
BiRefNet_lite_512) weights are MIT, and Fast tier (U-2-Netp) weights are Apache-2.0. TheMaximumtier (BEN2 Base FP32) exists in the code onmainbut is hidden and not offered for download until its source is public and hash-verified; its weights would be Apache-2.0 / MIT. See MODELS.md and THIRD_PARTY_LICENSES.md for full provenance notes. - Why isn't output always identical to paid cloud APIs? Cloud services often run huge proprietary multi-stage models on datacenter GPUs. RustMatte runs compact open-weight models (
512x512/320x320input) on local consumer CPUs/GPUs so your photos never leave your computer. - Why are glass bottles or windows segmented as solid? Dichotomous foreground-segmentation models predict a foreground object mask rather than background refraction/transmittance, so transparent glass is treated as a solid subject.
Comparison with Alternatives
Verified against upstream repositories and pricing pages on 2026-11-25:
| Tool | Runtime & Install | Privacy / Offline | Licensing Model | Typical Trade-off |
|---|---|---|---|---|
| RustMatte | Native Rust + Tauri 2 desktop app & single CLI binary (9.78 MiB Windows installer, measured for v1.0.0) |
100% local after one-time consented model fetch or .onnx import |
App: GPL-3.0-or-later; Weights: MIT / Apache-2.0 (MODELS.md) | Runs on local CPU in the v1.0.0 release (3,070.9 ms Quality and 332.3 ms Fast median total, measured on one i5-10400 desktop CPU); glass segmented solid |
| rembg | Python CLI, library, HTTP server, or Docker container | Runs locally on your machine/server (fetches weights on first run) | MIT License (LICENSE.txt) | Requires Python environment; supports multiple models (U^2-Net, ISNet, BiRefNet, etc.) |
| @imgly/background-removal | JavaScript / WASM / WebGPU in browser or Node.js | Runs client-side in browser/Node | AGPL-3.0 (LICENSE.md) or commercial license | Convenient for web apps; AGPL copyleft obligations or commercial licensing apply |
| remove.bg | Cloud SaaS / REST API | Uploads images to third-party servers | Proprietary commercial service (free low-resolution previews; paid credits for full resolution) | Zero local hardware requirements; cloud upload and per-credit cost at full resolution |
Honest Capabilities and Known Limitations
- Measured CPU Performance (Windows 11 Pro, Intel Core i5-10400, 16 GB DDR4, release build; see docs/BENCHMARKS.md):
- Quality Tier (
birefnet_lite_512, 183 MB):2,984.9 msmedian inference /3,070.9 msmedian total across 12 fixtures (~3.68 scold-start model load);2,029.9 MBpeak Working Set. Preserves fine hair and intricate silhouettes. - Fast Tier (
u2netp, 4.36 MB):266.9 msmedian inference /332.3 msmedian total across 12 fixtures (349.5 ms–454.6 msaverage in 100-image batch);333.3 MBpeak Working Set. Best for people and products on clean backgrounds; may leave smears on fur or textured backgrounds.
- Quality Tier (
- Glass Transparency: Glass, windows, and translucent containers are segmented as solid foreground objects.
- Supported Formats (
v1.0.0release): JPEG, PNG, WebP, BMP. - Supported Formats (
v1.1.0— unreleased, onmainonly): Apple HEIC/HEIF decoding and Camera RAW embedded JPEG preview extraction (.CR2,.NEF,.ARW,.DNG). For RAW files, RustMatte extracts the largest embedded JPEG preview rather than demosaicing raw sensor pixels, so output dimensions equal the embedded JPEG preview size, not the camera's full sensor resolution. These code paths compile and pass CI but have not been verified against real-world sample files, so their behavior and actual preview resolutions on real camera files remain UNVERIFIED. - Execution Devices: CPU by default. DirectML (Windows) and CoreML (macOS) GPU execution providers with automatic CPU fallback are implemented on
main(v1.1.0, unreleased); DirectML was exercised locally by the owner during development, CoreML runtime behavior is UNVERIFIED on physical Apple hardware. - Platform Status: Windows is tested locally; macOS (
aarch64) and Linux builds are experimental until verified on physical hardware.
Privacy and Network Use Statement
RustMatte makes zero background network connections, contains zero telemetry/analytics/crash reporting, and never uploads images. The only network code (ureq in crates/core/src/download.rs) executes solely on explicit user confirmation to fetch pinned AI weights over HTTPS and verify SHA-256 checksums. See docs/SECURITY_MODEL.md and SECURITY.md.
Building from Source
Prerequisites
- Rust toolchain (pinned in
rust-toolchain.toml, version1.98.1) - Node.js
22+and npm (forcrates/appfrontend) - On Ubuntu/Debian Linux:
libwebkit2gtk-4.1-dev,libgtk-3-dev,libayatana-appindicator3-dev,librsvg2-dev,libxdo-dev,libssl-dev,pkg-config
Build and Test Steps
git clone https://github.com/yehudaaadev/RustMatte.git
cd RustMatte
# 1. Build frontend static assets (required before compiling crates/app/src-tauri)
cd crates/app
npm ci
npm test
npm run check
npm run build
cd ../..
# 2. Build and test Rust workspace (use -j 2 on Windows MSVC to avoid LNK1102 OOM)
cargo build --workspace
cargo test --workspace -j 2
Supported Ways to Run or Package the Desktop App
- Installed App (recommended for users): Install via the Windows NSIS setup (
RustMatte_<ver>_x64-setup.exe), macOS.dmg, or Linux.AppImage/.deb. - Desktop Dev Mode (hot reload): From
crates/app, runnpm run tauri dev(runs Vite onhttp://localhost:1420+ debug Tauri host). - Local Release Build / Bundle: From
crates/app, runnpx tauri build(ornpx tauri build --no-bundle) — this runsnpm run buildand enables Tauri'scustom-protocolfeature so the binary serves embedded frontend assets instead ofdevUrl. Plaincargo build --release -p rustmatte-appis intentionally blocked at compile time unless--features custom-protocolis enabled afternpm run build.
Quality Gate
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace -j 2
cargo deny check licenses
cargo deny check advisories
cd crates/app && npm run license-check && npm run license-check:all && npm test && npm run check && npm run build
Documentation Index
- MODELS.md — Model weights, SHA-256 digests, and dataset provenance
- THIRD_PARTY_LICENSES.md — Full crate, npm, and weight license register
- docs/SECURITY_MODEL.md — Tauri CSP, scoped asset protocol, and IPC boundary
- docs/BENCHMARKS.md — Measured CPU/memory benchmarks
- docs/ROADMAP.md — Post-
v1.0planned milestones - docs/RELEASING.md — Release checklist and draft prerelease notes
- CONTRIBUTING.md and CODE_OF_CONDUCT.md
License
RustMatte is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE for the full license text.
Explorer des projets similaires
Chargement…


