Skip to content

About

Offline background remover: an AI proposes the cut-out, you refine it with a brush. Portable, lightweight, no telemetry. Rust + Slint + ONNX Runtime.

Topics

Resources

Contributing

Stars

11 stars

Watchers

2 watching

Forks

Repository files navigation

OpenScissors

Cut the subject out of a photo, offline, on your own machine. An AI proposes the outline, you fix it with a brush, then you drop the result on a transparent, plain or picture background (with a shadow if you like) and export.

License Made with Rust UI: Slint Platform Portable No telemetry

FMHY

Français : README.fr.md

OpenScissors with a mug cut out and placed on a cream background with a soft shadow

See it in less than 120 seconds

brag-2.0.mp4

This is an independent project. It is not affiliated with any commercial product, and it contains no code, icons, translations or model weights from one.

Why

I wanted a background remover that

  • works offline (your photos never leave the computer),
  • starts in a blink and doesn't eat half the RAM just to sit there,
  • lets me correct the result instead of hoping the AI got it right,
  • comes as one folder I can copy to a USB stick.

So that's what this is. About 240 MB of memory with a photo open (not counting the model), 28 MB when it is idle.

What you get

  • Automatic cut-out the moment you open an image. The result appears next to the original; both views zoom and pan together.
  • Brush correction: mark what to keep, erase what shouldn't be there, and a hair tool for soft edges, computed at full resolution around the strokes so that single strands stay sharp. The brush size is in pixels of the picture, or of the screen whatever the zoom (Settings). Alt + drag with a mark tool draws a lasso: its outline is filled with the mark.
  • One-click mask fixes: fill the holes, remove the specks, keep the largest part, harden soft edges or invert the mask, each one step to undo.
  • Group by color (green and red marks) when the AI struggles: whole areas of similar colour follow your strokes.
  • Smart select: click what you want, right-click what you don't, or drag a box (needs the small SAM 2 model). An ambiguous click gets three proposals (a part, the whole, something in between): Tab goes from one to the next, Enter applies the one shown.
  • Backgrounds: transparent, solid colour, a gradient (two colours and an angle), any picture, or the original with the subject filled in: the texture around it (a wall, grass, a floor) is continued behind it, patch by patch, in about a second in the background, with a smooth fill shown meanwhile. Blur, grayscale, negative, pixelate or colourize either layer. An eyedropper next to every colour picks it from the picture.
  • Clean up the edges: soft edges (hair, feathering) lose the colour of the old background, so no halo shows on the new one.
  • Adjust the colours of the subject alone (brightness, saturation, warmth) so it sits right on its new background.
  • Shadow (blur, opacity, colour, offset right and down) and a reflection under the subject that fades out, crop to a ratio, padding, then export to PNG, JPEG, WebP, AVIF, TIFF or BMP. 16-bit sources can stay 16-bit. The quality setting drives JPEG, WebP and AVIF; WebP at 100 is lossless, below it is lossy (the transparency stays exact). WebP holds at most 16383 px per side. A print resolution (DPI, in the settings) can be written in PNG, JPEG and TIFF files, so they print at the size you mean. TIFF files are compressed without loss (Deflate). A largest file size (in the settings, --max-size 500k in the command line) lowers the quality of JPEG, WebP and AVIF files just enough for them to hold in it. Export the mask… (in the menu) saves the mask alone as a grey PNG at the size of the picture, for another program, and Export layers (PSD)… a Photoshop file with the photo and the cut-out as layers, the mask editable as a layer mask (the background, crop and effects stay in OpenScissors).
  • Output size and presets (marketplace 1000 or 2000 px, thumbnail, 16:9 banner): type a width, a height, or both for an exact size such as 1200 × 627 (the crop then takes that ratio); the result comes out at the exact size, centred, on white or transparent.
  • The canvas can grow past the picture: when a ratio or the padding asks for more room than the photo has (a 16:9 banner of a square photo), the background fills the extra area instead of cutting the subject. You can also drag the crop beyond the edges, or move it with Alt+arrows; a rule-of-thirds grid helps place the subject, and the picture turns a quarter or mirrors in one click (one step to undo). The canvas never grows beyond twice the size of the picture.
  • Colour profiles: a picture with an embedded profile (Display P3, Adobe RGB...) is converted to sRGB when it opens, so the colours are right (wide gamuts are clipped to sRGB); exports of such a picture carry the sRGB profile.
  • Opens JPEG, PNG, WebP, TIFF, BMP, GIF and JPEG XL. AVIF and HEIC are not read: their decoders are C libraries (dav1d, libheif under the LGPL) that the portable build would have to carry.
  • Pictures that are already cut out (a PNG or WebP with transparency) open with their own transparency: no model runs, you can refine the mask or change the background.
  • Before and after: the button next to the zoom controls (or C) turns both views into one big view with a divider you drag: the original on one side, the result on the other.
  • Nothing lost: the work in progress is saved every minute; if the application or the PC stops, it is offered back at the next start. Closing a picture that has marks offers to save a project, which keeps them (an exported picture does not).
  • Copy and paste: Ctrl+V opens the picture on the clipboard, keeping its transparency if it is already cut out (or an image file copied in your file manager); one click, or Ctrl+C, copies the result with its transparency.
  • Batch mode for a whole folder: drop the folder on the window, use your saved settings or those of the image you are editing, save as PNG, JPEG, WebP or AVIF. Subfolders can be included (each result goes to the same subfolder), the pictures already done can be left alone (to finish an interrupted batch), a suffix can be added to the names (photo-cutout.png) and a JSON report saved next to the results. A suffix with --suffix in the command line too.
  • Dark or light, or following the system (Settings, Appearance).
  • 9 languages: English (default), Français, Deutsch, Español, Italiano, Português (Brasil), Русский, 简体中文, 日本語. Chinese and Japanese use a font of their own (Microsoft YaHei UI / Yu Gothic UI on Windows, PingFang SC / Hiragino Sans on macOS, Noto Sans CJK on Linux).
  • Plug-ins (optional, off until you turn them on): small programs that run on the file you just saved.

