Skip to main content

Lightning-fast AI background removal for images - CLI tool for Mac, Linux, and Windows

Project description

QuickBG Logo

⚡ QuickBG

PyPI Version PyPI Downloads License Build Status Tweet

Lightning-fast AI background removal CLI tool for Mac, Linux, and Windows


✨ Features

  • 🚀 Blazing Fast - Process images in seconds using state-of-the-art AI
  • 🔒 Private & Secure - Runs entirely locally on your machine
  • 🎯 High Quality - Produces clean cutouts with excellent edge handling
  • 📦 Batch Processing - Process entire folders with a single command
  • 🔧 Zero Config - Works out of the box with sensible defaults
  • 🍎 Mac Optimized - Native macOS support with pipx installation

📸 Example

# Remove background from a single image
$ quickbg photo.jpg
Processing: photo.jpg
Saved: photo-nobg.png

# With custom output
$ quickbg product.png -o cleaned.png

# Batch process a folder
$ quickbg -b ./productPhotos/
Found 25 image(s) to process
Output directory: ./productPhotos/nobg
--------------------------------------------------
[1/25] img_001.jpg... OK
[2/25] img_002.jpg... OK
...
--------------------------------------------------
Done! 25/25 images processed successfully

🖼️ Before & After

Before After
Product with background Product no background

📥 Installation

macOS (Recommended)

# Install pipx if you don't have it
brew install pipx

# Install QuickBG
pipx install quickbg

Linux

pipx install quickbg

Windows

pipx install quickbg

Using pip (All Platforms)

pip install quickbg

From Source

git clone https://github.com/jschof1/quickbg.git
cd quickbg
pip install -e .

🔧 Usage

Single Image Mode

# Basic usage (saves as filename-nobg.png)
quickbg input.jpg

# Specify output filename
quickbg input.png -o result.png

# Enable alpha matting for better edges (slower)
quickbg input.jpg --alpha-matting

Batch Processing Mode

# Process all images in a folder
quickbg -b ./photos/

# Specify output directory
quickbg -b ./photos/ -o ./output/

# With alpha matting
quickbg -b ./photos/ -a

Supported Formats

  • Input: JPG, JPEG, PNG, WebP, BMP, TIFF, TIF
  • Output: PNG (with transparency)

⚙️ Options

Flag Description
input Input image file or directory
-o, --output Output file or directory path
-b, --batch Batch mode: process all images in directory
-a, --alpha-matting Enable alpha matting for better edge refinement
-v, --version Show version number
-h, --help Show help message

🔨 Development

Setup Development Environment

# Clone the repository
git clone https://github.com/jschof1/quickbg.git
cd quickbg

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/ tests/

# Lint code
ruff check src/ tests/

Run Tests

pytest tests/ -v

🤝 Contributing

Contributions are welcome! Please read our Contributing Guidelines first.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • rembg - The amazing AI background removal library
  • U-2-Net - The underlying deep learning model

📊 Stats

Alt


Made with ❤️ by Jack Schofield

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quickbg-1.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quickbg-1.0.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file quickbg-1.0.0.tar.gz.

File metadata

  • Download URL: quickbg-1.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for quickbg-1.0.0.tar.gz
Algorithm Hash digest
SHA256 83245f2e29afce316468f47fee44e7aa6001ea799c8a2c46a0300ca344899c10
MD5 221db41e8cc28f49ac735e322d48dd9e
BLAKE2b-256 b09dfb0b5c4d6e66373e289adb1a97e0895bc04ec51dead6ccb7f1626d3113ca

See more details on using hashes here.

File details

Details for the file quickbg-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: quickbg-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for quickbg-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b99c4f88a3c692f7c0294565a14b4979c2046afbebe1cbb7ca93a33a373463b
MD5 f33b703ac21183e7aed0c7c058aa712a
BLAKE2b-256 1fb7f31c7bc349b2360b96a12266b1a0c0fdbc4610b5de52002f3bad08a2d8a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page