Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unbagrnd logo

unbagrnd

Latest release Total downloads License

A small desktop app that uses AI to remove the background from images — entirely on your device. No cloud API, no account, no telemetry, and no internet access required after a one-time setup step.

  • On-device AI. Background removal runs through a real neural network (ONNX Runtime), inferred locally on your machine. No image, filename, or metadata is ever sent anywhere.
  • 100% free & open source. MIT-licensed, built on a free, open-source stack — no API keys, no paid tiers, no usage limits.
  • Pick your AI model. Choose from several background-removal models in Settings, trading off speed vs. accuracy. Each downloads once on first use (starting at ~43 MB for the default) and is cached locally after that.
  • Offline after setup. The only network requests the app ever makes are those one-time model downloads. Nothing else — no analytics, no update checks.
  • Single and batch. Process one image, or a whole folder, from the same window.
  • Refine by hand. Brush over the result to erase or restore parts of the cutout, with undo/redo — for the spots the model gets almost right.
  • Edit the background. Fill it with a solid color and add an on-device drop shadow, no AI or network involved.
  • Export as PNG, WebP, or SVG. Pick the output format in Settings.
  • Cross-platform. macOS, Windows, and Linux.

Screenshots

unbagrnd main window unbagrnd single-image result

unbagrnd refine editor unbagrnd background editor

unbagrnd batch results unbagrnd settings

Videos

unbagrnd showcase video unbagrnd demo video

Showcase · Demo

How it works

unbagrnd runs IS-Net "general use" (Apache-2.0, from Qin et al., "Highly Accurate Dichotomous Image Segmentation", ECCV 2022) as an ONNX model, via the ort Rust bindings for ONNX Runtime. This is the same model family used by the popular rembg Python tool. The whole pipeline — decode, resize, normalize, run the model, turn its predicted mask into an alpha channel, re-encode as PNG — happens in the Rust backend; the frontend never touches the network.

Installing

Grab the installer for your platform from the Releases page:

  • macOS: .dmg (Apple Silicon only — the on-device ML runtime this app depends on no longer ships prebuilt binaries for Intel Macs)
  • Windows: .msi / .exe
  • Linux: .AppImage / .deb

On first launch, or the first time you remove a background, unbagrnd downloads the model (~170 MB) and shows a progress bar while it does. That only happens once — every run after that is fully offline.

macOS: "unbagrnd is damaged and can't be opened"

This build isn't code-signed or notarized (that requires a paid Apple Developer account), so Gatekeeper quarantines it after download and shows this message — the app itself isn't actually damaged. Clear the quarantine flag once, after moving it to Applications:

xattr -cr /Applications/unbagrnd.app

Development

Requires:

  • Node.js 20+
  • A recent stable Rust (1.88+), installed via rustup — not your OS package manager's rustc, which is often too old to build the ONNX Runtime bindings this app depends on.
  • The platform build tools Tauri needs — see the Tauri prerequisites guide for your OS (on Debian/Ubuntu: libwebkit2gtk-4.1-dev, libssl-dev, libayatana-appindicator3-dev, librsvg2-dev, plus standard build tools).
npm install       # install frontend dependencies
npm run tauri dev # run the app in dev mode, with hot reload

Building a release installer

npm run tauri build

Produces a native installer for your current OS in src-tauri/target/release/bundle/.

Running the Rust test suite

cd src-tauri
cargo test

Most of the backend is covered by ordinary cargo test. The one exception is the end-to-end inference test (decode → preprocess → run the model → composite the alpha channel), which needs a real cached model file and is skipped by default so a fresh clone doesn't need a 170 MB download just to run cargo test. To run it locally:

UNBAGRND_TEST_MODEL_PATH=/path/to/isnet-general-use.onnx \
UNBAGRND_TEST_IMAGE_PATH=/path/to/a/photo.jpg \
cargo test --release removes_background_from_a_real_photo -- --nocapture

Releasing

Pushing a tag matching v* (e.g. v0.2.0) triggers .github/workflows/build.yml, which builds installers for macOS (Apple Silicon + Intel), Windows, and Linux, and attaches them to a draft GitHub release.

Where the model is cached, and how to clear it

The model is stored in the app's local data directory, named after the app identifier (com.unbagrnd.app):

OS Path
macOS ~/Library/Application Support/com.unbagrnd.app/
Linux ~/.local/share/com.unbagrnd.app/
Windows %APPDATA%\com.unbagrnd.app\

To clear the cached model (freeing ~170 MB, or to force a clean re-download), delete that folder, or just the isnet-general-use.onnx file inside it. The app will re-download it the next time it's needed.

Project structure

unbagrnd/
  src/                    # frontend: plain HTML/CSS/JS, no framework
    index.html
    styles.css
    main.js
  src-tauri/
    src/
      lib.rs              # app entrypoint, plugin & command registration
      commands.rs          # Tauri commands exposed to the frontend
      model.rs             # one-time model download, caching, checksum
      bg_remove.rs          # preprocessing, inference, postprocessing
  .github/workflows/
    build.yml              # cross-platform release builds

License

MIT — see LICENSE. Free for personal and commercial use.

The bundled model, IS-Net "general use", is Apache-2.0 licensed and downloaded from rembg's (MIT-licensed) GitHub release assets — see How it works above.

Contributing

Issues and pull requests are welcome. This is a small, focused tool; the non-negotiable constraints above (local-only, free, offline after setup) apply to any contribution.

Releases

Packages

Contributors

Languages