Smart select on the mug, with the boundary, colour and effect settings The shadow tab: opacity, blur, offset and colour

The batch panel The models panel

A 16:9 banner on a gradient background, with the start and end colours, the angle and the eyedropper The before and after view: the original on the left of the divider, the result on the right

Get it

Windows 10/11 (64-bit), Linux x64 and macOS on Apple Silicon each have their build on the Releases page.

  1. Download the latest zip for your system from the Releases page (OpenScissors-…-portable-win-x64.zip, …-linux-x64.zip or …-darwin-arm64.zip) and unzip it anywhere.
  2. Run OpenScissors.exe (OpenScissors on Linux and macOS).
  3. Open an image (the button, Ctrl+O, drag and drop, paste with Ctrl+V, or OpenScissors.exe photo.jpg).

The releases after 2.0 also get an AppImage for Linux and an OpenScissors.app for macOS, which keep their files in your profile; Scoop and winget manifests are ready in packaging/. docs/DISTRIBUTION.md explains them and how to sign the builds.

The first time, no AI model is installed (they are not bundled). Click the chip at the top, pick one, press Download. The file is checked against a SHA-256 before it is used (except the two marked ⚠ below). A download that is cut (cancelled, connection lost, or nothing received for a minute) resumes where it stopped the next time you press Download; a file that is already there is checked again before it is trusted.

Model Download Memory Good for
IS-Net (default) 179 MB ~0.6 GB most photos, under a second
BiRefNet lite 224 MB ~5 GB hair and thin structures, a few seconds
BiRefNet lite, half precision 115 MB ~5 GB the same, made for GPUs
BiRefNet full 973 MB heavy best quality, slow on a CPU
BiRefNet portrait 973 MB heavy people: hair, faces, shoulders; slow on a CPU
SAM 2.1 tiny 156 MB ~1 GB while selecting the Smart select tool
U²-Net lite ⚠ 5 MB not measured drafts or a slow computer; rough edges
IS-Net anime ⚠ 176 MB not measured drawings and anime characters

⚠ Not verified. The release these two come from publishes no checksum, so the catalogue pins none: the file is downloaded and used as it comes, and an update of it upstream still downloads. The models panel marks them Not verified, models list says (not verified) and models download warns. Their settings follow the ones rembg documents; they have not been run here.

With two models or more, Compare them on this picture (in the models panel) runs each on the open picture and shows its cut-out, what it kept, how long it took and how much it agrees with the model in use. The app picks the lightest model you have until you choose another one, and refuses a model that wouldn't fit in its memory budget instead of freezing your PC.

