Skip to content

whereissam/DropBG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DropBG Logo

DropBG

Local-first, privacy-friendly background remover for macOS.
No uploads, no subscriptions, no resolution limits.

DropBG Screenshot

Why DropBG?

  • Local-first — images never leave your machine by default
  • Free & unlimited — no per-image fees or resolution caps
  • Fast on Apple Silicon — leverages CoreML / Neural Engine
  • One-time setup — download the AI model once, then everything runs offline
  • Optional cloud API — use Replicate, fal.ai, or remove.bg for cloud GPU processing

Features

  • Drag-and-drop single or multiple images
  • 6 AI models to choose from (BiRefNet Lite/Full, BEN2, RMBG 2.0, InSPyReNet, MODNet)
  • Cloud API support — Replicate, fal.ai, remove.bg (bring your own key)
  • Batch processing with per-image progress and auto-naming
  • Background replacement — solid colors, gradients, or custom images
  • AI upscaling — 2x/4x super-resolution via Real-ESRGAN
  • Auto-crop — trim transparent edges automatically
  • Before/after preview — press Space to toggle
  • Configurable — model location, save folder, model switching without restart

Available Models

Local Models (runs 100% offline)

Model Size Tier Best For
BiRefNet Lite ~200 MB Default Fast, good for most images
BiRefNet Full ~900 MB Best quality Complex backgrounds, high detail
BEN2 ~219 MB Best edges Hair, fur & fine edges
RMBG 2.0 ~514 MB Best product Clean ecommerce/product shots (manual download)
InSPyReNet ~300 MB Best fuzzy Fuzzy edges, hair strands & fine detail
MODNet ~13 MB Lightweight Real-time / portraits (legacy)

Cloud API Providers (optional, bring your own key)

Provider Cost Model Notes
Replicate ~$0.0004/img BiRefNet on A100 GPU Cheapest, same models on cloud GPUs
fal.ai ~$0.018/img BiRefNet + RMBG 2.0 Fast & reliable
remove.bg ~$0.10/img Proprietary Best polish, most mature API

Tech Stack

Layer Choice Why
App Tauri 2 (Rust + React) Lightweight, native feel
AI Inference ort (ONNX Runtime) + CoreML EP Apple Neural Engine acceleration
AI Upscale Real-ESRGAN x4plus (ONNX) High-quality super-resolution
Image image crate + ndarray PNG read/write with alpha channel
Frontend React 19 + TypeScript Fast, component-based UI

Getting Started

Prerequisites: Rust toolchain, Bun

# clone
git clone https://github.com/whereissam/DropBG && cd DropBG

# install frontend dependencies
bun install

# run in dev mode
cargo tauri dev

On first launch, DropBG asks you to download an AI model (~200 MB). After that, everything runs 100% offline.

Installing from DMG (no code signing)

Since DropBG doesn't have an Apple Developer certificate yet, macOS will block the app on first launch:

  1. Try to open DropBG — macOS shows a warning
  2. Go to System Settings → Privacy & Security
  3. Click Open Anyway next to the DropBG message
  4. Or run: xattr -cr /Applications/DropBG.app

See docs/USAGE.md for detailed instructions.

Build for Release

cargo tauri build

The DMG/app bundle will be in src-tauri/target/release/bundle/.

Documentation

Project Structure

DropBG/
├── src-tauri/                # Rust backend
│   ├── src/
│   │   ├── lib.rs            # Tauri entry + command registration
│   │   ├── commands.rs       # IPC command handlers
│   │   ├── inference/        # ONNX Runtime session, pre/post processing, upscale
│   │   ├── imaging/          # Auto-crop, background replacement
│   │   └── model/            # Model downloader + config management
│   └── Cargo.toml
├── src/                      # React frontend
│   ├── App.tsx               # Main app (stage-based routing)
│   ├── tauri.ts              # Typed Tauri invoke wrappers
│   └── components/           # UI components
├── web/                      # Landing page (Astro)
├── docs/
│   ├── USAGE.md              # Usage guide
│   └── TODO.md               # Roadmap
└── README.md

License

MIT

About

Local-first, privacy-friendly background remover for macOS. No uploads, no subscriptions, no resolution limits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors