github nadermx/backgroundremover v0.4.1
BackgroundRemover v0.4.1

4 hours ago

Highlights

  • ProRes 4444 default: Transparent video output now defaults to prores_ks with yuva444p10le (10-bit color with alpha) instead of qtrle. Much better compression, color fidelity, and NLE compatibility (DaVinci Resolve, Premiere, Final Cut Pro). The old qtrle codec is still available via --alpha-codec qtrle.

  • Smart worker scaling: Worker count (-wn) is now dynamically capped based on your actual GPU VRAM rather than a hard limit. The tool calculates per-worker memory (CUDA context + model + JIT trace + batch tensors) and prevents over-allocation that caused hangs.

  • Mask threshold for sharp edges: New -mt/--mask-threshold option binarizes the alpha mask at a given threshold (0-255) for hard/crisp cutouts — ideal for cartoonish images, logos, and illustrations.

  • Device diagnostics: Prints detected device, GPU name, and VRAM at startup so you can verify GPU acceleration is working.

New CLI Flags

Flag Description
-mt 128 / --mask-threshold 128 Binarize mask for sharp edges (0-255)

Fixes

  • #181: Video processing hanging with high worker counts — workers now dynamically capped to what GPU VRAM can support.
  • #122: Soft/blurry edges on cartoonish images — new --mask-threshold option for hard cutouts.
  • #145: No indication of GPU usage — now prints device info (CUDA/MPS/CPU) with GPU name and VRAM at startup.

Breaking Changes

  • Default transparent video codec changed from qtrle to prores_ks. Output files will be smaller with better color but require ProRes-compatible playback. Use --alpha-codec qtrle for the old behavior.

Upgrade

pip install --upgrade backgroundremover

Don't miss a new backgroundremover release

NewReleases is sending notifications on new releases.