Portable by design

Everything the application writes stays in its own folder:

OpenScissors/
├── OpenScissors.exe
├── openscissors-cli.exe   the same engine in a terminal
├── DirectML.dll        only used by the optional GPU mode
├── models/             what you downloaded
├── data/               settings, window position, your saved defaults
├── temp/               scratch files (cleaned automatically)
└── licenses/

Delete data/ to start over, delete models/ to free space. Nothing is written to the registry or to your profile. (If the folder is read-only, for example Program Files, the app falls back to your user profile rather than failing.)

Light by default, heavy if you ask

  • Nothing is loaded at start. The model loads with your first image.
  • The app keeps to 25 % of your RAM (50 % in Settings, if you have the memory and the patience for BiRefNet).
  • Big photos are handled in bands, so an 8K image costs a few hundred MB, not gigabytes.
  • The footer shows the live RAM and CPU use of the app.

Shortcuts

F keep · B remove (in Group by color) · E erase S smart select · H hair · Shift+H erase hair
M move · hold Space to pan [ ] brush size
Alt+arrows move the crop by 1 px (Shift: 10 px) arrows pan the views · C before / after
Ctrl+O open · Ctrl+S save (the project when one is open, else the result) · Ctrl+Shift+S save the result as Ctrl+Z / Y undo / redo
Ctrl+V paste an image Ctrl+C copy the result
Page Down / Page Up next / previous picture of the folder, with the same settings
Ctrl+0 100 % · Ctrl+9 fit · Ctrl++ / - zoom wheel pans, Ctrl+wheel zooms
Enter apply a smart selection · Backspace remove the last click · Esc cancel

? (or F1, or Keyboard shortcuts in the menu) shows them all in the window. History in the menu lists the last steps: a click goes back (or forward) to any of them. The brush is off by default: the app starts on the Move tool, so the pointer never paints by surprise. The shortcuts follow the characters printed on the keys, so they also work on a French (AZERTY) keyboard: Ctrl+à and Ctrl+ç zoom like Ctrl+0 and Ctrl+9, AltGr+( and AltGr+) give the brush size keys [ and ].

Privacy

No account, no telemetry, no network call except the model downloads you start yourself (HTTPS, checksum verified).

Build it yourself

You only need Rust (stable, 1.92 or newer).

cargo run -p openscissors --release                 # run it
cargo test --workspace                              # tests
node scripts/package-portable.mjs --build --zip     # the portable folder (with the CLI) and its zip, in dist/

Debug builds (of the app and of the command line) keep their data in portable-dev/. OPENSCISSORS_HOME points both to another folder; the command line always uses the same folder as the app, including the fallback in your profile, and OPENSCISSORS_MODEL=/path/model.onnx loads a local IS-Net style file.

There is a command line tool too: cargo run -p openscissors-cli -- cut photo.jpg cutout.png (also predict, batch, models). batch photos/ out/ --recursive takes the subfolders too and writes each result in the same subfolder of out/; --jobs 4 handles four pictures at once (each needs its own memory, and since one picture already keeps every core busy the gain is small: 10 to 15 % measured on JPEG photos, none in AVIF); --resume (formats png, jpg, webp, avif, tiff, bmp) leaves alone the images whose result is already in out/, so running the same command again after an error or an interruption only does what is left (two pictures with the same name, a.jpg and a.png, give a_jpg.png and a_png.png); pictures that are already cut out keep their transparency and 16-bit ones stay 16-bit in PNG (--8bit turns that off), as when you export from the window; --dpi 300 writes the print resolution in PNG, JPEG and TIFF files; --gpu (also for cut, predict and compare) runs the model on the graphics card when it can, on the processor otherwise; --preset banner, --bg white (or transparent, black, #ff8800), --width 1200 --height 627 set the look and the size of every result, after the settings saved in the app when --defaults is there; cut takes the same options for one picture and writes any format (cut photo.jpg out.jpg --bg white --width 1000), and - reads the picture from a pipe or writes the result to one (cat photo.jpg | openscissors-cli cut - - --format webp > out.webp); --report report.json writes one entry per image (done, skipped or failed, the file written, the error, the time). compare photo.jpg out/ runs every downloaded model (or --models a,b) on one picture, one at a time, and writes each mask, a contact sheet and the agreement between the models. models --json lists the catalogue for a script (every field, whether each model is downloaded and where); models download <id> resumes a cut download and models verify <id> checks the files against their SHA-256.

To look at the interface and drive it without touching the mouse (handy for tests and screenshots):

cargo run --release -p openscissors --example selftest -- photo.jpg out/ [tour|keys|flows|all|script steps.json]

Using your own model

Create models/<name>/model.onnx and a model.json next to it:

{
  "id": "my-model", "name": "My model", "license": "MIT",
  "input_size": [1024, 1024],
  "mean": [0.485, 0.456, 0.406], "std": [0.229, 0.224, 0.225],
  "output": "sigmoid"
}

output is sigmoid (the model returns logits), minmax (rescale the raw output) or none (already 0..1). Models are described by data only, so adding one never needs a code change. The file names (file_name, files) are plain names inside that folder: a model.json that points anywhere else is ignored.

Plug-ins

A plug-in is a folder plugins/<id>/ next to models/, with a plugin.json:

{ "id": "optimize-png", "name": "Optimise PNG", "description": "Runs oxipng on the result",
  "command": "run.cmd", "args": ["{input}"], "extensions": ["png"] }

command is a file inside that folder: a .cmd, .bat or .exe on Windows (the example above is a Windows one), an executable script such as run.sh on Linux and macOS. {input} is the file you just saved and {dir} its folder; {output} is <name>-<id>.<ext> beside it, a file the plug-in may write (an upscaled or optimised copy), and the status bar then names it. A plug-in does nothing until you turn it on in Settings, then it runs only when you press Run on the last saved file, or after each save when you turn on Run after each save (60 s limit, or "timeout_seconds" up to 3600 in its plugin.json; the last lines of its output are shown). When the time is over, or when the plug-in leaves a program running behind it, that program is stopped together with everything it started. It is a program you installed: OpenScissors adds no permission of its own.

How it is put together

  • crates/core: everything that isn't a window. Image I/O, the model runner (ONNX Runtime), the GrabCut and max-flow code, closed-form matting, SAM 2, the document with its undo stack, rendering and export. No GUI dependency, so it is easy to test.
  • crates/app: the window, written with Slint and its software renderer. That choice alone saves ~100 MB compared to a GPU renderer, and a lot more compared to a web view.
  • crates/cli: the command line.

More in docs/ARCHITECTURE.md and docs/PERF.md (memory and speed, measured).

Known limits

  • The GPU mode is optional (Settings, Processing). It uses DirectML on Windows (any DirectX 12 card) and Core ML on macOS. NVIDIA cards can use CUDA in a build made with cargo build --release --features cuda (it downloads the CUDA build of ONNX Runtime, and the machine needs the CUDA 12 runtime and cuDNN 9): CUDA is then tried first, and DirectML or the processor when it cannot load. The status bar says which one runs. On the card I tried (GTX 1660 SUPER) DirectML did not make the models faster; the CUDA and Core ML paths follow the ONNX Runtime documentation and have not been measured here.
  • Wide-gamut pictures are converted to sRGB, so colours outside sRGB are clipped. AVIF can be written but not opened.
  • The screen reader support (see docs/PERF.md) has not been tested with a real screen reader.
  • A picture is refused, with a message, when it would not fit the memory budget (about 24 bytes per pixel once opened: an 8K photo needs ~0.8 GB, 100 megapixels ~2.3 GB) or is over 500 megapixels. The undo history keeps at most about 384 MB (a sixth of the memory budget on a small machine): the oldest steps are forgotten first.
  • The translations haven't been reviewed by native speakers. Corrections are welcome.

License

Apache-2.0. See LICENSE, NOTICE and THIRD_PARTY.md.

The interface toolkit, Slint, is used under the Slint Royalty-free License 2.0 (free for desktop apps, with the Made with Slint attribution you can find in Menu → About). Slint can also be used under GPL-3.0, which would make a build of OpenScissors GPL-3.0 as a whole; whoever builds the source picks the license that suits them. This is not legal advice.

Models are separate works with their own licenses (MIT, Apache-2.0), listed in THIRD_PARTY.md.

About

Offline background remover: an AI proposes the cut-out, you refine it with a brush. Portable, lightweight, no telemetry. Rust + Slint + ONNX Runtime.

Topics

Resources

Contributing

Stars

11 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages